BEA Systems, Inc.

com.beasys.portal.ejb
Class FastPortalManager

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

public class FastPortalManager
extends java.lang.Object
implements PortalConstants

Sample class to illustrate code template.


Field Summary
protected static java.lang.String COLUMN_INFORMATION_SQL
           
protected static java.lang.String GROUP_PERSONALIZATION_EXTRA_SQL
           
protected static java.lang.String GROUP_PERSONALIZATION_SQL
           
protected static java.lang.String PORTAL_COLUMN_COUNT
           
protected static java.lang.String PORTAL_SQL
           
protected static java.lang.String PORTAL_USERS_SQL
           
protected static java.lang.String USER_COUNT_PORTAL_SQL
           
protected static java.lang.String USER_COUNT_SQL
           
protected static java.lang.String USER_PERSONALIZATION_EXTRA_SQL
           
protected static java.lang.String USER_PERSONALIZATION_SQL
           
 
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
FastPortalManager()
           
 
Method Summary
protected static Portlet[][] assignToRC(int numCols, java.util.Hashtable portletMap)
          Now sort the portlets by row and column and visibility.
protected static void closeStatement(java.sql.PreparedStatement ps)
          Close statement.
protected static java.sql.PreparedStatement createStatement(java.lang.String aQuery, java.lang.String aSubQuery, com.sun.java.util.collections.LinkedList portletNames, java.lang.String[] params, java.sql.Connection c)
          Create a prepared statement.
protected static int findMaxLength(com.sun.java.util.collections.LinkedList[] vectors)
          Find the longest column size.
static PortalColumnInformation[] getColumnInformationFor(java.lang.String aPortalName, java.lang.String aCategoryName)
           
static int getPortalColumnCount(java.lang.String aPortalName, java.sql.Connection aConnection)
          Get portal column count.
static Portal getPortalFor(java.lang.String aPortal)
           
static Portlet[] getPortletDefinitionsFor(java.lang.String aPortalName)
           
static Portlet[] getPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName)
           
static Portlet[] getPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName)
           
static Portlet[] getPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUserId)
           
static Portlet[][] getRCPortletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUserId)
           
static int getUserCountForGroup(java.lang.String aPortalId, java.lang.String aGroupId)
          Get a count of users for a particular portal-group combination.
static int getUserCountForPortal(java.lang.String aPortalId)
          Get a count of users for a particular portal.
protected static void groupPersonalizationsForPortletNames(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, com.sun.java.util.collections.LinkedList ll, java.sql.Connection c, java.util.Hashtable portletMap)
           
protected static void portalPersonalizationsForPortletNames(java.lang.String aPortalName, java.lang.String aCategoryName, com.sun.java.util.collections.LinkedList ll, java.sql.Connection c, java.util.Hashtable portletMap)
          Portal personalizations for portlet names.
protected static void portletDefinitionsForPortletNames(com.sun.java.util.collections.LinkedList ll, java.sql.Connection c, java.util.Hashtable portletMap)
          Portlet definitions for portlet names.
protected static java.util.Hashtable portletsFor(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUserId, boolean onlyDefinitions)
           
protected static com.sun.java.util.collections.LinkedList portletsForPortal(java.lang.String aPortalName, java.sql.Connection aConnection)
          Get the portlets for a portal.
static java.lang.String[] searchGroupForUsers(java.lang.String aPortalId, java.lang.String aGroupId, java.lang.String search, boolean enforceLimits)
          Get the user names associated with a particular group, based on a particular search string.
static 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.
protected static Portlet[] toArray(java.util.Hashtable aHashtable)
           
