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

## com.bea.p13n.usermgmt.profile
Class ProfileFactory

    java.lang.Object
      com.bea.p13n.usermgmt.profile.ProfileFactory

public class ProfileFactory
extends Object

Factory class for retrieving user and group profiles. This will return an implementation of ProfileWrapper, which is a lightweight object that knows how to access the correct ProfileManager session beans based on the profile identity it is initialized with.

See Also:
  `ProfileWrapper`

Constructor Summary
`ProfileFactory()`

Method Summary
`static AnonymousProfileWrapper` | `createAnonymousProfile()` Create a new AnonymousProfileWrapper with no possibility of being tracked.
`static ProfileIdentity` | `createProfileIdentity(String username, String groupname)` Create a ProfileIdentity object.
`static PhantomProfileWrapper` | `getPhantomProfile(ProfileIdentity id)` Create a ProfileWrapper for the given ProfileIdentity.
`static PhantomProfileWrapper` | `getPhantomProfile(String username, String groupname)` Create a PhantomProfileWrapper for the given username and groupname.
`static ProfileWrapper` | `getProfile(ProfileIdentity id)` Create a ProfileWrapper for the given ProfileIdentity.
`static ProfileWrapper` | `getProfile(ProfileIdentity id, boolean validate)` Create a ProfileWrapper for the given ProfileIdentity.
`static ProfileWrapper` | `getProfile(String username, String groupname)` Create a ProfileWrapper for the given username and groupname.
`static ProfileWrapper` | `getProfile(String username, String groupname, boolean validate)` Create a ProfileWrapper for the given username and groupname.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProfileFactory

    public ProfileFactory()

Method Detail

### createAnonymousProfile

    public static AnonymousProfileWrapper createAnonymousProfile()

  Create a new AnonymousProfileWrapper with no possibility of being tracked. When this ctor is used, we cannot track anonymous users; we need a session.

### createProfileIdentity

    public static ProfileIdentity createProfileIdentity(String username,
                                                        String groupname)

  Create a ProfileIdentity object. This can later be used to create a ProfileWrapper, or simply to identify a profile.

  Parameters:
    `username` - the username of the profile
    `groupname` - the groupname of the profile
  Returns:
    a ProfileIdentity created from the specified name(s).

### getPhantomProfile

    public static PhantomProfileWrapper getPhantomProfile(ProfileIdentity id)

  Create a ProfileWrapper for the given ProfileIdentity. The id can have a username, a groupname, or both. If the username is null, the ProfileWrapper will access the group's profile. If the groupname is null, it will access the user's profile with no default explicit successor. If both are provided, it will access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager. The `PhantomProfileWrapper` differs from a normal `ProfileWrapper` in that the user and/or group do not need to exist to use the wrapper.

  Parameters:
    `id` - the profile identity containg user/group name
  Returns:
    an initialized PhantomProfileWrapper

### getPhantomProfile

    public static PhantomProfileWrapper getPhantomProfile(String username,
                                                          String groupname)

  Create a PhantomProfileWrapper for the given username and groupname. One or the other may be null, but not both. If the username is null, the ProfileWrapper will access the group's profile. If the groupname is null, it will access the user's profile with no default explicit successor. If both are provided, it will access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager. The `PhantomProfileWrapper` differs from a normal `ProfileWrapper` in that the user and/or group do not need to exist to use the wrapper.

  Parameters:
    `username` - the username of the profile
    `groupname` - the groupname of the profile
  Returns:
    an initialized PhantomProfileWrapper

### getProfile

    public static ProfileWrapper getProfile(ProfileIdentity id)
                                     throws RemoteException,
                                            ProfileNotFoundException

  Create a ProfileWrapper for the given ProfileIdentity. The id can have a username, a groupname, or both. If the username is null, the ProfileWrapper will access the group's profile. If the groupname is null, it will access the user's profile with no default explicit successor. If both are provided, it will access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager.

  Parameters:
    `id` - the profile identity containg user/group name
  Returns:
    an initialized ProfileWrapper
  Throws:
    `ProfileNotFoundException` - if the given identity(ies) do not exist
    `RemoteException`

### getProfile

    public static ProfileWrapper getProfile(ProfileIdentity id,
                                            boolean validate)
                                     throws RemoteException,
                                            ProfileNotFoundException

  Create a ProfileWrapper for the given ProfileIdentity. The id can have a username, a groupname, or both. If the username is null, the ProfileWrapper will access the group's profile. If the groupname is null, it will access the user's profile with no default explicit successor. If both are provided, it will access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager.

  Parameters:
    `id` - the profile identity containg user/group name
    `validate` - if true, validate the ProfileIdentity by confirming entity exists
  Returns:
    an initialized ProfileWrapper
  Throws:
    `ProfileNotFoundException` - if the given identity(ies) do not exist
    `RemoteException`

### getProfile

    public static ProfileWrapper getProfile(String username,
                                            String groupname)
                                     throws RemoteException,
                                            ProfileNotFoundException

  Create a ProfileWrapper for the given username and groupname. One or the other may be null, but not both. If the username is null, the ProfileWrapper will access the group's profile. If the groupname is null, it will access the user's profile with no default explicit successor. If both are provided, it will access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager.

  Parameters:
    `username` - the username of the profile
    `groupname` - the groupname of the profile
  Returns:
    an initialized ProfileWrapper
  Throws:
    `ProfileNotFoundException` - if the given identity(ies) do not exist
    `RemoteException`

### getProfile

    public static ProfileWrapper getProfile(String username,
                                            String groupname,
                                            boolean validate)
                                     throws RemoteException,
                                            ProfileNotFoundException

  Create a ProfileWrapper for the given username and groupname. One or the other may be null, but not both. If the username is null, the ProfileWrapper will access the group's profile. If the groupname is null, it will access the user's profile with no default explicit successor. If both are provided, it will access the user's profile and use the provided groupname as an explicit successor when calling the ProfileManager.

  Parameters:
    `username` - the username of the profile
    `groupname` - the groupname of the profile
    `validate` - if true, validate the ProfileIdentity by confirming entity exists
  Returns:
    an initialized ProfileWrapper
  Throws:
    `ProfileNotFoundException` - if the given identity(ies) do not exist
    `RemoteException`

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

Copyright © 2004 BEA Systems, Inc. All Rights Reserved