BEA Systems, Inc.

com.beasys.portal.ejb
Class PortalManagerBean

java.lang.Object
  |
  +--com.beasys.portal.ejb.PortalManagerBean

public class PortalManagerBean
extends java.lang.Object
implements javax.ejb.SessionBean, PortalConstants

Copyright (c) 2000 BEA Systems, Inc. All Rights Reserved Wrapper interface for getting portal and administration data.

See Also:
Serialized Form

Field Summary
protected  javax.ejb.SessionContext ctx
          The ejb session context.
protected  java.util.Hashtable props
          Properties from the session bean descriptor.
 
Fields inherited from interface com.beasys.portal.ejb.PortalConstants
ALGORITHM, COLUMN_INFORMATION, DEFAULT_CATEGORY_NAME, GROUP_HIERARCHY, GROUP_PERSONALIZATION, MAX_QUERIED_USERS, NAME_MAX, PORTAL_COLUMN_MAX, PORTAL_DEFINITION, PORTAL_GROUP_HIERARCHY, PORTAL_HIERARCHY, PORTAL_MANAGER, PORTAL_PERSONALIZATION, PORTAL_PROPERTIES, PORTAL_SIGN_ON, PORTAL_USER_PROFILE, PORTLET_DEFINITION, SEPARATOR, URL_MAX, USER_HIERARCHY, USER_PERSONALIZATION
 
Fields inherited from interface com.beasys.util.ToolkitConstants
DEFAULT_ID_CACHE, DEFAULT_ID_PROCEDURE, DEFAULT_JDBC_POOL_NAME, DEFAULT_LOGGING_LEVEL, DEFAULT_WEBLOGIC_HOST, DEFAULT_WEBLOGIC_PORT, ID_CACHE, ID_PROCEDURE, JDBC_POOL_NAME, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_SECURITY, LOG_WARNING, LOGGING_LEVEL, WEBLOGIC_HOST, WEBLOGIC_PORT
 
Constructor Summary
PortalManagerBean()
           
 
Method Summary
 void addGroupToGroup(java.lang.String aParentGroupId, java.lang.String aGroupId)
          Create a group for a parent group.
 void addGroupToPortal(java.lang.String aPortalName, java.lang.String aGroupId)
          Create a group for a portal.
protected  void addGroupUser(java.lang.String aPortalId, java.lang.String aGroupId, java.lang.String aUserId)
          Add a user to a group.
protected  void addPortalUser(java.lang.String aPortalId, java.lang.String aUserId)
          Add a user to a portal.
 void addPortletTo(Portlet aPortlet, Portal aPortal)
          Add a portlet to a portal.
protected  void addPortletTo(Portlet aPortlet, java.lang.String aPortal)
          Add a portlet to a portal name.
 void addUserToGroup(java.lang.String aPortalId, java.lang.String aGroupId, java.lang.String aUserId)
          Add a user name to a particular group.
 void addUserToPortal(java.lang.String aPortalId, java.lang.String aUserId)
          Add a user name to a particular portal.
protected  Portlet[] availablePortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUser, boolean careAboutVisible)
          Get all of the available portlets associated to a portal and group if groupName is set.
protected  void copyInto(PortalDefinition sso, Portal portal)
          Copy a portal definition (ejb) into lightweight container class.
protected  void copyInto(PortalPersonalization aPD, Portlet aPortlet)
          Copy a PortalPersonalization into a simple copy.
protected  void copyInto(PortletDefinition aPD, Portlet aPortlet)
          Copy a PortletDefinition into a simple copy.
protected  void copyInto(UserPersonalization aPD, Portlet aPortlet)
          Copy a UserPersonalization into a simple copy.
 void createCredentials(Credentials someCredentials)
          Persist a new set of credentials.
 java.lang.String createGroupProfileKey(java.lang.String portalName, java.lang.String groupName)
          Create the group profile key.
 void createPortal(Portal aPortal)
          Persist a new portal.
 void createPortlet(Portlet aPortlet)
          Persist a new portlet.
 void createPortletForGroup(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, Portlet aPortlet)
          Create a GroupPersonalization for a portal and a group.
 void createPortletForPortal(java.lang.String aPortalName, java.lang.String aCategoryName, Portlet aPortlet)
          Create a PortalPersonalization for a portlet.
 void createPortletForUser(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUserName, Portlet aPortlet)
          Create a UserPersonalization for a portal, group, and user.
 java.lang.String createUserProfileKey(java.lang.String portalName, java.lang.String userName)
          Create the user profile key.
