BEA Systems, Inc.

com.beasys.commerce.portal.admin.jspbeans
Class PortalPersonalizationJspBean

java.lang.Object
  |
  +--com.beasys.commerce.axiom.jsp.JspBeanBase
        |
        +--com.beasys.commerce.portal.admin.jspbeans.PortalJspBean
              |
              +--com.beasys.commerce.portal.admin.jspbeans.PortletJspBean
                    |
                    +--com.beasys.commerce.portal.admin.jspbeans.PortalPersonalizationJspBean
Direct Known Subclasses:
GroupPersonalizationJspBean

public class PortalPersonalizationJspBean
extends PortletJspBean
implements Portlet

The <jsp:usebean> for the Portal Admin Tool named add_portlets.jsp. Also is a base class for other Portal Admin tools.

See Also:
Serialized Form

Field Summary
static java.lang.String IS_AVAILABLE
          Constant representing the AVAILABLE state.
static java.lang.String IS_UNAVAILABLE
          Constant representing the IS AVAILABLE state.
static java.lang.String IS_VISIBLE
          Constant representing the IS VISIBLE state.
 
Fields inherited from class com.beasys.commerce.axiom.jsp.JspBeanBase
DEFAULT_CATEGORY
 
Constructor Summary
PortalPersonalizationJspBean()
          Creates a new instance.
 
Method Summary
 int calcNumCols(int numToDisplay, int maxCols)
          Determines the number of columns needed to display a set of portlets.
 int calcNumRows(int numToDisplay, int numOfCols)
          Determines the number of rows needed to display a set of portlets in an Admin Tool.
 java.lang.String getAlternateFooterURL()
          Overrides the getAlternateFooterURL method in the PortletJspBean class since this class does not support this attribute.
 java.lang.String getAlternateHeaderURL()
          Overrides the getAlternateHeaderURL method in the PortletJspBean class since this class does not support this attribute.
 java.lang.String getBannerURL()
          Overrides the getBannerURL method in the PortletJspBean class since this class does not support this attribute.
 java.lang.String getMaximizedURL()
          Overrides the getMaximizedURL method from the PortletJspBean class since this class does not support this attribute.
 boolean isAvailable()
          Returns true if available, false if not.
 java.lang.String[][] makeDisplayNamesTable(int rows, int cols, java.lang.String[] names)
          Takes an array of string names and puts them into rows and columns
 void setAlternateFooterURL(java.lang.String ignore)
          Overrides the setAlternateFooterURL method in the PortletJspBean class since this class does not support this attribute.
 void setAlternateHeaderURL(java.lang.String ignore)
          Overrides the setAlternateHeaderURL method in the PortletJspBean class since this class does not support this attribute.
 void setAvailable(boolean isAvailable)
          Sets the Available attribute
 void setBannerURL(java.lang.String ignore)
          Overrides the setBannerURL method in the PortletJspBean class since this class does not support this attribute.
 void setMaximizedURL(java.lang.String ignore)
          Overrides the setMaximizedURL method in the PortletJspBean class since this class does not support this attribute.
 boolean updatePortalPortlet(java.lang.String thePortalName, Portlet thePortlet)
          A convenience method only.
 java.lang.String updatePortalWithPortlet(java.lang.String aPortalName)
          Updates/Adds/removes a portlet to a portal
 boolean updatePortalWithPortlets(javax.servlet.http.HttpServletRequest request, Portal portal, java.lang.String[] existingPortlets, java.lang.String[] schemaPortlets)
          Updates/Adds/removes portlets to/from the Portal Personalization persistent information.
 java.lang.String validate()
          Validates the attributes of this bean.
 
Methods inherited from class com.beasys.commerce.portal.admin.jspbeans.PortletJspBean
getCategoryId, getColumn, getEditURL, getHelpURL, getIconURL, getRow, getTitlebarURL, hasHelp, isEditable, isFloatable, isLoginRequired, isMandatory, isMaximizeable, isMinimizeable, isMinimized, isMoveable, isVisible, setCategoryId, setColumn, setEditable, setEditURL, setFloatable, setHelp, setHelpURL, setIconURL, setLoginRequired, setMandatory, setMaximizeable, setMinimizeable, setMinimized, setMoveable, setRow, setTitlebarURL, setVisible
 
Methods inherited from class com.beasys.commerce.portal.admin.jspbeans.PortalJspBean
clone, getContentColumnCount, getContentColumnCountStr, getContentURL, getFooterURL, getHeaderURL, getName, getPK, getSuspendedURL, isSuspended, setContentColumnCount, setContentColumnCountStr, setContentURL, setFooterURL, setHeaderURL, setName, setPK, setSuspended, setSuspendedURL
 
Methods inherited from class com.beasys.commerce.axiom.jsp.JspBeanBase
findStringInArray, hasSpecialHTMLChars, isStringLetterOrDigit, validateDoubleValue, validateDoubleValue, validateGroupName, validateIntValue, validateIntValue, validateLength, validateUserName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_AVAILABLE

public static final java.lang.String IS_AVAILABLE
Constant representing the AVAILABLE state.

IS_VISIBLE

public static final java.lang.String IS_VISIBLE
Constant representing the IS VISIBLE state.

IS_UNAVAILABLE

public static final java.lang.String IS_UNAVAILABLE
Constant representing the IS AVAILABLE state.
Constructor Detail

