Class BasicProfile

  • All Implemented Interfaces:
    IProfile
    Direct Known Subclasses:
    EnrollProfile

    public abstract class BasicProfile
    extends java.lang.Object
    implements IProfile
    This class implements a basic profile.
    Version:
    $Revision$, $Date$
    • Field Detail

      • signedAuditLogger

        protected static Logger signedAuditLogger
      • PROP_OUTPUT_LIST

        public static final java.lang.String PROP_OUTPUT_LIST
        See Also:
        Constant Field Values
      • PROP_UPDATER_LIST

        public static final java.lang.String PROP_UPDATER_LIST
        See Also:
        Constant Field Values
      • PROP_POLICY_LIST

        public static final java.lang.String PROP_POLICY_LIST
        See Also:
        Constant Field Values
      • PROP_INSTANCE_ID

        public static final java.lang.String PROP_INSTANCE_ID
        See Also:
        Constant Field Values
      • PROP_NO_CONSTRAINT

        public static final java.lang.String PROP_NO_CONSTRAINT
        See Also:
        Constant Field Values
      • PROP_GENERIC_EXT_DEFAULT

        public static final java.lang.String PROP_GENERIC_EXT_DEFAULT
        See Also:
        Constant Field Values
      • mInputNames

        protected java.util.Vector<java.lang.String> mInputNames
      • mInputs

        protected java.util.Hashtable<java.lang.String,​IProfileInput> mInputs
      • mInputIds

        protected java.util.Vector<java.lang.String> mInputIds
      • mOutputs

        protected java.util.Hashtable<java.lang.String,​IProfileOutput> mOutputs
      • mOutputIds

        protected java.util.Vector<java.lang.String> mOutputIds
      • mUpdaters

        protected java.util.Hashtable<java.lang.String,​IProfileUpdater> mUpdaters
      • mUpdaterIds

        protected java.util.Vector<java.lang.String> mUpdaterIds
      • mAuthInstanceId

        protected java.lang.String mAuthInstanceId
      • mId

        protected java.lang.String mId
      • mAuthzAcl

        protected java.lang.String mAuthzAcl
      • mPolicySet

        protected java.util.Hashtable<java.lang.String,​java.util.Vector<IProfilePolicy>> mPolicySet
    • Constructor Detail

      • BasicProfile

        public BasicProfile()
    • Method Detail

      • isEnable

        public boolean isEnable()
      • isRenewal

        public java.lang.String isRenewal()
        Specified by:
        isRenewal in interface IProfile
      • setRenewal

        public void setRenewal​(boolean renewal)
        Specified by:
        setRenewal in interface IProfile
      • isXmlOutput

        public java.lang.String isXmlOutput()
        Specified by:
        isXmlOutput in interface IProfile
      • setXMLOutput

        public void setXMLOutput​(boolean xmlOutput)
        Specified by:
        setXMLOutput in interface IProfile
      • getApprovedBy

        public java.lang.String getApprovedBy()
        Description copied from interface: IProfile
        Retrieves the user id of the person who approves this profile.
        Specified by:
        getApprovedBy in interface IProfile
        Returns:
        user id of the approver of this profile
      • setId

        public void setId​(java.lang.String id)
        Description copied from interface: IProfile
        Sets id of this profile.
        Specified by:
        setId in interface IProfile
        Parameters:
        id - profile identifier
      • getId

        public java.lang.String getId()
        Description copied from interface: IProfile
        Returns the identifier of this profile.
        Specified by:
        getId in interface IProfile
        Returns:
        profile id
      • getRequestorDN

        public java.lang.String getRequestorDN​(IRequest request)
        Description copied from interface: IProfile
        Retrieves a localized string that represents requestor's distinguished name. This string displayed in the request listing user interface.
        Specified by:
        getRequestorDN in interface IProfile
        Parameters:
        request - request
        Returns:
        distringuished name of the request owner
      • getAuthenticatorId

        public java.lang.String getAuthenticatorId()
        Description copied from interface: IProfile
        Retrieves the instance id of the authenticator for this profile.
        Specified by:
        getAuthenticatorId in interface IProfile
        Returns:
        authenticator instance id
      • setAuthenticatorId

        public void setAuthenticatorId​(java.lang.String id)
        Description copied from interface: IProfile
        Sets the instance id of the authenticator for this profile.
        Specified by:
        setAuthenticatorId in interface IProfile
        Parameters:
        id - authenticator instance id
      • setAuthzAcl

        public void setAuthzAcl​(java.lang.String id)
        Specified by:
        setAuthzAcl in interface IProfile
      • getAuthzAcl

        public java.lang.String getAuthzAcl()
        Specified by:
        getAuthzAcl in interface IProfile
      • getConfigStore

        public IConfigStore getConfigStore()
        Description copied from interface: IProfile
        Retrieves the configuration store of this profile.
        Specified by:
        getConfigStore in interface IProfile
        Returns:
        configuration store
      • getInputNames

        public java.util.Enumeration<java.lang.String> getInputNames()
      • getProfileUpdaterIds

        public java.util.Enumeration<java.lang.String> getProfileUpdaterIds()
      • getProfileUpdater

        public IProfileUpdater getProfileUpdater​(java.lang.String name)
      • getProfileOutputIds

        public java.util.Enumeration<java.lang.String> getProfileOutputIds()
        Description copied from interface: IProfile
        Retrieves a list of output policy IDs.
        Specified by:
        getProfileOutputIds in interface IProfile
        Returns:
        output policy id list
      • getProfileOutput

        public IProfileOutput getProfileOutput​(java.lang.String name)
        Description copied from interface: IProfile
        Retrieves output policy by id.
        Specified by:
        getProfileOutput in interface IProfile
        Parameters:
        name - output policy id
        Returns:
        output policy instance
      • getProfileInputIds

        public java.util.Enumeration<java.lang.String> getProfileInputIds()
        Description copied from interface: IProfile
        Retrieves a list of input policy IDs.
        Specified by:
        getProfileInputIds in interface IProfile
        Returns:
        input policy id list
      • getProfileInput

        public IProfileInput getProfileInput​(java.lang.String name)
        Description copied from interface: IProfile
        Retrieves input policy by id.
        Specified by:
        getProfileInput in interface IProfile
        Parameters:
        name - input policy id
        Returns:
        input policy instance
      • addInputName

        public void addInputName​(java.lang.String name)
      • getInputDescriptor

        public IDescriptor getInputDescriptor​(java.lang.String name)
      • getProfilePolicySetIds

        public java.util.Enumeration<java.lang.String> getProfilePolicySetIds()
        Description copied from interface: IProfile
        Returns the profile policy set identifiers.
        Specified by:
        getProfilePolicySetIds in interface IProfile
        Returns:
        a list of policy set id
      • deleteProfilePolicy

        public void deleteProfilePolicy​(java.lang.String setId,
                                        java.lang.String policyId)
                                 throws EProfileException
        Description copied from interface: IProfile
        Deletes a policy.
        Specified by:
        deleteProfilePolicy in interface IProfile
        Parameters:
        setId - id of the policy set
        policyId - id of policy to delete
        Throws:
        EProfileException - failed to delete
      • createProfilePolicy

        public IProfilePolicy createProfilePolicy​(java.lang.String setId,
                                                  java.lang.String id,
                                                  java.lang.String defaultClassId,
                                                  java.lang.String constraintClassId)
                                           throws EProfileException
        Creates a profile policy
        Specified by:
        createProfilePolicy in interface IProfile
        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
      • createProfilePolicy

        public IProfilePolicy createProfilePolicy​(java.lang.String setId,
                                                  java.lang.String id,
                                                  java.lang.String defaultClassId,
                                                  java.lang.String constraintClassId,
                                                  boolean createConfig)
                                           throws EProfileException
        Throws:
        EProfileException
      • getProfilePolicy

        public IProfilePolicy getProfilePolicy​(java.lang.String setId,
                                               java.lang.String id)
        Description copied from interface: IProfile
        Retrieves a policy.
        Specified by:
        getProfilePolicy in interface IProfile
        Parameters:
        setId - set id
        id - policy id
        Returns:
        profile policy
      • isVisible

        public boolean isVisible()
        Description copied from interface: IProfile
        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.
        Specified by:
        isVisible in interface IProfile
        Returns:
        end-user profile or not
      • setVisible

        public void setVisible​(boolean v)
        Description copied from interface: IProfile
        Sets this profile end-user profile or not.
        Specified by:
        setVisible in interface IProfile
        Parameters:
        v - end-user profile or not
      • getName

        public java.lang.String getName​(java.util.Locale locale)
        Returns the profile name.
        Specified by:
        getName in interface IProfile
        Parameters:
        locale - end-user locale
        Returns:
        localized profile name
      • setName

        public void setName​(java.util.Locale locale,
                            java.lang.String name)
        Description copied from interface: IProfile
        Returns the profile name.
        Specified by:
        setName in interface IProfile
        Parameters:
        locale - end-user locale
        name - profile name
      • createContext

        public abstract IProfileContext createContext()
        Description copied from interface: IProfile
        Retrieves profile context. The context stores information about the requestor before the actual request is created.
        Specified by:
        createContext in interface IProfile
        Returns:
        profile context.
      • getDescription

        public java.lang.String getDescription​(java.util.Locale locale)
        Returns the profile description.
        Specified by:
        getDescription in interface IProfile
        Parameters:
        locale - end-user locale
        Returns:
        localized profile description
      • setDescription

        public void setDescription​(java.util.Locale locale,
                                   java.lang.String desc)
        Description copied from interface: IProfile
        Returns the profile description.
        Specified by:
        setDescription in interface IProfile
        Parameters:
        locale - end-user locale
        desc - profile description
      • getPolicies

        public java.util.Vector<IProfilePolicy> getPolicies​(java.lang.String setId)
      • populate

        public void populate​(IRequest request)
                      throws EProfileException
        Passes the request to the set of default policies that populate the profile information against the profile.
        Specified by:
        populate in interface IProfile
        Parameters:
        request - request
        Throws:
        EProfileException - failed to populate default values
      • validate

        public void validate​(IRequest request)
                      throws ERejectException
        Passes the request to the set of constraint policies that validate the request against the profile.
        Specified by:
        validate in interface IProfile
        Parameters:
        request - request
        Throws:
        ERejectException - validation violation
      • getProfilePolicies

        public java.util.Enumeration<IProfilePolicy> getProfilePolicies​(java.lang.String setId)
        Description copied from interface: IProfile
        Returns a list of profile policies.
        Specified by:
        getProfilePolicies in interface IProfile
        Parameters:
        setId - set id
        Returns:
        a list of policies
      • getProfilePolicyIds

        public java.util.Enumeration<java.lang.String> getProfilePolicyIds​(java.lang.String setId)
        Description copied from interface: IProfile
        Retrieves all the policy id within a set.
        Specified by:
        getProfilePolicyIds in interface IProfile
        Parameters:
        setId - set id
        Returns:
        a list of policy id
      • auditSubjectID

        protected java.lang.String auditSubjectID()
        Signed Audit Log Subject ID This method is inherited by all extended "BasicProfile"s, and is called to obtain the "SubjectID" for a signed audit log message.

        Returns:
        id string containing the signed audit log message SubjectID