Oracle Content Management SDK

oracle.ifs.common
Interface CredentialNameTokenizer

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IfsCredentialNameTokenizer

public interface CredentialNameTokenizer
extends java.io.Serializable

A CredentialNameTokenizer converts usernames into userids and subscriber names.

iFS users are uniquely identified by DIRECTORYUSER Name. However, there is no requirement for CredentialManagers to use an equivalent flat namespace. In a hosted model, a CredentialManager manages multiple user sets, or "subscribers". Userids are unique across a subscriber, but not necessarily unique across all subscribers. Consequently, to identify a user to the CredentialManager, both the userid and subscriber name are required.

CredentialNameTokenizers provide a consistent mechanism to convert between usernames and userids and subscriber names, for use by both applications and CredentialManager implementations.

Each iFS service constructs a CredentialNameTokenizer implementation, whose classname is specified by the service configuration property IFS.SERVICE.CREDENTIALMANAGER.CredentialNameTokenizer. CredentialManagers can obtain a reference to this CredentialNameTokenizer by calling S_LibraryService.getCredentialNameTokenizer. Applications can call LibraryService.getCredentialNameTokenizer.

CredentialNameTokenizer implementations must provide a zero-argument constructor.


Method Summary
 void dispose()
          Called by the iFS service to dispose this CredentialNameTokenizer.
 java.lang.String getSubscriberName(java.lang.String userName)
          Gets the subscriber name for the specified username.
 java.lang.String getUserid(java.lang.String userName)
          Gets the userid for the specified username.
 java.lang.String getUserName(java.lang.String userid, java.lang.String subscriberName)
          Gets the username for the specified userid and subscriber name.
 void initialize(S_LibraryService service)
          Called by the iFS service to initialize this CredentialNameTokenizer.
 

Method Detail


initialize

public void initialize(S_LibraryService service)
                throws IfsException
Called by the iFS service to initialize this CredentialNameTokenizer.

If the CredentialNameTokenizer holds service in a member variable, that member variable must be declared transient.

Parameters:
service - the iFS service to which this CredentialNameTokenizer belongs
Throws:
IfsException - (IFS-12701) if the operation fails

dispose

public void dispose()
             throws IfsException
Called by the iFS service to dispose this CredentialNameTokenizer.
Throws:
IfsException - (IFS-12702) if the operation fails

getUserName

public java.lang.String getUserName(java.lang.String userid,
                                    java.lang.String subscriberName)
                             throws IfsException
Gets the username for the specified userid and subscriber name.
Parameters:
userid - the userid of the user
subscriberName - the subscriber of the user
Returns:
the username
Throws:
IfsException - (IFS-12710) if the operation fails

getUserid

public java.lang.String getUserid(java.lang.String userName)
                           throws IfsException
Gets the userid for the specified username.
Parameters:
userName - the username of the user
Returns:
the userid
Throws:
IfsException - (IFS-12711) if the operation fails

getSubscriberName

public java.lang.String getSubscriberName(java.lang.String userName)
                                   throws IfsException
Gets the subscriber name for the specified username.
Parameters:
userName - the username of the user
Returns:
the subscriber name
Throws:
IfsException - (IFS-12712) if the operation fails

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.