BEA Systems, Inc.

com.beasys.portal.ejb
Class PortalHelper

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

public class PortalHelper
extends java.lang.Object
implements PortalConstants

General portal utility methods for encrypting, decrypting, credentials, ...


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
PortalHelper()
           
 
Method Summary
static Credentials createCredentialsFor(java.lang.String aUser, java.lang.String aPortal, java.lang.String aSystem, java.lang.String aSystemUid, java.lang.String aPassword)
          Create credentials for a user, portal, system, system user id, and password.
static java.lang.String createGroupProfileKey(java.lang.String aPortal, java.lang.String aGroup)
          A central location for creating a key from the portal, group, and user.
static java.lang.String createUserProfileKey(java.lang.String aPortal, java.lang.String aUser)
          A central location for creating a key from the portal, group, and user.
static java.lang.String encrypt(java.lang.String aString)
          Encrypt a value.
static boolean equalsEncryptedValue(java.lang.String toCheck, java.lang.String encryptedValue)
          Check to see if the value is equal to an encrypted value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalHelper

public PortalHelper()
Method Detail

equalsEncryptedValue

public static boolean equalsEncryptedValue(java.lang.String toCheck,
                                           java.lang.String encryptedValue)
Check to see if the value is equal to an encrypted value. For example, the passwords are stored in the db as encrypted values. So you would call this method from the login to check the one that they just entered to see if it is equal to the encrypted value.
Parameters:
the - check value
the - encrypted value to chec against.
Returns:
boolean true if they are equal

encrypt

public static java.lang.String encrypt(java.lang.String aString)
Encrypt a value.
Parameters:
the - value to encrypt.
Returns:
the encrypted value.

createUserProfileKey

public static java.lang.String createUserProfileKey(java.lang.String aPortal,
                                                    java.lang.String aUser)
A central location for creating a key from the portal, group, and user.
Parameters:
the - portal name.
the - group name.
the - user.
Returns:
the key.

createGroupProfileKey

public static java.lang.String createGroupProfileKey(java.lang.String aPortal,
                                                     java.lang.String aGroup)
A central location for creating a key from the portal, group, and user.
Parameters:
the - portal name.
the - group name.
Returns:
the key.

createCredentialsFor

public static Credentials createCredentialsFor(java.lang.String aUser,
                                               java.lang.String aPortal,
                                               java.lang.String aSystem,
                                               java.lang.String aSystemUid,
                                               java.lang.String aPassword)
Create credentials for a user, portal, system, system user id, and password.
Parameters:
aUser - the user.
aPortal - the portal.
aSystem - the system.
aSystemUid - the system user id.
aPassword - the password.
Returns:
Credentials the Credentials object matching the arguments.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved