com.hyperion.css
Interface CSSProviderIF

All Superinterfaces:
com.hyperion.css.common.internal.CSSFrameworkIF

public interface CSSProviderIF
extends com.hyperion.css.common.internal.CSSFrameworkIF

This is the interface to be implemented by the providers. An implementation of this interface is known as a provider The Framework can get a handle to a provider through the CSSProviderFactoryIF.getProvider(Map).

Note that the provider methods can be accessed concurrently by multiple threads, therefore it is the responsibility of the provider implementer to make the implementation thread safe.

Since:
CSSv2.0

Method Summary
 com.hyperion.css.common.CSSUserIF authenticate(java.util.Map context)
          The user is authenticated by the security platform.
 com.hyperion.css.common.CSSGroupIF getGroupByIdentity(java.util.Map context, java.lang.String identity)
          Get a group based on the identity of the group.
 com.hyperion.css.common.CSSGroupIF[] getGroups(java.util.Map context, java.lang.String name)
          Get a group based on the name .
 com.hyperion.css.common.CSSUserIF getUserByEmail(java.util.Map context, java.lang.String email)
          Get a user based on an email match.
 com.hyperion.css.common.CSSUserIF getUserByIdentity(java.util.Map context, java.lang.String identity)
          Get a user based on the identity of the user.
 com.hyperion.css.common.CSSUserIF[] getUsers(java.util.Map context, java.lang.String userName)
          Gets the user specified by userName The userName could be mapped to a particular attribute in a directory through the Configuration.
 com.hyperion.css.common.CSSUserIF[] getUsers(java.util.Map context, java.lang.String userName, java.lang.String firstName, java.lang.String lastName)
          Get a user based on a user name , firstName and lastName match.
 com.hyperion.css.common.CSSUserIF[] getUsersByName(java.util.Map context, java.lang.String firstName, java.lang.String lastName)
          Get a user based on a firstName and lastName match.
 void setEnvironment(java.util.Map env)
          Sets the environment for the provider.
 

Method Detail

authenticate

public com.hyperion.css.common.CSSUserIF authenticate(java.util.Map context)
                                               throws CSSAuthenticationException,
                                                      CSSCommunicationException,
                                                      CSSException

The user is authenticated by the security platform. It is the security platform's responsibility to create and set the token. The provider returns an instance of CSSUserIF with the token unset.

The context can specify the following:
  1. login name
  2. password
  3. locale

These properties are discussed in the field description for CSSAPIIF. The token is never passed to the provider.

The \domainName\entryName syntax is also supported for the benefit of applications using NTLM as the authentication protocol.

Specified by:
authenticate in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - the various parameters are specified here.
Returns:
CSSUserIF - null if there is no match
Throws:
CSSAuthenticationException - - if the user name exists but the password does not match.
CSSException - - Any other abnormality. Do not throw if the provider can make a recovery or is improperly configured.
CSSCommunicationException - - The provider could not connect to the directory.
See Also:
CSSUserIF

getUsers

public com.hyperion.css.common.CSSUserIF[] getUsers(java.util.Map context,
                                                    java.lang.String userName)
                                             throws CSSCommunicationException,
                                                    CSSException

Gets the user specified by userName The userName could be mapped to a particular attribute in a directory through the Configuration. The search for users based on *userName* should be based on getting all users who have userName as a part of the value of the attribute specified.

The userName could contain a wildcard such as "*". This implies that all the users in the directory need to be returned.

The context can specify the following:

  1. locale
These properties are discussed in the field description for CSSAPIIF.

Specified by:
getUsers in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
userName - String argument representing the user login name.
Returns:
CSSUserIF[] - Returns null if there is no match
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSException - - Any other abnormality.

getUserByEmail

public com.hyperion.css.common.CSSUserIF getUserByEmail(java.util.Map context,
                                                        java.lang.String email)
                                                 throws CSSCommunicationException,
                                                        CSSOperationNotSupportedException,
                                                        CSSException

Get a user based on an email match. The email could be mapped to a particular attribute in a directory through the Configuration. The search for users based on email should be absolute.

The context can specify the following:

  1. locale

These properties are discussed in the field description for CSSAPIIF.

Specified by:
getUserByEmail in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
email - The complete e-mail address string for the user.
Returns:
CSSUserIF - null if there is no match
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSOperationNotSupportedException - - this is thrown if the provider does not support this operation.
CSSException - - Any other abnormality.

