Class BasicClientTypesManager

  • All Implemented Interfaces:
    ClientTypesManager

    public class BasicClientTypesManager
    extends Object
    implements ClientTypesManager
    This class provides a basic implementation for the CDM ClientTypesManager interface. The different Client objects are constructed from the contents on the BasicClientTypesManager.properties file within the OpenAM web application.
    Author:
    Steve Ferris steve.ferris@forgerock.com
    • Constructor Detail

      • BasicClientTypesManager

        public BasicClientTypesManager()
    • Method Detail

      • getAllClientInstances

        public Map getAllClientInstances()
        Gets all client instance as Map.
        Specified by:
        getAllClientInstances in interface ClientTypesManager
        Returns:
        Map of clients. Key is the client type, value is the Client object
      • getClientInstance

        public Client getClientInstance​(String clientType)
        Gets client object for specified client type.
        Specified by:
        getClientInstance in interface ClientTypesManager
        Parameters:
        clientType - requested client type.
        Returns:
        The requested Client object
      • getClientInstance

        public Client getClientInstance​(String clientType,
                                        SSOToken token)
        Gets client object for specified client type with specified token
        Specified by:
        getClientInstance in interface ClientTypesManager
        Parameters:
        clientType - requested client type
        token - SSO Token
        Returns:
        The requested Client object, this can be null
      • getClientTypeData

        public Map getClientTypeData​(String clientType)
        Returns properties of the requested client type
        Specified by:
        getClientTypeData in interface ClientTypesManager
        Parameters:
        clientType - requested client type
        Returns:
        All properties of the request client type as Map
      • setDirty

        public void setDirty​(String clientType,
                             Map data)
        Updates client data. Need to call store() after this method.
        Specified by:
        setDirty in interface ClientTypesManager
        Parameters:
        clientType - client type
        data - client data. Key is the property name and value is the property value as String.
      • processProps

        protected void processProps​(Properties props)
                             throws InvalidPropertiesFormatException
        Utility method used to parse the properties file that configures this client types manager. A simple entry in the properties file would look like this: clients=genericHtml,... genericHtml_name=Generic HTML genericHtml_attributes=filePath=html,contentType=text/html,cookieSupport=true,genericHtml=true,... The clients are the names of the different client types For each client type, there is a list of attributes; _attributes is a comma delimited list of attributes for the client type
        Parameters:
        props - The properties file to parse
        Throws:
        InvalidPropertiesFormatException - if the properties are missing the required client list or are malformed