protected  void doContainerPersonalization(java.lang.String aPortalName, java.util.Hashtable portletMap)
          Handle personalizing the portlet from the PortletDefinition.
protected  void doDefaultColumnInformation(Portal aPortal, java.lang.String aCategoryName)
          Set the default column information for a portal.
protected  void doGroupPersonalization(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.util.Hashtable portletMap)
          Handle personalizing the portlet for the portal and group.
protected  void doPortalPersonalization(java.lang.String aPortalName, java.lang.String aCategory, java.util.Hashtable portletMap)
          Handle personalizing the portlet for the portal.
protected  void doUserPersonalization(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUserId, java.util.Hashtable portletMap)
          Handle personalizing the portlet for the portal, group, and user.
 void ejbActivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbCreate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbPassivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbRemove()
          This method is required by the EJB Specification, but is not used by this example.
protected  void enumerationSweeper(java.util.Enumeration e)
          Clean an enumeration.
 PortalColumnInformation[] fastGetColumnInformationFor(java.lang.String aPortalName, java.lang.String aCategoryName)
          Using straight JDBC.
 Portal fastGetPortalFor(java.lang.String aName)
          Using straight JDBC.
 Portlet[] fastGetPortletDefinitionsFor(java.lang.String aPortalName)
          Using straight JDBC.
 Portlet[] fastGetPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName)
          Using straight JDBC.
 Portlet[] fastGetPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName)
          Using straight JDBC.
 Portlet[] fastGetPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUserId)
          Using straight JDBC.
 Portlet[][] fastGetRCPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUserId)
          Using straight JDBC.
protected  void finishTransaction(javax.jts.UserTransaction tx, java.lang.String aMethodName)
          Finish a transaction.
 java.lang.String[] getAllUserNamesForGroup(java.lang.String aPortalId, java.lang.String aGroupId)
          Gets all user names associated with a particular group.
 Portlet[] getAvailablePortletsFor(java.lang.String aPortalName, java.lang.String aCategory)
          Get all of the available portlets associated to a portal.
 Portlet[] getAvailablePortletsFor(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName)
          Get all of the available portlets associated to a portal and a group.
 Portlet[] getAvailablePortletsFor(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUserName)
          Get all of the available portlets associated to a portal, a group, and a user.
 PortalColumnInformation[] getColumnInformationFor(java.lang.String aPortalName, java.lang.String aCategoryName)
          Get the column information (sizes) for a given portal and category.
 Credentials[] getCredentialsFor(java.lang.String aUserId)
          Get all of the credentials for a user.
 Credentials[] getCredentialsFor(java.lang.String aUserId, java.lang.String aPortalName)
          Get all of the credentials for a user and a system.
 Credentials getCredentialsFor(java.lang.String aUserId, java.lang.String aPortalName, java.lang.String aSystemName, java.lang.String aSystemUserId)
          Get all of the credentials for a user and a system.
 java.lang.String[] getGroupIdsForGroup(java.lang.String aParentGroupId)
          Get the groups associated to a parent group
 java.lang.String[] getGroupIdsForPortal(java.lang.String aPortalName)
          Get the groups associated to a portal
 java.lang.String[] getGroupNamesForUser(java.lang.String aPortalId, java.lang.String aUserId)
          Get the group names to which a particular user belongs.
protected  java.lang.String[] getPNamesFor(java.lang.String aName, boolean findPortalsForPortlet)
          Get the portal or portlet name based on whether you are finding by portal or by portlet.
 Portal getPortalFor(java.lang.String aName)
          Get a portal from the name.
 java.lang.String[] getPortalNamesFor(java.lang.String aPortletName)
          Get the portal names associated to a portlet.
 PortalProperties getPortalProperties()
          Get the portal properties
 Portal[] getPortals()
          Get all of the portals defined within a system.
 Portlet[] getPortletDefinitionsFor(java.lang.String aPortalName)
          Get all of the portlets (definitions) associated to a portal, it is just the PORTLET_DEFINITION.
 Portlet getPortletFor(java.lang.String aPortlet)
          Get the PortletDefinition for the name.
 Portlet getPortletForGroup(java.lang.String aPortal, java.lang.String aCategoryName, java.lang.String aGroup, java.lang.String aPortlet)
          Get the GroupPersonalization for the name.
 Portlet getPortletForGroup(java.lang.String aPortal, java.lang.String aCategory, java.lang.String aGroup, java.lang.String aPortlet, boolean isWaterfall)
          Get the GroupPersonalization for the name.
 Portlet getPortletForPortal(java.lang.String aPortal, java.lang.String aCategory, java.lang.String aPortlet)
          Get the PortalPersonalization for the name.
 Portlet getPortletForPortal(java.lang.String aPortal, java.lang.String aCategory, java.lang.String aPortlet, boolean isWaterfall)
          Get the PortalPersonalization for the name.
 Portlet getPortletForUser(java.lang.String aPortal, java.lang.String aCategory, java.lang.String aGroup, java.lang.String aUser, java.lang.String aPortlet)
          Get the UserPersonalization for the name.
 Portlet getPortletForUser(java.lang.String aPortal, java.lang.String aCategory, java.lang.String aGroup, java.lang.String aUser, java.lang.String aPortlet, boolean isWaterfall)
          Get the UserPersonalization for the name.
 java.lang.String[] getPortletNamesFor(java.lang.String aPortalName)
          Get the portlet names associated to a portal.
 Portlet[] getPortlets()
          Get all of the portlets (PortletDefinition) defined within a system.
 Portlet[][] getRCPortletsFor(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUserId)
          Get all of the portlets related to a PortalName, aGroup and a user.
 int getUserCountForGroup(java.lang.String aPortalId, java.lang.String aGroupId)
          Get a count of users for a particular portal-group combination.
 int getUserCountForPortal(java.lang.String aPortalId)
          Get a count of users for a particular portal.
protected  java.lang.String[] getUserGroupNames(java.lang.String aPortalId, java.lang.String aUserId)
          Retrieve all of the group user names.
 Portlet[] getVisiblePortletsFor(java.lang.String aPortalName, java.lang.String aCategory)
          Get all of the available and visible portlets associated to a portal.
 Portlet[] getVisiblePortletsFor(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName)
          Get all of the available and visible portlets associated to a portal and a group.
 Portlet[] getVisiblePortletsFor(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUserName)
          Get all of the available and visible portlets associated to a portal, a group, and a user.
protected  void groupSweeper(java.lang.String aGroup)
          If a group is removed, go through and cleanup all references to the group.
 java.lang.String portalCreateCredentials(java.lang.String portalName, java.lang.String userName, java.lang.String password)
          Create the credentials for a user.
protected  void portalPortletSweeper(java.lang.String aPortal, java.lang.String aPortlet)
          If a portlet is removed, go through and cleanup all references to the portlet.
 java.lang.String portalSignOn(java.lang.String portalName, java.lang.String userName, java.lang.String password)
          Check the signon for a portal.
protected  void portalSweeper(java.lang.String aPortal)
          If a portal is removed, go through and cleanup all references to the portal.
 java.lang.String portalUpdateCredentials(java.lang.String portalName, java.lang.String userName, java.lang.String oldPassword, java.lang.String password)
          Update the credentials for a user..
protected  void portletSweeper(java.lang.String aPortlet)
          If a portlet is removed, go through and cleanup all references to the portlet.
protected  void removeColumnInformationFor(java.lang.String aPortalName)
          Remove the column information.
 void removeCredentials(Credentials someCredentials)
          Remove a Set of credentials.
 void removeGroupForPortal(java.lang.String aPortalName, java.lang.String aGroupId)
          Remove a group from the portal.
protected  void removeGroupUser(java.lang.String aPortalId, java.lang.String aGroupId, java.lang.String aUserId)
          Remove a user from the group.
 void removePortal(Portal aPortal)
          Remove a portal.
 void removePortlet(Portlet aPortlet)
          Remove a portlet.
 void removePortletForGroup(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, Portlet aPortlet)
          Remove a GroupPersonalization for a portal and a group.
 void removePortletForPortal(java.lang.String aPortalName, java.lang.String aCategory, Portlet aPortlet)
          Remove a PortalPersonalization for a portlet.
 void removePortletForUser(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUserName, Portlet aPortlet)
          Remove a UserPersonalization for a portal, group, and user.
 void removePortletFrom(Portlet aPortlet, Portal aPortal)
          remove a portlet from a portal.
protected  void removePortletFrom(Portlet aPortlet, java.lang.String aPortalName)
          Remove the portlet/portal from the hierarchy.
 void removeUserFromGroup(java.lang.String aPortalId, java.lang.String aGroupId, java.lang.String aUserId)
          Remove a user name from a particular group.
 void removeUserFromPortal(java.lang.String aPortalId, java.lang.String aUserId)
          Remove a user name from a particular group.
 java.lang.String[] searchGroupForUsers(java.lang.String aPortalId, java.lang.String aGroupId, java.lang.String search)
          Get the user names associated with a particular group, based on a particular search string.
 java.lang.String[] searchPortalForUsers(java.lang.String aPortalId, java.lang.String search)
          Get the user names associated with a particular portal, based on a particular search string.
 void setColumnInformationFor(Portal aPortal, java.lang.String aCategory, PortalColumnInformation[] someColumnInformation)
          Set the column information for a portal.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets the session context.
protected  javax.jts.UserTransaction startTransaction()
          Start a bean managed UserTransaction.
protected  void update(GroupPersonalization gp, Portlet aPortlet)
          Update the ejb with a value from the lightweight object.
protected  void update(PortalDefinition pd, Portal aPortal)
          Update the ejb with a value from the lightweight object.
protected  void update(PortalPersonalization pp, Portlet aPortlet)
          Update the ejb with a value from the lightweight object.
protected  void update(PortletDefinition pd, Portlet aPortlet)
          Update the ejb with a value from the lightweight object.
protected  void update(UserPersonalization up, Portlet aPortlet)
          Update the ejb with a value from the lightweight object.
 void updateCredentials(Credentials someCredentials)
          Update a set of credentials.
 void updatePortal(Portal aPortal)
          Update a portal.
 void updatePortlet(Portlet aPortlet)
          Update a portlet.
 void updatePortletForGroup(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, Portlet aPortlet)
          Update a GroupPersonalization for a portal and a group.
 void updatePortletForGroup(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, Portlet aPortlet, boolean createIfNotFound)
          Update a Group Personalization for a portlet.
 void updatePortletForPortal(java.lang.String aPortalName, java.lang.String aCategory, Portlet aPortlet)
          Update a PortalPersonalization for a portlet.
 void updatePortletForPortal(java.lang.String aPortalName, java.lang.String aCategory, Portlet aPortlet, boolean createIfNotFound)
          Update a PortalPersonalization for a portlet.
 void updatePortletForUser(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUserName, Portlet aPortlet)
          Update a UserPersonalization for a portal, group, and user.
 void updatePortletForUser(java.lang.String aPortalName, java.lang.String aCategory, java.lang.String aGroupName, java.lang.String aUser, Portlet aPortlet, boolean createIfNotFound)
          Update a PortalPersonalization for a portlet.
protected  void userSweeper(java.lang.String aUser)
          If a user is removed (completely removed), go through and cleanup all references to the user
protected  void userSweeper(java.lang.String aUser, java.lang.String aPortalName)
          If a user is removed, go through and cleanup all references to the user and portal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

protected transient javax.ejb.SessionContext ctx
The ejb session context.

props

protected transient java.util.Hashtable props
Properties from the session bean descriptor.
Constructor Detail

PortalManagerBean

public PortalManagerBean()
Method Detail

ejbActivate

public void ejbActivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public final void setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - SessionContext Context for session

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
This method is required by the EJB Specification, but is not used by this example.

getCredentialsFor

public Credentials getCredentialsFor(java.lang.String aUserId,
                                     java.lang.String aPortalName,
                                     java.lang.String aSystemName,
                                     java.lang.String aSystemUserId)
                              throws java.rmi.RemoteException,
                                     PortalException,
                                     PortalFinderException,
                                     PortalObjectNotFoundException
Get all of the credentials for a user and a system.
Parameters:
the - user
the - system to get the user credentials for.
Returns:
Credentials
Throws:
PortalObjectNotFoundException - the credentials were not found for criteria.
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getCredentialsFor

public Credentials[] getCredentialsFor(java.lang.String aUserId,
                                       java.lang.String aPortalName)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException
Get all of the credentials for a user and a system.
Parameters:
the - user
the - system to get the user credentials for.
Returns:
Credentials[] will return an empty array if none found.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getCredentialsFor

public Credentials[] getCredentialsFor(java.lang.String aUserId)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException
Get all of the credentials for a user.
Parameters:
the - user
Returns:
Credentials[] will return an empty array if none found.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

copyInto

protected void copyInto(PortalDefinition sso,
                        Portal portal)
                 throws java.rmi.RemoteException
Copy a portal definition (ejb) into lightweight container class.
Parameters:
the - PortalDefinition
the - Portal to be copied into.
Throws:
java.rmi.RemoteException - container error.

getPortalFor

public Portal getPortalFor(java.lang.String aName)
                    throws java.rmi.RemoteException,
                           PortalException,
                           PortalFinderException,
                           PortalObjectNotFoundException
Get a portal from the name.
Parameters:
aPortalName - the name of the portal to retrieve.
Returns:
Portal the portal definition
Throws:
PortalObjectNotFoundException - the credentials were not found for criteria.
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

copyInto

protected void copyInto(PortletDefinition aPD,
                        Portlet aPortlet)
                 throws java.rmi.RemoteException
Copy a PortletDefinition into a simple copy.
Parameters:
aPD - PortletDefinition
aPortlet - Portlet

copyInto

protected void copyInto(PortalPersonalization aPD,
                        Portlet aPortlet)
                 throws java.rmi.RemoteException
Copy a PortalPersonalization into a simple copy.
Parameters:
aPD - PortalPersonalization
aPortlet - Portlet

copyInto

protected void copyInto(UserPersonalization aPD,
                        Portlet aPortlet)
                 throws java.rmi.RemoteException
Copy a UserPersonalization into a simple copy.
Parameters:
aPD - UserPersonalization
aPortlet - Portlet

availablePortletsFor

protected Portlet[] availablePortletsFor(java.lang.String aPortalName,
                                         java.lang.String aCategoryName,
                                         java.lang.String aGroupName,
                                         java.lang.String aUser,
                                         boolean careAboutVisible)
                                  throws java.rmi.RemoteException,
                                         PortalException,
                                         PortalFinderException
Get all of the available portlets associated to a portal and group if groupName is set.
Parameters:
the - portal name
Returns:
all of the portals defined.
Throws:
PortalFinderException - error on query.
PortalException - general portal error.
java.rmi.RemoteException - container exception.

getAvailablePortletsFor

public Portlet[] getAvailablePortletsFor(java.lang.String aPortalName,
                                         java.lang.String aCategory)
                                  throws java.rmi.RemoteException,
                                         PortalException,
                                         PortalFinderException
Get all of the available portlets associated to a portal.
Parameters:
the - portal name
the - category
Returns:
all of the available portlets for the portal and category.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getAvailablePortletsFor

public Portlet[] getAvailablePortletsFor(java.lang.String aPortalName,
                                         java.lang.String aCategory,
                                         java.lang.String aGroupName)
                                  throws java.rmi.RemoteException,
                                         PortalException,
                                         PortalFinderException
Get all of the available portlets associated to a portal and a group.
Parameters:
the - portal name
the - category
the - group name
Returns:
all of the portals defined.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getAvailablePortletsFor

public Portlet[] getAvailablePortletsFor(java.lang.String aPortalName,
                                         java.lang.String aCategory,
                                         java.lang.String aGroupName,
                                         java.lang.String aUserName)
                                  throws java.rmi.RemoteException,
                                         PortalException,
                                         PortalFinderException
Get all of the available portlets associated to a portal, a group, and a user.
Parameters:
the - portal name
the - category
the - group name
the - user name
Returns:
all of the portals defined.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getVisiblePortletsFor

public Portlet[] getVisiblePortletsFor(java.lang.String aPortalName,
                                       java.lang.String aCategory)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException
Get all of the available and visible portlets associated to a portal.
Parameters:
the - portal name
the - category
Returns:
all of the portals defined.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getVisiblePortletsFor

public Portlet[] getVisiblePortletsFor(java.lang.String aPortalName,
                                       java.lang.String aCategory,
                                       java.lang.String aGroupName)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException
Get all of the available and visible portlets associated to a portal and a group.
Parameters:
the - portal name
the - category
the - group name
Returns:
all of the portals defined.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getVisiblePortletsFor

public Portlet[] getVisiblePortletsFor(java.lang.String aPortalName,
                                       java.lang.String aCategory,
                                       java.lang.String aGroupName,
                                       java.lang.String aUserName)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException
Get all of the available and visible portlets associated to a portal, a group, and a user.
Parameters:
the - portal name
the - category
the - group name
the - user name
Returns:
all of the portals defined.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

getPortletDefinitionsFor

public Portlet[] getPortletDefinitionsFor(java.lang.String aPortalName)
                                   throws java.rmi.RemoteException,
                                          PortalException,
                                          PortalFinderException
Get all of the portlets (definitions) associated to a portal, it is just the PORTLET_DEFINITION.
Returns:
all of the portals defined, will return an empty array if none are found.
Throws:
PortalObjectNotFoundException - the credentials were not found for criteria.
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

doContainerPersonalization

protected void doContainerPersonalization(java.lang.String aPortalName,
                                          java.util.Hashtable portletMap)
                                   throws java.rmi.RemoteException,
                                          javax.ejb.FinderException,
                                          ToolkitException,
                                          PortalException
Handle personalizing the portlet from the PortletDefinition.
Parameters:
the - portal name.
Hashtable - the portlet maps.
Throws:
java.rmi.RemoteException - general container error.
javax.ejb.FinderException - query error.
ToolkitException - error on acquiring the home.
PortalException - general portal error.

doPortalPersonalization

protected void doPortalPersonalization(java.lang.String aPortalName,
                                       java.lang.String aCategory,
                                       java.util.Hashtable portletMap)
                                throws java.rmi.RemoteException,
                                       javax.ejb.FinderException,
                                       ToolkitException
Handle personalizing the portlet for the portal.
Parameters:
the - portal name.
the - category
Hashtable - the portlet maps.
Throws:
java.rmi.RemoteException - general container error.
javax.ejb.FinderException - error on query.
ToolkitException - error acquiring home interface.

doGroupPersonalization

protected void doGroupPersonalization(java.lang.String aPortalName,
                                      java.lang.String aCategory,
                                      java.lang.String aGroupName,
                                      java.util.Hashtable portletMap)
                               throws java.rmi.RemoteException,
                                      javax.ejb.FinderException,
                                      ToolkitException
Handle personalizing the portlet for the portal and group.
Parameters:
the - portal name.
the - category
the - group
Hashtable - the portlet maps.
Throws:
java.rmi.RemoteException - container error.
javax.ejb.FinderException - error on query.
ToolkitException - error on acquiring home interface.

doUserPersonalization

protected void doUserPersonalization(java.lang.String aPortalName,
                                     java.lang.String aCategory,
                                     java.lang.String aGroupName,
                                     java.lang.String aUserId,
                                     java.util.Hashtable portletMap)
                              throws java.rmi.RemoteException,
                                     javax.ejb.FinderException,
                                     ToolkitException
Handle personalizing the portlet for the portal, group, and user.
Parameters:
the - portal name.
the - group
the - user
Hashtable - the portlet maps.
Throws:
java.rmi.RemoteException - container error.
javax.ejb.FinderException - error on query.
ToolkitException - error on acquiring home interfance.

getRCPortletsFor

public Portlet[][] getRCPortletsFor(java.lang.String aPortalName,
                                    java.lang.String aCategory,
                                    java.lang.String aGroupName,
                                    java.lang.String aUserId)
                             throws java.rmi.RemoteException,
                                    PortalException,
                                    PortalFinderException
Get all of the portlets related to a PortalName, aGroup and a user. This method will pull all of the personalizations for each level in the portlet definition that is returned. It sorts them according to their row/column values.
Parameters:
the - portal name
the - category
the - group name
the - user id
Returns:
Portlet[][] the rows and columns of information for the user. Will return an empty array if none available.
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

startTransaction

protected javax.jts.UserTransaction startTransaction()
                                              throws ToolkitException
Start a bean managed UserTransaction. This method checks to see if there is an active transaction. If there is it will be null, otherwise it will return the user transaction attached to the context (if bean managed) or the user transaction returned from the JNDI lookup. It will return null if there is an active transaction.
Returns:
the user transaction, will return null if there is already an active transaction.
Throws:
ToolkitException - error retrieving the UserTransaction from a JNDI lookup.

finishTransaction

protected void finishTransaction(javax.jts.UserTransaction tx,
                                 java.lang.String aMethodName)
                          throws javax.jts.HeuristicMixedException,
                                 javax.jts.HeuristicRollbackException,
                                 javax.jts.TransactionRolledbackException
Finish a transaction.
Parameters:
the - user transaction to end.
the - method name. This is used for log messages to identify where the transaction is ending.
Throws:
javax.jts.HeuristicMixedException -  
javax.jts.HeuristicRollbackException -  
javax.jts.TransactionRolledbackException -  

getColumnInformationFor

public PortalColumnInformation[] getColumnInformationFor(java.lang.String aPortalName,
                                                         java.lang.String aCategoryName)
                                                  throws java.rmi.RemoteException,
                                                         PortalException,
                                                         PortalFinderException
Get the column information (sizes) for a given portal and category.
Parameters:
String - the portal name.
the - category
Returns:
PortalColumnInformation[] the column sizes in the correct order
Throws:
PortalFinderException - error on query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

update

protected void update(PortalDefinition pd,
                      Portal aPortal)
               throws java.rmi.RemoteException
Update the ejb with a value from the lightweight object.
Parameters:
pd - the portal definition (ejb)
aPortal - the portal object (lightweight)
Throws:
java.rmi.RemoteException - container error.

