Interface IProfile

  • All Known Subinterfaces:
    IEnrollProfile, IProfileEx
    All Known Implementing Classes:
    BasicProfile, CACertCAEnrollProfile, CAEnrollProfile, EnrollProfile, 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$, $Date$
    • Method Detail

      • 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
      • setAuthzAcl

        void setAuthzAcl​(java.lang.String id)
      • getProfileInputIds

        java.util.Enumeration<java.lang.String> 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<java.lang.String> 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<java.lang.String> 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<java.lang.String> 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<IProfilePolicy> 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
      • 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
      • setRenewal

        void setRenewal​(boolean renewal)
      • setXMLOutput

        void setXMLOutput​(boolean xmlOutput)