getUsersByName

public com.hyperion.css.common.CSSUserIF[] getUsersByName(java.util.Map context,
                                                          java.lang.String firstName,
                                                          java.lang.String lastName)
                                                   throws CSSCommunicationException,
                                                          CSSOperationNotSupportedException,
                                                          CSSException

Get a user based on a firstName and lastName match. The firstName and lastName could be mapped to a particular set of attributes in a directory through the Configuration. If there are two attributes, one each for firstName and lastName, then the search is absolute and an AND is performed.

If one of the parameters is not specified then results for the other are returned.

The context can specify the following:

  1. locale

These properties are discussed in the field description for CSSAPIIF.

Specified by:
getUsersByName in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
firstName - The user's first name, with appended middle name if one exists.
lastName - The user's last name.
Returns:
CSSUserIF[] - null if there is no match
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSOperationNotSupportedException - - This is thrown if the provider does not support this operation.
CSSException - - Any other abnormality.

getUsers

public com.hyperion.css.common.CSSUserIF[] getUsers(java.util.Map context,
                                                    java.lang.String userName,
                                                    java.lang.String firstName,
                                                    java.lang.String lastName)
                                             throws CSSCommunicationException,
                                                    CSSException

Get a user based on a user name , firstName and lastName match. All the atttributes are absolute and required. The way this is evaluated is as follows:

 (&(userName="gkhanna")(firstName="Gaurav")(lastName="khanna") )
 

The context can specify the following:

  1. locale

These properties are discussed in the field description for CSSAPIIF.

Specified by:
getUsers in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
userName - String argument representing the user login name.
firstName - The user's first name, with appended middle name if one exists.
lastName - The user's last name.
Returns:
CSSUserIF[] - null if there is no match
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSException - - Any other abnormality.
See Also:
getUsersByName(Map, String, String), getUsers(Map, String)

getUserByIdentity

public com.hyperion.css.common.CSSUserIF getUserByIdentity(java.util.Map context,
                                                           java.lang.String identity)
                                                    throws CSSCommunicationException,
                                                           CSSException

Get a user based on the identity of the user. The identity is stored by the application and is generated by the security platform.

The context can specify the following:

  1. locale

These properties are discussed in the field description for CSSAPIIF.

Specified by:
getUserByIdentity in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
identity - String returned from the user object that uniquely identifies one user on a provider.
Returns:
CSSUserIF
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSException - - Any other abnormality.

getGroups

public com.hyperion.css.common.CSSGroupIF[] getGroups(java.util.Map context,
                                                      java.lang.String name)
                                               throws CSSCommunicationException,
                                                      CSSException

Get a group based on the name . The name could be mapped to a particular attribute in a directory through the Configuration. The search for groups based on *name* should be based on getting all groups who have name as a part of the value of the attribute specified.

if name is null then it gets the "domain/s" or the groups.

The name could contain a wildcard such as "*". This implies that all the groups in the directory need to be returned.

The context can specify the following:

  1. locale

These properties are discussed in the field description for CSSAPIIF.

Specified by:
getGroups in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
name - Name of the group.
Returns:
CSSGroupIF[] - empty if there is no match
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSException - - Any other abnormality.

getGroupByIdentity

public com.hyperion.css.common.CSSGroupIF getGroupByIdentity(java.util.Map context,
                                                             java.lang.String identity)
                                                      throws CSSCommunicationException,
                                                             CSSException

Get a group based on the identity of the group. The identity is stored by the application and is generated by the security platform.

The context can specify the following:

  1. locale

These properties are discussed in the field description for CSSAPIIF.

Specified by:
getGroupByIdentity in interface com.hyperion.css.common.internal.CSSFrameworkIF
Parameters:
context - Map structure holding key-value information about locale.
identity - String returned from the group object that uniquely identifies one group on a provider.
Returns:
CSSGroupIF
Throws:
CSSCommunicationException - - The provider could not connect to the directory.
CSSException - - Any other abnormality.

setEnvironment

public void setEnvironment(java.util.Map env)

Sets the environment for the provider. This can be used by the framework to reset the environment for the provider that was set up during the creation/initialization.

Parameters:
env - Map containing environment for Provider.

Copyright 2004 Hyperion Solutions Corporation. All rights reserved.