com.netscape.certsrv.profile
Interface IProfile

All Known Subinterfaces:
IEnrollProfile, IProfileEx
All Known Implementing Classes:
BasicProfile, CACertCAEnrollProfile, CAEnrollProfile, EnrollProfile, RAEnrollProfile, ServerCertCAEnrollProfile, UserCertCAEnrollProfile

public interface IProfile

This interface represents a profile. A profile contains a list of input policies, default policies, constraint policies and output policies.

The input policy is for building the enrollment page.

The default policy is for populating user-supplied and system-supplied values into the request.

The constraint policy is for validating the request before processing.

The output policy is for building the result page.

Each profile can have multiple policy set. Each set is composed of zero or more default policies and zero or more constraint policies.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Method Summary
 IProfileContext createContext()
          Retrieves profile context.
 IProfileInput createProfileInput(java.lang.String id, java.lang.String inputClassId, NameValuePairs nvp)
          Creates a input policy.
 IProfileOutput createProfileOutput(java.lang.String id, java.lang.String outputClassId, NameValuePairs nvp)
          Creates a output policy.
 IProfilePolicy createProfilePolicy(java.lang.String setId, java.lang.String id, java.lang.String defaultClassId, java.lang.String constraintClassId)
          Creates a profile policy.
 IRequest[] createRequests(IProfileContext ctx, java.util.Locale locale)
          Creates one or more requests.
 void deleteProfileInput(java.lang.String inputId)
          Deletes input policy by id.
 void deleteProfileOutput(java.lang.String outputId)
          Deletes output policy by id.
 void deleteProfilePolicy(java.lang.String setId, java.lang.String policyId)
          Deletes a policy.
 void execute(IRequest request)
          Process a request after validation.
 java.lang.String getApprovedBy()
          Retrieves the user id of the person who approves this profile.
 IProfileAuthenticator getAuthenticator()
          Retrieves the associated authenticator instance.
 java.lang.String getAuthenticatorId()
          Retrieves the instance id of the authenticator for this profile.
 java.lang.String getAuthzAcl()
           
 IConfigStore getConfigStore()
          Retrieves the configuration store of this profile.
 java.lang.String getDescription(java.util.Locale locale)
          Retrieves the profile description.
 java.lang.String getId()
          Returns the identifier of this profile.
 java.lang.String getName(java.util.Locale locale)
          Retrieves the profile name.
 java.lang.String getPolicySetId(IRequest req)
          Retrieves a default set id for the given request.
 IProfileInput getProfileInput(java.lang.String id)
          Retrieves input policy by id.
 java.util.Enumeration getProfileInputIds()
          Retrieves a list of input policy IDs.
 IProfileOutput getProfileOutput(java.lang.String id)
          Retrieves output policy by id.
 java.util.Enumeration getProfileOutputIds()
          Retrieves a list of output policy IDs.
 java.util.Enumeration getProfilePolicies(java.lang.String setId)
          Returns a list of profile policies.
 IProfilePolicy getProfilePolicy(java.lang.String setId, java.lang.String id)
          Retrieves a policy.
 java.util.Enumeration getProfilePolicyIds(java.lang.String setId)
          Retrieves all the policy id within a set.
 java.util.Enumeration getProfilePolicySetIds()
          Returns the profile policy set identifiers.
 java.lang.String getRequestorDN(IRequest request)
          Retrieves a localized string that represents requestor's distinguished name.
 IRequestQueue getRequestQueue()
          Retrieves the request queue that is associated with this profile.
 void init(IProfileSubsystem owner, IConfigStore config)
          Initializes this profile.
 java.lang.String isRenewal()
           
 boolean isVisible()
          Checks if this profile is end-user profile or not.
 java.lang.String isXmlOutput()
           
 void populate(IRequest request)
          Passes the request to the set of default policies that populate the profile information against the profile.
 void populateInput(IProfileContext ctx, IRequest request)
          Populates user-supplied input values into the requests.
 void setAuthenticatorId(java.lang.String id)
          Sets the instance id of the authenticator for this profile.
 void setDescription(java.util.Locale locale, java.lang.String desc)
          Returns the profile description.
 void setId(java.lang.String id)
          Sets id of this profile.
 void setName(java.util.Locale locale, java.lang.String name)
          Returns the profile name.
 void setVisible(boolean v)
          Sets this profile end-user profile or not.
 void submit(IAuthToken token, IRequest request)
          Handles end-user request submission.
 void validate(IRequest request)
          Passes the request to the set of constraint policies that validate the request against the profile.
 

Method Detail

init

void init(IProfileSubsystem owner,
          IConfigStore config)
          throws EBaseException
Initializes this profile.

Parameters:
owner - profile subsystem
config - configuration store for this profile
Throws:
EBaseException - failed to initialize

getRequestQueue

IRequestQueue getRequestQueue()
Retrieves the request queue that is associated with this profile. The request queue is for creating new requests.

Returns:
request queue

setId

void setId(java.lang.String id)
Sets id of this profile.

Parameters:
id - profile identifier

getId

java.lang.String getId()
Returns the identifier of this profile.

Returns:
profile id

getRequestorDN

java.lang.String getRequestorDN(IRequest request)
Retrieves a localized string that represents requestor's distinguished name. This string displayed in the request listing user interface.

Parameters:
request - request
Returns:
distringuished name of the request owner

getConfigStore

IConfigStore getConfigStore()
Retrieves the configuration store of this profile.

Returns:
configuration store

getAuthenticatorId

java.lang.String getAuthenticatorId()
Retrieves the instance id of the authenticator for this profile.

Returns:
authenticator instance id

getAuthzAcl

java.lang.String getAuthzAcl()

setAuthenticatorId

void setAuthenticatorId(java.lang.String id)
Sets the instance id of the authenticator for this profile.

Parameters:
id - authenticator instance id

getAuthenticator

IProfileAuthenticator getAuthenticator()
                                       throws EProfileException
Retrieves the associated authenticator instance.

Returns:
profile authenticator instance. if no associated authenticator, null is returned
Throws:
EProfileException - failed to retrieve

getProfileInputIds

java.util.Enumeration getProfileInputIds()
Retrieves a list of input policy IDs.

Returns:
input policy id list

getProfileInput

IProfileInput getProfileInput(java.lang.String id)
Retrieves input policy by id.

Parameters:
id - input policy id
Returns:
input policy instance

getProfileOutputIds

java.util.Enumeration getProfileOutputIds()
Retrieves a list of output policy IDs.

Returns:
output policy id list

getProfileOutput

IProfileOutput getProfileOutput(java.lang.String id)
Retrieves output policy by id.

Parameters:
id - output policy id
Returns:
output policy instance

isVisible

boolean isVisible()
Checks if this profile is end-user profile or not. End-user profile will be displayed to the end user. Non end-user profile mainly is for registration manager.

Returns:
end-user profile or not

setVisible

void setVisible(boolean v)
Sets this profile end-user profile or not.

Parameters:
v - end-user profile or not

getApprovedBy

java.lang.String getApprovedBy()
Retrieves the user id of the person who approves this profile.

Returns:
user id of the approver of this profile

isRenewal

java.lang.String isRenewal()

isXmlOutput

java.lang.String isXmlOutput()

setName

void setName(java.util.Locale locale,
             java.lang.String name)
Returns the profile name.

Parameters:
locale - end-user locale
name - profile name

getName

java.lang.String getName(java.util.Locale locale)
Retrieves the profile name.

Parameters:
locale - end-user locale
Returns:
localized profile name

setDescription

void setDescription(java.util.Locale locale,
                    java.lang.String desc)
Returns the profile description.

Parameters:
locale - end-user locale
desc - profile description

getDescription

java.lang.String getDescription(java.util.Locale locale)
Retrieves the profile description.

Parameters:
locale - end-user locale
Returns:
localized profile description

createContext

IProfileContext createContext()
Retrieves profile context. The context stores information about the requestor before the actual request is created.

Returns:
profile context.

getProfilePolicySetIds

java.util.Enumeration getProfilePolicySetIds()
Returns the profile policy set identifiers.

Returns:
a list of policy set id

createProfilePolicy

IProfilePolicy createProfilePolicy(java.lang.String setId,
                                   java.lang.String id,
                                   java.lang.String defaultClassId,
                                   java.lang.String constraintClassId)
                                   throws EProfileException
Creates a profile policy.

Parameters:
setId - id of the policy set that owns this policy
id - policy id
defaultClassId - id of the registered default implementation
constraintClassId - id of the registered constraint implementation
Returns:
profile policy instance
Throws:
EProfileException - failed to create policy

deleteProfileInput

void deleteProfileInput(java.lang.String inputId)
                        throws EProfileException
Deletes input policy by id.

Parameters:
inputId - id of the input policy
Throws:
EProfileException - failed to delete

deleteProfileOutput

void deleteProfileOutput(java.lang.String outputId)
                         throws EProfileException
Deletes output policy by id.

Parameters:
outputId - id of the output policy
Throws:
EProfileException - failed to delete

createProfileInput

IProfileInput createProfileInput(java.lang.String id,
                                 java.lang.String inputClassId,
                                 NameValuePairs nvp)
                                 throws EProfileException
Creates a input policy.

Parameters:
id - input policy id
inputClassId - id of the registered input implementation
nvp - default parameters
Returns:
input policy
Throws:
EProfileException - failed to create

createProfileOutput

IProfileOutput createProfileOutput(java.lang.String id,
                                   java.lang.String outputClassId,
                                   NameValuePairs nvp)
                                   throws EProfileException
Creates a output policy.

Parameters:
id - output policy id
outputClassId - id of the registered output implementation
nvp - default parameters
Returns:
output policy
Throws:
EProfileException - failed to create

deleteProfilePolicy

void deleteProfilePolicy(java.lang.String setId,
                         java.lang.String policyId)
                         throws EProfileException
Deletes a policy.

Parameters:
setId - id of the policy set
policyId - id of policy to delete
Throws:
EProfileException - failed to delete

getProfilePolicy

IProfilePolicy getProfilePolicy(java.lang.String setId,
                                java.lang.String id)
Retrieves a policy.

Parameters:
setId - set id
id - policy id
Returns:
profile policy

getProfilePolicyIds

java.util.Enumeration getProfilePolicyIds(java.lang.String setId)
Retrieves all the policy id within a set.

Parameters:
setId - set id
Returns:
a list of policy id

getPolicySetId

java.lang.String getPolicySetId(IRequest req)
Retrieves a default set id for the given request. It is the profile's responsibility to return an appropriate set id for the request.

Parameters:
req - request
Returns:
policy set id

getProfilePolicies

java.util.Enumeration getProfilePolicies(java.lang.String setId)
Returns a list of profile policies.

Parameters:
setId - set id
Returns:
a list of policies

createRequests

IRequest[] createRequests(IProfileContext ctx,
                          java.util.Locale locale)
                          throws EProfileException
Creates one or more requests. Normally, only one request will be created. In case of CRMF request, multiple requests may be created for one submission.

Parameters:
ctx - profile context
locale - user locale
Returns:
a list of requests
Throws:
EProfileException - failed to create requests

populateInput

void populateInput(IProfileContext ctx,
                   IRequest request)
                   throws EProfileException
Populates user-supplied input values into the requests.

Parameters:
ctx - profile context
request - request
Throws:
EProfileException - failed to populate

populate

void populate(IRequest request)
              throws EProfileException
Passes the request to the set of default policies that populate the profile information against the profile.

Parameters:
request - request
Throws:
EProfileException - failed to populate default values

validate

void validate(IRequest request)
              throws ERejectException
Passes the request to the set of constraint policies that validate the request against the profile.

Parameters:
request - request
Throws:
ERejectException - validation violation

execute

void execute(IRequest request)
             throws EProfileException
Process a request after validation.

Parameters:
request - request to be processed
Throws:
EProfileException - failed to process

submit

void submit(IAuthToken token,
            IRequest request)
            throws EDeferException,
                   EProfileException
Handles end-user request submission.

Parameters:
token - authentication token
request - request to be processed
Throws:
EDeferException - defer request
EProfileException - failed to submit