removeColumnInformationFor

protected void removeColumnInformationFor(java.lang.String aPortalName)
                                   throws java.rmi.RemoteException,
                                          PortalException,
                                          PortalRemoveException
Remove the column information.
Parameters:
aPortalName - the portal name.
Throws:
java.rmi.RemoteException - container error.
PortalException - general portal error.
PortalRemoveException - error removing the column information.

setColumnInformationFor

public void setColumnInformationFor(Portal aPortal,
                                    java.lang.String aCategory,
                                    PortalColumnInformation[] someColumnInformation)
                             throws java.rmi.RemoteException,
                                    PortalException,
                                    PortalRemoveException,
                                    PortalCreateException
Set the column information for a portal. This method assumes that the order of the array matches the columnOrder specified within the PortalColumnInformation.
Parameters:
the - portal.
the - category.
the - new column information.
Throws:
PortalCreateException - Could not recreate the column information.
PortalException - general error.
java.rmi.RemoteException - error within the container.

doDefaultColumnInformation

protected void doDefaultColumnInformation(Portal aPortal,
                                          java.lang.String aCategoryName)
                                   throws java.rmi.RemoteException,
                                          javax.ejb.RemoveException,
                                          ToolkitException,
                                          javax.ejb.CreateException,
                                          PortalException,
                                          PortalRemoveException
Set the default column information for a portal. This is just 100/number of columns.
Parameters:
aPortal - the portal.
aCategoryName - the category name.
Throws:
java.rmi.RemoteException - container exception.
javax.ejb.RemoveException - error removing the column information.
ToolkitException - error retrieving information from the JNDI lookup.
javax.ejb.CreateException - error creating the column information.
PortalException - general portal error.
PortalRemoveException - error removing the column information (portal level error).

createPortal

public void createPortal(Portal aPortal)
                  throws java.rmi.RemoteException,
                         PortalException,
                         PortalCreateException
Persist a new portal.
Parameters:
aPortal - a portal instance.
Throws:
PortalCreateException - Could not create the exception.
PortalException - general error.
java.rmi.RemoteException - error within the container.

updatePortal

public void updatePortal(Portal aPortal)
                  throws java.rmi.RemoteException,
                         PortalException,
                         PortalFinderException,
                         PortalObjectNotFoundException
Update a portal.
Parameters:
aPortal - a portal instance.
Throws:
PortalObjectNotFoundException - the portal could not be found
PortalFinderException - error on the query.
PortalException - general error.
java.rmi.RemoteException - error within the container.

removePortal

public void removePortal(Portal aPortal)
                  throws java.rmi.RemoteException,
                         PortalException,
                         PortalFinderException,
                         PortalObjectNotFoundException,
                         PortalRemoveException
Remove a portal.
Parameters:
aPortal - a portal instance.
Throws:
PortalObjectNotFoundException - the portal could not be found
PortalFinderException - error on the query.
PortalRemoveException - error removing the portal.
PortalException - general error.
java.rmi.RemoteException - error within the container.

userSweeper

protected void userSweeper(java.lang.String aUser)
                    throws java.rmi.RemoteException,
                           ToolkitException,
                           javax.ejb.RemoveException,
                           javax.ejb.FinderException
If a user is removed (completely removed), go through and cleanup all references to the user
Parameters:
aUser - the user to clean up for.
Throws:
RemoteExcepton - container error.
ToolkitException - error looking up the user.
javax.ejb.RemoveException - error removing the user.
javax.ejb.FinderException - error on the query.

userSweeper

protected void userSweeper(java.lang.String aUser,
                           java.lang.String aPortalName)
                    throws java.rmi.RemoteException,
                           ToolkitException,
                           javax.ejb.RemoveException,
                           javax.ejb.FinderException
If a user is removed, go through and cleanup all references to the user and portal
Parameters:
aUser - the user to clean up for.
aPortalName - the portal to clean up for.
Throws:
RemoteExcepton - container error.
ToolkitException - error looking up the user.
javax.ejb.RemoveException - error removing the user.
javax.ejb.FinderException - error on the query.

groupSweeper

protected void groupSweeper(java.lang.String aGroup)
                     throws java.rmi.RemoteException,
                            ToolkitException,
                            javax.ejb.RemoveException,
                            javax.ejb.FinderException
If a group is removed, go through and cleanup all references to the group.
Parameters:
aGroup - the group to clean up for.
Throws:
RemoteExcepton - container error.
ToolkitException - error looking up the group.
javax.ejb.RemoveException - error removing the group.
javax.ejb.FinderException - error on the query.

portletSweeper

protected void portletSweeper(java.lang.String aPortlet)
                       throws java.rmi.RemoteException,
                              ToolkitException,
                              javax.ejb.RemoveException,
                              javax.ejb.FinderException
If a portlet is removed, go through and cleanup all references to the portlet.
Parameters:
the - portlet to clean up for.
Throws:
RemoteExcepton - container error.
ToolkitException - error looking up the portlet.
javax.ejb.RemoveException - error removing the portlet.
javax.ejb.FinderException - error on the query.

portalSweeper

protected void portalSweeper(java.lang.String aPortal)
                      throws java.rmi.RemoteException,
                             ToolkitException,
                             javax.ejb.RemoveException,
                             javax.ejb.FinderException
If a portal is removed, go through and cleanup all references to the portal.
Parameters:
aPortal - the portal to clean up for.
Throws:
RemoteExcepton - container error.
ToolkitException - error looking up the portal.
javax.ejb.RemoveException - error removing the portal.
javax.ejb.FinderException - error on the query.

enumerationSweeper

protected void enumerationSweeper(java.util.Enumeration e)
                           throws java.rmi.RemoteException,
                                  javax.ejb.RemoveException
Clean an enumeration. We don't override the remove, so lets do the enumeration in one place.
Parameters:
the - enumeration to remove.
Throws:
javax.ejb.RemoveException - error removing an item in the enumeration.
javax.ejb.FinderException - error on the query.

update

protected void update(PortletDefinition pd,
                      Portlet aPortlet)
               throws java.rmi.RemoteException
Update the ejb with a value from the lightweight object.
Parameters:
pd - the portlet definition (ejb)
aPortlet - the portlet object (lightweight)
Throws:
java.rmi.RemoteException - container error.

createPortlet

public void createPortlet(Portlet aPortlet)
                   throws java.rmi.RemoteException,
                          PortalException,
                          PortalCreateException
Persist a new portlet.
Parameters:
aPortal - a portal instance.
Throws:
PortalCreateException - error creating the portlet.
PortalException - general error.
java.rmi.RemoteException - error within the container.

updatePortlet

public void updatePortlet(Portlet aPortlet)
                   throws java.rmi.RemoteException,
                          PortalException,
                          PortalFinderException,
                          PortalObjectNotFoundException
Update a portlet.
Parameters:
aPortal - a portal instance.
Throws:
PortalObjectNotFoundException - Could not find the portlet definition.
PortalFinderException - error retrieving information.
PortalException - general error.
java.rmi.RemoteException - error within the container.

removePortlet

public void removePortlet(Portlet aPortlet)
                   throws java.rmi.RemoteException,
                          PortalException,
                          PortalFinderException,
                          PortalObjectNotFoundException,
                          PortalRemoveException
Remove a portlet.
Parameters:
aPortal - a portal instance.
Throws:
PortalObjectNotFoundException - Could not find the portlet.
PortalFinderException - error retrieving information.
PortalRemoveException - error removing the portlet.
PortalException - general error.
java.rmi.RemoteException - error within the container.

update

protected void update(PortalPersonalization pp,
                      Portlet aPortlet)
               throws java.rmi.RemoteException
Update the ejb with a value from the lightweight object.
Parameters:
pp - the portal personalization (ejb)
aPortlet - the portlet object (lightweight)
Throws:
java.rmi.RemoteException - container error.

createPortletForPortal

public void createPortletForPortal(java.lang.String aPortalName,
                                   java.lang.String aCategoryName,
                                   Portlet aPortlet)
                            throws java.rmi.RemoteException,
                                   PortalException,
                                   PortalCreateException
Create a PortalPersonalization for a portlet. Also add the reference in PortalHierarchy
Parameters:
aPortal - a portal name.
the - category
the - portlet to create
Throws:
PortalCreateException - error creating the portlet.
PortalException - general error.
java.rmi.RemoteException - error within the container.

updatePortletForPortal

public void updatePortletForPortal(java.lang.String aPortalName,
                                   java.lang.String aCategory,
                                   Portlet aPortlet)
                            throws java.rmi.RemoteException,
                                   PortalException,
                                   PortalFinderException,
                                   PortalObjectNotFoundException
Update a PortalPersonalization for a portlet.
Parameters:
aPortal - a portal name.
the - category
the - portlet to create
Throws:
PortalObjectNotFoundException - could not find the portal personalization.
PortalFinderException - error getting information for the portal personalization.
PortalException - general error.
java.rmi.RemoteException - error within the container.