Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.portal.admin.jspbeans
Class PortalLayoutJspBean

    java.lang.Object
      |
      +--com.beasys.portal.admin.jspbeans.JspBeanBase
            |
            +--com.beasys.portal.admin.jspbeans.PortalLayoutJspBean

public class PortalLayoutJspBean
extends JspBeanBase

The class that includes various portlet layout algorithms used by the various layout.jsp (Administration Tool) pages.

See Also:
  Serialized Form

Field Summary
`protected static boolean` | `debug` Debugging flag.

Fields inherited from class com.beasys.portal.admin.jspbeans.JspBeanBase
`DEFAULT_CATEGORY`

Constructor Summary
`PortalLayoutJspBean()` Creates a new instance.

Method Summary
`void` | `calcXYForNewPortlets(com.sun.java.util.collections.LinkedList addList, com.sun.java.util.collections.LinkedList sortedColumnList, PortalColumnInformation[] columnInfo)` Calculates the X and Y for each portal in an 'add set' of portlets.
`protected int` | `findFirstNarrowColumn(PortalColumnInformation[] columnInfo)` Returns the index of the first narrow column for a portal.
`protected int` | `findFirstWideColumn(PortalColumnInformation[] columnInfo)` Returns the index of the first wide column for a portal.
`protected int` | `findNextNarrowColumn(int curIdx, PortalColumnInformation[] columnInfo)` Returns the index of the next narrow column for a portal.
`Portlet[][]` | `getAllPortletsFor(java.lang.String aPortalName, java.lang.String aGroupName, java.lang.String aUserName)` Returns an 2 dimensional array (sorted in row/column) of AVAILABLE portlets for a portal for a portal, group, and user.
`Portlet[]` | `getAvailablePortletsForPortal(java.lang.String aPortalName)` Returns an array of available portlets for a portal at the portal level.
`PortalColumnInformation[]` | `getPortalColumnInfo(java.lang.String portalName)` Returns the column information for a portal.
`Portlet` | `getPortletFor(java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName, java.lang.String portletName)` Returns the visible portlets based upon the scope of the request.
`java.lang.String[]` | `getVisiblePortletNamesFor(java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName)` Returns the visible portlet names based upon the scope of the request.
`void` | `processMoveCommand(java.lang.String theCommand, Portlet thePortlet)` Processes a move command from the layout tool.
`boolean` | `removePortletFor(java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName, Portlet aPortlet)` Removes (turns off the visible bit) a portlet for the scope of the request.
`void` | `resequencePortletsFor(java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName, int thePortalColumn, Portlet theMovedPortlet, java.lang.String moveCmd)` Re-sequences the portlets for a given layout scope.
`void` | `sequencePortlets(java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName, com.sun.java.util.collections.Vector aPortletVec)` Sequences the portlets in a column for a given layout scope.
`void` | `setPortalColumnInfo(Portal aPortal, PortalColumnInformation[] colInfo)` Sets the portal column information for a portal.
`com.sun.java.util.collections.LinkedList` | `sortIntoColumns(Portlet[] portlets, PortalColumnInformation[] columnInfo)` Sorts an array of portlets into columns.
`void` | `sortPortlets(com.sun.java.util.collections.ArrayList thePortletArrayList)` Sorts an ArrayList of portlets
`void` | `sortPortlets(com.sun.java.util.collections.Vector thePortletVec)` Sorts a vector of portlets
`boolean` | `updateColumnInfo(com.sun.java.util.collections.HashMap bufferedColWidthHashMap, javax.servlet.http.HttpServletRequest request, Portal thePortal)` Updates the column information for a Portal.
`boolean` | `updatePortletFor(java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName, Portlet aPortlet)` Updates a portlet for the scope of the request.
`boolean` | `updatePortlets(com.sun.java.util.collections.HashMap thePortletHashMap, javax.servlet.http.HttpServletRequest request, java.lang.String layoutScope, java.lang.String portalName, java.lang.String groupName, java.lang.String userName)` Updates a portlet for the scope of the request.

Methods inherited from class com.beasys.portal.admin.jspbeans.JspBeanBase
`findStringInArray, hasSpecialHTMLChars, isStringLetterOrDigit, validateDoubleValue, validateDoubleValue, validateGroupName, validateIntValue, validateIntValue, validateLength, validateUserName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### debug

    protected static final boolean debug

  Debugging flag.

Constructor Detail

### PortalLayoutJspBean

    public PortalLayoutJspBean()

  Creates a new instance.

Method Detail

### sortPortlets

    public void sortPortlets(com.sun.java.util.collections.Vector thePortletVec)

  Sorts a vector of portlets
  Parameters:
    `thePortletVec` - A vector of portlet references that represent a column.

### sortPortlets

    public void sortPortlets(com.sun.java.util.collections.ArrayList thePortletArrayList)

  Sorts an ArrayList of portlets
  Parameters:
    `thePortletArrayList` - The array list of portlets that represent a column.

### getAvailablePortletsForPortal

    public Portlet[] getAvailablePortletsForPortal(java.lang.String aPortalName)

  Returns an array of available portlets for a portal at the portal level.
  Parameters:
    `aPortalName` - The portal name.
  Returns:
    An array of portlets found. If not found, it returns an empty array.

### getAllPortletsFor

    public Portlet[][] getAllPortletsFor(java.lang.String aPortalName,
                                         java.lang.String aGroupName,
                                         java.lang.String aUserName)

  Returns an 2 dimensional array (sorted in row/column) of AVAILABLE portlets for a portal for a portal, group, and user. If the user is not null, then it returns all of the available portlets to the user. If the user is null, then it returns all available portlets for the group and portal. If the group is null, then it returns all available portlets for the portal.
  Parameters:
    `aPortalName` - The portal name.
    `aGroupName` - The group name.
    `aUserName` - The user name.
  Returns:
    An array of portlets found. If not found, it returns null;

### resequencePortletsFor

    public void resequencePortletsFor(java.lang.String layoutScope,
                                      java.lang.String portalName,
                                      java.lang.String groupName,
                                      java.lang.String userName,
                                      int thePortalColumn,
                                      Portlet theMovedPortlet,
                                      java.lang.String moveCmd)

  Re-sequences the portlets for a given layout scope.
  Parameters:
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
    `thePortalColumn` - The position of the portal column affected.
    `theMovedPortlet` - The portlet that has moved.
    `moveCmd` - The move comand (MoveDown, MoveUp, MoveLeft, MoveRight, Remove).

### sequencePortlets

    public void sequencePortlets(java.lang.String layoutScope,
                                 java.lang.String portalName,
                                 java.lang.String groupName,
                                 java.lang.String userName,
                                 com.sun.java.util.collections.Vector aPortletVec)

  Sequences the portlets in a column for a given layout scope.
  Parameters:
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
    `aPortletVec` - A vector of portlets representing all portlets in a column.

### sortIntoColumns

    public com.sun.java.util.collections.LinkedList sortIntoColumns(Portlet[] portlets,
                                                                    PortalColumnInformation[] columnInfo)

  Sorts an array of portlets into columns. It only sorts the references in the array and does not update the entities in the persistent store.
  Parameters:
    `Portlets` - An array of portlets to be sorted.
    `columnInfo` - The column information for the portal that contains the portlets.
  Returns:
    A linked list of vectors where each vector is all of the portlets in the column. Returns an empty list if an error or their are no portlets.

### calcXYForNewPortlets

    public void calcXYForNewPortlets(com.sun.java.util.collections.LinkedList addList,
                                     com.sun.java.util.collections.LinkedList sortedColumnList,
                                     PortalColumnInformation[] columnInfo)

  Calculates the X and Y for each portal in an 'add set' of portlets. An add set is a set of new portlets that will be added to a portal. This method does not add them it just updates the in memory portlet X and Y.
  Parameters:
    `addSet` - a Set of Portlet references.
    `sortedColumnSet` - a Set of vectors containing portlets sorted into columns.
    `columnInfo` - The column information for the portal. Each vector is a column.

### findFirstWideColumn

    protected int findFirstWideColumn(PortalColumnInformation[] columnInfo)

  Returns the index of the first wide column for a portal. Note: The wide attribute is not supported yet.
  Parameters:
    `columnInfo` - The portal's column information.
  Returns:
    -1 if no wide column found, else the 0 based offset of the first wide column found.

### findFirstNarrowColumn

    protected int findFirstNarrowColumn(PortalColumnInformation[] columnInfo)

  Returns the index of the first narrow column for a portal.
  Parameters:
    `columnInfo` - The portal's column information.
  Returns:
    -1 if no narrow column found, else the 0 based offset of the first narrow column found.

### findNextNarrowColumn

    protected int findNextNarrowColumn(int curIdx,
                                       PortalColumnInformation[] columnInfo)

  Returns the index of the next narrow column for a portal.
  Parameters:
    `curIdx` - The current column index.
    `columnInfo` - The portal's column information.
  Returns:
    -1 if no narrow column found, else the 0 based offset of the next narrow column found.

### getVisiblePortletNamesFor

    public java.lang.String[] getVisiblePortletNamesFor(java.lang.String layoutScope,
                                                        java.lang.String portalName,
                                                        java.lang.String groupName,
                                                        java.lang.String userName)

  Returns the visible portlet names based upon the scope of the request.
  Parameters:
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
  Returns:
    An array of portlet names.
  See Also:
    `PortalFinderJspBean`

### getPortletFor

    public Portlet getPortletFor(java.lang.String layoutScope,
                                 java.lang.String portalName,
                                 java.lang.String groupName,
                                 java.lang.String userName,
                                 java.lang.String portletName)

  Returns the visible portlets based upon the scope of the request.
  Parameters:
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
  Returns:
    An array of portlets.
  See Also:
    `PortalFinderJspBean`

### removePortletFor

    public boolean removePortletFor(java.lang.String layoutScope,
                                    java.lang.String portalName,
                                    java.lang.String groupName,
                                    java.lang.String userName,
                                    Portlet aPortlet)

  Removes (turns off the visible bit) a portlet for the scope of the request.
  Parameters:
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
    `aPortlet` - The portlet to remove (make invisible).
  Returns:
    true if successful; false if not.
  See Also:
    `PortalFinderJspBean`

### updatePortletFor

    public boolean updatePortletFor(java.lang.String layoutScope,
                                    java.lang.String portalName,
                                    java.lang.String groupName,
                                    java.lang.String userName,
                                    Portlet aPortlet)

  Updates a portlet for the scope of the request.
  Parameters:
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
    `aPortlet` - The portlet to remove (make invisible).
  Returns:
    true if successful; false if not.
  See Also:
    `PortalFinderJspBean`

### getPortalColumnInfo

    public PortalColumnInformation[] getPortalColumnInfo(java.lang.String portalName)

  Returns the column information for a portal.
  Parameters:
    `portalName` - The name of the portal.
  Returns:
    The Portal Column Information.

### setPortalColumnInfo

    public void setPortalColumnInfo(Portal aPortal,
                                    PortalColumnInformation[] colInfo)

  Sets the portal column information for a portal.
  Parameters:
    `aPortal` - The Portal.
    `colInfo` - The column information.

### processMoveCommand

    public void processMoveCommand(java.lang.String theCommand,
                                   Portlet thePortlet)

  Processes a move command from the layout tool.
  Parameters:
    `theCommand` - The command to process (MoveDown, MoveUp, MoveLeft, MoveRight, Remove).
    `thePortlet` - The portlet for the command.

### updatePortlets

    public boolean updatePortlets(com.sun.java.util.collections.HashMap thePortletHashMap,
                                  javax.servlet.http.HttpServletRequest request,
                                  java.lang.String layoutScope,
                                  java.lang.String portalName,
                                  java.lang.String groupName,
                                  java.lang.String userName)

  Updates a portlet for the scope of the request.
  Parameters:
    `request` - The HTTP request.
    `layoutScope` - The scope of the layout (portal, group, user)
    `portalName` - The name of the portal.
    `groupName` - The name of the group.
    `userName` - The name of the user.
  Returns:
    true if successful; false if not.

### updateColumnInfo

    public boolean updateColumnInfo(com.sun.java.util.collections.HashMap bufferedColWidthHashMap,
                                    javax.servlet.http.HttpServletRequest request,
                                    Portal thePortal)

  Updates the column information for a Portal.
  Parameters:
    `bufferedColWidthHashMap` - The column widths.
    `request` - The HTTP request.
    `thePortal` - The portal.
  Returns:
    true if successful; false if not.

Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 BEA Systems, Inc. All Rights Reserved