PortalPersonalizationJspBean

public PortalPersonalizationJspBean()
Creates a new instance.
Method Detail

getMaximizedURL

public java.lang.String getMaximizedURL()
Overrides the getMaximizedURL method from the PortletJspBean class since this class does not support this attribute.
Specified by:
getMaximizedURL in interface Portlet
Overrides:
getMaximizedURL in class PortletJspBean
Returns:
Always returns an empty string.

setMaximizedURL

public void setMaximizedURL(java.lang.String ignore)
Overrides the setMaximizedURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
setMaximizedURL in interface Portlet
Overrides:
setMaximizedURL in class PortletJspBean
Parameters:
ignore - This parameter is ignored and the attribute is set to an empty string.

getBannerURL

public java.lang.String getBannerURL()
Overrides the getBannerURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
getBannerURL in interface Portlet
Overrides:
getBannerURL in class PortletJspBean
Returns:
Always returns an empty string.

setBannerURL

public void setBannerURL(java.lang.String ignore)
Overrides the setBannerURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
setBannerURL in interface Portlet
Overrides:
setBannerURL in class PortletJspBean
Parameters:
ignore - This parameter is ignored and the attribute is set to an empty string.

getAlternateHeaderURL

public java.lang.String getAlternateHeaderURL()
Overrides the getAlternateHeaderURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
getAlternateHeaderURL in interface Portlet
Overrides:
getAlternateHeaderURL in class PortletJspBean
Returns:
Always returns an empty string.

setAlternateHeaderURL

public void setAlternateHeaderURL(java.lang.String ignore)
Overrides the setAlternateHeaderURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
setAlternateHeaderURL in interface Portlet
Overrides:
setAlternateHeaderURL in class PortletJspBean
Parameters:
ignore - This parameter is ignored and the attribute is set to an empty string.

getAlternateFooterURL

public java.lang.String getAlternateFooterURL()
Overrides the getAlternateFooterURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
getAlternateFooterURL in interface Portlet
Overrides:
getAlternateFooterURL in class PortletJspBean
Returns:
Always returns an empty string.

setAlternateFooterURL

public void setAlternateFooterURL(java.lang.String ignore)
Overrides the setAlternateFooterURL method in the PortletJspBean class since this class does not support this attribute.
Specified by:
setAlternateFooterURL in interface Portlet
Overrides:
setAlternateFooterURL in class PortletJspBean
Parameters:
ingore - This parameter is ignored and the attribute is set to an empty string.

isAvailable

public boolean isAvailable()
Returns true if available, false if not.
Specified by:
isAvailable in interface Portlet
Overrides:
isAvailable in class PortletJspBean
Returns:
true if available, false if not

setAvailable

public void setAvailable(boolean isAvailable)
Sets the Available attribute
Specified by:
setAvailable in interface Portlet
Overrides:
setAvailable in class PortletJspBean
Parameters:
isAvailable - boolean value for the isAvailable attribute.

calcNumRows

public int calcNumRows(int numToDisplay,
                       int numOfCols)
Determines the number of rows needed to display a set of portlets in an Admin Tool.
Parameters:
numToDisplay - The number of items to display that need to be laid out in rows.
maxCols - The maximum number of columns to display.
Returns:
The number of rows.

makeDisplayNamesTable

public java.lang.String[][] makeDisplayNamesTable(int rows,
                                                  int cols,
                                                  java.lang.String[] names)
Takes an array of string names and puts them into rows and columns
Parameters:
numToDisplay - The number of items to display that need to be laid out in rows.
rows - The number of rows in the output array.
cols - The number of cols in the output array.
names - An array of string names to display.
Returns:
A 2 dimensional array of String names where the 2D array represents a table or 2D matrix.

calcNumCols

public int calcNumCols(int numToDisplay,
                       int maxCols)
Determines the number of columns needed to display a set of portlets.
Parameters:
numToDisplay - The number of items to display that need to be laid out in rows and columns.
maxCols - The maximum number of columns to display.
Returns:
The number of columns

updatePortalWithPortlets

public boolean updatePortalWithPortlets(javax.servlet.http.HttpServletRequest request,
                                        Portal portal,
                                        java.lang.String[] existingPortlets,
                                        java.lang.String[] schemaPortlets)
Updates/Adds/removes portlets to/from the Portal Personalization persistent information.
Parameters:
request - The HTTP request received by the JSP page associated with this bean.
portal - The Portal object associated with the request.
existingPortlets - A String array of portlet names that represent the existing available portlets for the portal.
schemaPortlets - A String array of portlet names that represent the complete set of defined portlets (portlet definitions)
Returns:
true if sucessful, false if not.

updatePortalWithPortlet

public java.lang.String updatePortalWithPortlet(java.lang.String aPortalName)
Updates/Adds/removes a portlet to a portal
Parameters:
aPortalName - The name of the portal.
Returns:
null if no error, else an error string.

updatePortalPortlet

public final boolean updatePortalPortlet(java.lang.String thePortalName,
                                         Portlet thePortlet)
A convenience method only.
Parameters:
thePortalName - The name of the portal to update.
thePortlet - The portlet reference to update.
Returns:
true if successful; false if not.

validate

public java.lang.String validate()
Validates the attributes of this bean.
Overrides:
validate in class PortletJspBean
Returns:
An error string if an error, else it returns null if sucessful.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved