com.hyperion.css.common
Class CSSIdentityHelper

java.lang.Object
  |
  +--com.hyperion.css.common.CSSIdentityHelper

public class CSSIdentityHelper
extends java.lang.Object

The identity can be used to specify a user or a group or any other entry uniquely within corporate directories.

The identity can be specified as

 Provider.TYPE://ENTRY.ID?Entry.Type
 Provider.TYPE => The type for the “server of reference”. This should be referenced in the
 configuration for providers.
 ENTRY.ID => The unique identifier for the user/group. The ENTRY.ID
 also contains the name of the attribute that uniquely specifies that
 entry – for instance DN, SID etc..
 Entry.Type => Could be either USER or GROUP.
 

An example of a valid identity is:

ldap://DN=cn=gkhanna,ou=people,o=Hyperion?USER

Since:
CSSv2.0

Method Summary
static java.lang.String getId(java.util.Locale locale, java.lang.String identity)
          Returns the directory id.
static java.lang.String getIdentityAttributeName(java.util.Locale locale, java.lang.String identity)
          Returns the identity attribute name.
static java.lang.String getIdentityString(java.util.Locale locale, java.lang.String providerType, java.lang.String attributeName, java.lang.String id, java.lang.String entryType)
          Creates an Identity String.
static java.lang.String getIdentityType(java.util.Locale locale, java.lang.String identity)
          Returns the type of the entry specified in the identity.
static java.lang.String getProviderType(java.util.Locale locale, java.lang.String identity)
          Returns the PROVIDER.TYPE .
static boolean isValidIdentity(java.util.Locale locale, java.lang.String identity)
          Checks to see if the identity is valid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValidIdentity

public static boolean isValidIdentity(java.util.Locale locale,
                                      java.lang.String identity)

Checks to see if the identity is valid.

Parameters:
locale - The name of the geographical or cultural locale object defined in java.util.Locale.
identity - String returned from the user or group object that uniquely identifies one user or group on a provider.
Returns:
boolean

getProviderType

public static java.lang.String getProviderType(java.util.Locale locale,
                                               java.lang.String identity)
                                        throws CSSIllegalArgumentException,
                                               CSSInvalidIdentityException

Returns the PROVIDER.TYPE . Note that the provider type is always lowercase.

Parameters:
locale - The name of the geographical or cultural locale object defined in java.util.Locale.
identity - String returned from the user or group object that uniquely identifies one user or group on a provider.
Returns:
String
Throws:
CSSIllegalArgumentException
CSSInvalidIdentityException

getIdentityType

public static java.lang.String getIdentityType(java.util.Locale locale,
                                               java.lang.String identity)
                                        throws CSSIllegalArgumentException,
                                               CSSInvalidIdentityException

Returns the type of the entry specified in the identity.

Parameters:
locale - The name of the geographical or cultural locale object defined in java.util.Locale.
identity - String returned from the user or group object that uniquely identifies one user or group on a provider.
Returns:
String
Throws:
CSSIllegalArgumentException
CSSInvalidIdentityException

getId

public static java.lang.String getId(java.util.Locale locale,
                                     java.lang.String identity)
                              throws CSSIllegalArgumentException,
                                     CSSInvalidIdentityException

Returns the directory id.

Parameters:
locale - The name of the geographical or cultural locale object defined in java.util.Locale.
identity - String returned from the user or group object that uniquely identifies one user or group on a provider.
Returns:
String
Throws:
CSSIllegalArgumentException
CSSInvalidIdentityException

getIdentityAttributeName

public static java.lang.String getIdentityAttributeName(java.util.Locale locale,
                                                        java.lang.String identity)
                                                 throws CSSIllegalArgumentException,
                                                        CSSInvalidIdentityException

Returns the identity attribute name.

Parameters:
locale - The name of the geographical or cultural locale object defined in java.util.Locale.
identity - String returned from the user or group object that uniquely identifies one user or group on a provider.
Returns:
String
Throws:
CSSIllegalArgumentException
CSSInvalidIdentityException

getIdentityString

public static java.lang.String getIdentityString(java.util.Locale locale,
                                                 java.lang.String providerType,
                                                 java.lang.String attributeName,
                                                 java.lang.String id,
                                                 java.lang.String entryType)
                                          throws CSSIllegalArgumentException

Creates an Identity String.

Parameters:
locale - The name of the geographical or cultural locale object defined in java.util.Locale.
providerType - The type of the provider.
attributeName - The name of the attribute.
id - The identity string.
entryType - The type of the entry.
Returns:
String The CSSIdentity.
Throws:
CSSIllegalArgumentException

Copyright 2004 Hyperion Solutions Corporation. All rights reserved.