Class Client

  • Direct Known Subclasses:
    AuthClient

    public class Client
    extends Observable
    Provides common access to client data.

    Client data is accessed for a particular client type. The underlying client data is stored in the profile service, but this interface should always used for accessing it (not by accessing the profile directly).

    • Constructor Detail

      • Client

        public Client()
      • Client

        public Client​(String clientType,
                      Map data)
    • Method Detail

      • getInstance

        public static Client getInstance​(String clientType)
                                  throws ClientException
        Deprecated.
        Use ClientsManager#getInstance(String)
        Get Client instance for a specific client type .
        Parameters:
        clientType - Client Type.
        Returns:
        Requested Client instance.
        Throws:
        ClientException - if specified client type is null or not defined
      • getInstance

        protected static Client getInstance​(String clientType,
                                            SSOToken token)
                                     throws ClientException
        Deprecated.
        Use ClientsManager#getInstance(String)
        When setting client data, get a Client instance for a specific client type. A valid user session is required when setting client data.
        Parameters:
        clientType - Client type
        token - SSO Token of the caller
        Returns:
        Client instance
        Throws:
        ClientException - if client type is null or not defined
      • getDefaultInstance

        public static Client getDefaultInstance()
        Deprecated.
        Use ClientsManager#getDefaultInstance()
        Returns a Client instance for the default client type
        Returns:
        The Client instance corresponding to the default client type
      • getAllInstances

        public static Iterator getAllInstances()
        Deprecated.
        Use ClientsManager#getAllInstances()
        Returns an iterator of Client objects for all known client types.
        Returns:
        Iterator of Client objects
      • getAllInstances

        protected static Iterator getAllInstances​(SSOToken token)
        Deprecated.
        Use ClientsManager#getAllInstances()
        When setting client data, returns an iterator of Client objects for all known client types. A valid user session is required when setting client data.
        Parameters:
        token - The user's SSO token
        Returns:
        Iterator of Client objects
      • getClientType

        public String getClientType()
        Gets the name of the client type for the data in this client instance.
        Returns:
        Name of the client type
      • getProperty

        public String getProperty​(String name)
        Gets the client property for the specified key.
        Parameters:
        name - The key for the client property to be returned.
        Returns:
        The client property. Return null if name is null or an unknown key
      • getProperties

        public Set getProperties​(String name)
        Gets the client property for the specified key.
        Parameters:
        name - The key for the client property to be returned.
        Returns:
        The set of client property values. Returns null if name is null or an unknown key
      • getPropertyNames

        public Set getPropertyNames()
        Returns a set of property names for this client data instance.
        Returns:
        The set of property names for this client data instance.
      • getAdditionalProperties

        public Set getAdditionalProperties()
        used by the console plug-in (only) to get the additional properties.
      • separateAdditionalProperties

        protected Set separateAdditionalProperties​(Map m)
        Removes the "additionalProperties" element from the Map, adds each of them to the Map with name and value (parsed with "=") and returns the values of the "additionalProperties in the Set.
        Returns:
        Set of the additionalProperties