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

## com.bea.p13n.usermgmt.profile
Interface ProfileManager

All Known Subinterfaces:
  CustomerProfileManager

public interface ProfileManager
extends javax.ejb.EJBObject

ProfileManager is a stateless session bean used to access profile values. It coordinates successor searches and mapping properties to different datasources. To provide a successor to the methods which take one, use the profile name of the successor profile. Each profile manager uses only one type as the successor type; for example, when specifying a successor to a UserProfileManager, it assumes the name is a group profile name. Property mapping is done through the deployment descriptor of the ProfileManager session bean. First, the default EntityPropertyManager to be used must have an ejb-ref named ejb/EntityPropertyManager. Any other EntityPropertyManager's to be used must also have ejb-refs. To map properties to a non-default EntityPropertyManager:

- To map an entire property set: create an environment entry called PropertyMapping/<property set name> which is a String that holds the name of the ejb-ref to use for that property set. For example, PropertyMapping/Ldap might have the value ejb/LdapPropertyManager, which is an ejb-ref pointing to an EntityPropertyManager that goes to an ldap server.
- To map a single property: create an environment entry called PropertyMapping/<property set name>.<property name> which is a String that holds the name of the ejb-ref to use for that property. For example, PropertyMapping/Ldap.fax might have the value ejb/CustomerPropertyManager, which is an ejb-ref pointing to an EntityPropertyManager that goes to a customer database table.
  If a property set is mapped to an EntityPropertyManager, and another entry maps one property of that property set to a different EntityPropertyManager, the single property mapping will override the property set mapping. In the previous examples, the LdapPropertyManager would be used for all properties in the Ldap property set except for "fax", which would be retrieved from the CustomerPropertyManager.

  Method Summary
  `void` | `createProfile(java.lang.String profileName)` Create a profile record with the given name.
  `void` | `deleteProfile(java.lang.String profileName)` Remove a profile
  `java.lang.String[]` | `getAllProfileNames()` Return a list of all profiles that this ProfileManager knows about.
  `java.lang.String` | `getJndiName()` Retrieve the jndi name used by this ProfileManager.
  `java.lang.String` | `getProfileName(long entityId)` Get the name of a profile based on its unique identifier.
  `java.lang.Object` | `getProperty(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName)` Get a property from the profile.
  `java.lang.Object` | `getProperty(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName, java.lang.String successor)` Get a property from the profile.
  `java.lang.String` | `getPropertyAsString(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName)` Get a property from the profile, converted to a String If the property is not found, the default value from the property set will be returned.
  `java.lang.String` | `getPropertyAsString(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName, java.lang.String successor)` Get a property from the profile as a String.
  `java.lang.Object` | `getPropertyNoDefault(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName, java.lang.String successor)` Get a property from the profile.
  `java.lang.String` | `getSuccessor(java.lang.String profileName, java.lang.String propertySet)` Retrieve the successor for the specified property set.
  `long` | `getUniqueId(java.lang.String profileName)` Retrieve the unique identifier generated for this profile.
  `boolean` | `profileExists(java.lang.String profileName)` Determine if a profile exists
  `java.lang.Object` | `removeProperty(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName)` Remove a property from the profile
  `void` | `removeSuccessor(java.lang.String profileName, java.lang.String propertySet)` Remove the successor for the specified property set.
  `void` | `setProperty(java.lang.String profileName, java.lang.String propertySet, java.lang.String propertyName, java.lang.Object value)` Set a property in the profile
  `void` | `setSuccessor(java.lang.String profileName, java.lang.String propertySet, java.lang.String successor)` Set the successor for the specified property set

  Methods inherited from interface javax.ejb.EJBObject
  `getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

  Method Detail

  ### getProperty

      public java.lang.Object getProperty(java.lang.String profileName,
                                          java.lang.String propertySet,
                                          java.lang.String propertyName)
                                   throws java.rmi.RemoteException,
                                          ProfileNotFoundException

    Get a property from the profile. If the property is not found, the default value from the property set will be returned.

    Parameters:
      `profileName` - the name of the profile to read
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
    Returns:
      the property's value
    Throws:
      ProfileNotFoundException - if the profile is not valid

  ### getPropertyAsString

      public java.lang.String getPropertyAsString(java.lang.String profileName,
                                                  java.lang.String propertySet,
                                                  java.lang.String propertyName)
                                           throws java.rmi.RemoteException,
                                                  ProfileNotFoundException

    Get a property from the profile, converted to a String If the property is not found, the default value from the property set will be returned.

    Parameters:
      `profileName` - the name of the profile to read
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
    Returns:
      the property's value
    Throws:
      ProfileNotFoundException - if the profile is not valid

  ### getProperty

      public java.lang.Object getProperty(java.lang.String profileName,
                                          java.lang.String propertySet,
                                          java.lang.String propertyName,
                                          java.lang.String successor)
                                   throws java.rmi.RemoteException,
                                          ProfileNotFoundException

    Get a property from the profile. If the property is not found in the profile, search the profile named in the successor field. If the property is still not found, the default value from the property set will be returned.

    Parameters:
      `profileName` - the name of the profile to read
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
    Returns:
      the property's value
    Throws:
      ProfileNotFoundException - if the profile or successor is not valid

  ### getPropertyAsString

      public java.lang.String getPropertyAsString(java.lang.String profileName,
                                                  java.lang.String propertySet,
                                                  java.lang.String propertyName,
                                                  java.lang.String successor)
                                           throws java.rmi.RemoteException,
                                                  ProfileNotFoundException

    Get a property from the profile as a String. If the property is not found in the profile, search the profile named in the successor field. If the property is still not found, the default value from the property set will be returned.

    Parameters:
      `profileName` - the name of the profile to read
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
    Returns:
      the property's value
    Throws:
      ProfileNotFoundException - if the profile or successor is not valid

  ### getPropertyNoDefault

      public java.lang.Object getPropertyNoDefault(java.lang.String profileName,
                                                   java.lang.String propertySet,
                                                   java.lang.String propertyName,
                                                   java.lang.String successor)
                                            throws java.rmi.RemoteException,
                                                   ProfileNotFoundException

    Get a property from the profile. If the property is not found in the profile, search the profile named in the successor field. This version will not return the default from the property set.

    Parameters:
      `profileName` - the name of the profile to read
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
    Returns:
      the property's value
    Throws:
      ProfileNotFoundException - if the profile or successor is not valid

  ### setProperty

      public void setProperty(java.lang.String profileName,
                              java.lang.String propertySet,
                              java.lang.String propertyName,
                              java.lang.Object value)
                       throws PropertyValidationException,
                              ProfileNotFoundException,
                              java.rmi.RemoteException

    Set a property in the profile

    Parameters:
      `profileName` - the name of the profile to modify
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
      `value` - the new value for the property
    Throws:
      PropertyValidationException - if the new value is not valid
      ProfileNotFoundException - if the profile is not valid

  ### removeProperty

      public java.lang.Object removeProperty(java.lang.String profileName,
                                             java.lang.String propertySet,
                                             java.lang.String propertyName)
                                      throws java.rmi.RemoteException,
                                             ProfileNotFoundException

    Remove a property from the profile

    Parameters:
      `profileName` - the name of the profile to modify
      `propertySet` - the property set containing the property
      `propertyName` - the name of the property to retrieve
    Returns:
      the old value of the property
    Throws:
      ProfileNotFoundException - if the profile is not valid

  ### getSuccessor

      public java.lang.String getSuccessor(java.lang.String profileName,
                                           java.lang.String propertySet)
                                    throws java.rmi.RemoteException,
                                           ProfileNotFoundException

    Retrieve the successor for the specified property set. For user and group profiles, this will always be a group name.

    Parameters:
      `profileName` - the name of the profile to read
      `propertySet` - The name of the property set
    Returns:
      the successor's name
    Throws:
      ProfileNotFoundException - if the profile is not valid

  ### removeSuccessor

      public void removeSuccessor(java.lang.String profileName,
                                  java.lang.String propertySet)
                           throws java.rmi.RemoteException,
                                  ProfileNotFoundException

    Remove the successor for the specified property set.

    Parameters:
      `profileName` - the name of the profile to modify
      `propertySet` - The name of the property set
    Throws:
      ProfileNotFoundException - if the profile is not valid

  ### setSuccessor

      public void setSuccessor(java.lang.String profileName,
                               java.lang.String propertySet,
                               java.lang.String successor)
                        throws java.rmi.RemoteException,
                               ProfileNotFoundException

    Set the successor for the specified property set

    Parameters:
      `profileName` - the name of the profile to modify
      `propertySet` - The name of the property set
      `successor` - the name of the successor profile to set
    Throws:
      ProfileNotFoundException - if the profile or the successor is not valid

  ### getUniqueId

      public long getUniqueId(java.lang.String profileName)
                       throws java.rmi.RemoteException,
                              ProfileNotFoundException

    Retrieve the unique identifier generated for this profile. The unique identifier is used by the EntityPropertyManager to optimize the foreign keys in the persistent storage.

    Parameters:
      `profileName` - the name of the profile to read
    Returns:
      this entity's unique id
    Throws:
      ProfileNotFoundException - if the profile does not exist

  ### getProfileName

      public java.lang.String getProfileName(long entityId)
                                      throws java.rmi.RemoteException,
                                             ProfileNotFoundException

    Get the name of a profile based on its unique identifier.

    Parameters:
      `profileId` - the unique id to lookup
    Returns:
      the profile's name
    Throws:
      ProfileNotFoundException - if the profile does not exist

  ### getJndiName

      public java.lang.String getJndiName()
                                   throws java.rmi.RemoteException

    Retrieve the jndi name used by this ProfileManager. A combination of pk string and jndi name is always unique between profiles.

    Returns:
      the jndi name for this profile

  ### createProfile

      public void createProfile(java.lang.String profileName)
                         throws java.rmi.RemoteException

    Create a profile record with the given name.

    Parameters:
      `profileName` - the name of the profile to create

  ### deleteProfile

      public void deleteProfile(java.lang.String profileName)
                         throws java.rmi.RemoteException,
                                ProfileNotFoundException

    Remove a profile

    Parameters:
      `profileName` - the name of the profile to remove

  ### profileExists

      public boolean profileExists(java.lang.String profileName)
                            throws java.rmi.RemoteException

    Determine if a profile exists

    Parameters:
      `profileName` - the name to look for
    Returns:
      true if it exists, false otherwise

  ### getAllProfileNames

      public java.lang.String[] getAllProfileNames()
                                            throws java.rmi.RemoteException

    Return a list of all profiles that this ProfileManager knows about.

    Returns:
      a String array of profile names, or null if none were found

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

  Copyright © 2002 BEA Systems, Inc. All Rights Reserved