protected static void userPersonalizationsForPortletNames(java.lang.String aPortalName, java.lang.String aCategoryName, java.lang.String aGroupName, java.lang.String aUser, com.sun.java.util.collections.LinkedList ll, java.sql.Connection c, java.util.Hashtable portletMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GROUP_PERSONALIZATION_SQL

protected static final java.lang.String GROUP_PERSONALIZATION_SQL

GROUP_PERSONALIZATION_EXTRA_SQL

protected static final java.lang.String GROUP_PERSONALIZATION_EXTRA_SQL

USER_PERSONALIZATION_SQL

protected static final java.lang.String USER_PERSONALIZATION_SQL

USER_PERSONALIZATION_EXTRA_SQL

protected static final java.lang.String USER_PERSONALIZATION_EXTRA_SQL

PORTAL_COLUMN_COUNT

protected static final java.lang.String PORTAL_COLUMN_COUNT

USER_COUNT_PORTAL_SQL

protected static final java.lang.String USER_COUNT_PORTAL_SQL

USER_COUNT_SQL

protected static final java.lang.String USER_COUNT_SQL

PORTAL_USERS_SQL

protected static final java.lang.String PORTAL_USERS_SQL

PORTAL_SQL

protected static final java.lang.String PORTAL_SQL

COLUMN_INFORMATION_SQL

protected static final java.lang.String COLUMN_INFORMATION_SQL
Constructor Detail

FastPortalManager

public FastPortalManager()
Method Detail

getPortalColumnCount

public static int getPortalColumnCount(java.lang.String aPortalName,
                                       java.sql.Connection aConnection)
                                throws java.sql.SQLException
Get portal column count.
Parameters:
aPortalName - the portal name.
aConnection - the connection
Returns:
int the column count.
Throws:
SQLException - error within JDBC.

assignToRC

protected static Portlet[][] assignToRC(int numCols,
                                        java.util.Hashtable portletMap)
Now sort the portlets by row and column and visibility.
Parameters:
the - portal name.
Hashtable - the portlet maps.
Returns:
the portlets into a 2 dimensional RC array.

findMaxLength

protected static int findMaxLength(com.sun.java.util.collections.LinkedList[] vectors)
Find the longest column size.
Parameters:
vectors - the lists to check
Returns:
int the maximum one.

createStatement

protected static java.sql.PreparedStatement createStatement(java.lang.String aQuery,
                                                            java.lang.String aSubQuery,
                                                            com.sun.java.util.collections.LinkedList portletNames,
                                                            java.lang.String[] params,
                                                            java.sql.Connection c)
                                                     throws java.sql.SQLException
Create a prepared statement.
Parameters:
aQuery - the sql.
aSubQuery - the sub part of the query.
portletNames - the list of portlet names.
params - any extra parameters.
c - the connection
Returns:
PreparedStatement the prepared statement.
Throws:
SQLException - JDBC error.

closeStatement

protected static void closeStatement(java.sql.PreparedStatement ps)
Close statement.
Parameters:
ps - the prepared statement to close.

portletsForPortal

protected static com.sun.java.util.collections.LinkedList portletsForPortal(java.lang.String aPortalName,
                                                                            java.sql.Connection aConnection)
                                                                     throws java.sql.SQLException
Get the portlets for a portal.
Parameters:
aPortalName - the portal name.
aConnection - the connection.
Returns:
LinkedList the portlet names.
Throws:
SQLException - JDBC error.

portletDefinitionsForPortletNames

protected static void portletDefinitionsForPortletNames(com.sun.java.util.collections.LinkedList ll,
                                                        java.sql.Connection c,
                                                        java.util.Hashtable portletMap)
                                                 throws java.sql.SQLException
Portlet definitions for portlet names.
Parameters:
ll - the list of portlet names.
c - the connection.
portletMap - the Hashtable of portlets.
Throws:
SQLException -  

portalPersonalizationsForPortletNames

protected static void portalPersonalizationsForPortletNames(java.lang.String aPortalName,
                                                            java.lang.String aCategoryName,
                                                            com.sun.java.util.collections.LinkedList ll,
                                                            java.sql.Connection c,
                                                            java.util.Hashtable portletMap)
                                                     throws java.sql.SQLException
Portal personalizations for portlet names.
Parameters:
aPortalName - the portal name.
aCategoryName - the category name.
ll - list of portlet names.
c -  
portletMap -  
Throws:
SQLException -  

groupPersonalizationsForPortletNames

protected static void groupPersonalizationsForPortletNames(java.lang.String aPortalName,
                                                           java.lang.String aCategoryName,
                                                           java.lang.String aGroupName,
                                                           com.sun.java.util.collections.LinkedList ll,
                                                           java.sql.Connection c,
                                                           java.util.Hashtable portletMap)
                                                    throws java.sql.SQLException

userPersonalizationsForPortletNames

protected static void userPersonalizationsForPortletNames(java.lang.String aPortalName,
                                                          java.lang.String aCategoryName,
                                                          java.lang.String aGroupName,
                                                          java.lang.String aUser,
                                                          com.sun.java.util.collections.LinkedList ll,
                                                          java.sql.Connection c,
                                                          java.util.Hashtable portletMap)
                                                   throws java.sql.SQLException

toArray

protected static Portlet[] toArray(java.util.Hashtable aHashtable)

portletsFor

protected static java.util.Hashtable portletsFor(java.lang.String aPortalName,
                                                 java.lang.String aCategoryName,
                                                 java.lang.String aGroupName,
                                                 java.lang.String aUserId,
                                                 boolean onlyDefinitions)
                                          throws java.rmi.RemoteException,
                                                 PortalException,
                                                 PortalFinderException

getPortletDefinitionsFor

public static Portlet[] getPortletDefinitionsFor(java.lang.String aPortalName)
                                          throws java.rmi.RemoteException,
                                                 PortalException,
                                                 PortalFinderException

getPortletsFor

public static Portlet[] getPortletsFor(java.lang.String aPortalName,
                                       java.lang.String aCategoryName)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException

getPortletsFor

public static Portlet[] getPortletsFor(java.lang.String aPortalName,
                                       java.lang.String aCategoryName,
                                       java.lang.String aGroupName)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException

getPortletsFor

public static Portlet[] getPortletsFor(java.lang.String aPortalName,
                                       java.lang.String aCategoryName,
                                       java.lang.String aGroupName,
                                       java.lang.String aUserId)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException

getRCPortletsFor

public static Portlet[][] getRCPortletsFor(java.lang.String aPortalName,
                                           java.lang.String aCategoryName,
                                           java.lang.String aGroupName,
                                           java.lang.String aUserId)
                                    throws java.rmi.RemoteException,
                                           PortalException,
                                           PortalFinderException

getUserCountForPortal

public static int getUserCountForPortal(java.lang.String aPortalId)
                                 throws java.rmi.RemoteException,
                                        PortalException,
                                        PortalFinderException
Get a count of users for a particular portal.
Parameters:
aPortalId - the portal whose group count is sought
Returns:
the number of users for the portal

getUserCountForGroup

public static int getUserCountForGroup(java.lang.String aPortalId,
                                       java.lang.String aGroupId)
                                throws java.rmi.RemoteException,
                                       PortalException,
                                       PortalFinderException
Get a count of users for a particular portal-group combination.
Parameters:
aPortalId - the portal whose user count is sought
aGroupId - the group whose user count is sought
Returns:
the number of users for the group

searchGroupForUsers

public static java.lang.String[] searchGroupForUsers(java.lang.String aPortalId,
                                                     java.lang.String aGroupId,
                                                     java.lang.String search,
                                                     boolean enforceLimits)
                                              throws java.rmi.RemoteException,
                                                     PortalResultsException
Get the user names associated with a particular group, based on a particular search string.
Parameters:
aPortalId - the name of the portal associated with the search
aGroupId - the name of the group associated with the search
search - a search string to apply ( e.g. 'bea*')
Returns:
the user names associated with the group

searchPortalForUsers

public static java.lang.String[] searchPortalForUsers(java.lang.String aPortalId,
                                                      java.lang.String search)
                                               throws java.rmi.RemoteException,
                                                      PortalException,
                                                      PortalResultsException
Get the user names associated with a particular portal, based on a particular search string.
Parameters:
aPortalId - the name of the portal associated with the search
search - a search string to apply ( e.g. 'bea*')
Returns:
the user names associated with the portal

getPortalFor

public static Portal getPortalFor(java.lang.String aPortal)
                           throws PortalException

getColumnInformationFor

public static PortalColumnInformation[] getColumnInformationFor(java.lang.String aPortalName,
                                                                java.lang.String aCategoryName)
                                                         throws PortalException

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved