Class AMAuthenticationInstance


  • public class AMAuthenticationInstance
    extends Object
    This class provides implementation of an individual instance of a module type. A module instance has a name, type and its own configuration data, which can be accessed through ServiceConfig interface.
    • Constructor Detail

      • AMAuthenticationInstance

        protected AMAuthenticationInstance​(String name,
                                           String type,
                                           ServiceConfig config,
                                           ServiceSchema global)
        Constructs a module instance object. This constructor can only be called through ModuleInstanceManager.
        Parameters:
        name - The name of the module instance.
        type - The type this module belongs to. e.g. LDAP, JDBC, etc.
        config - Service configuration for the module instance.
    • Method Detail

      • getName

        public String getName()
        Returns the name of the module instance.
        Returns:
        Name of the module instance.
      • getType

        public String getType()
        Returns the type of the module instance.
        Returns:
        Type of the module instance.
      • getServiceConfig

        public ServiceConfig getServiceConfig()
        Returns a ServiceConfig instance which can be used to access and make changes to the module instance configuration data.
        Returns:
        A ServiceConfig object for this module instance.
      • getAttributeValues

        public Map getAttributeValues()
        Returns the configuration attributes of the module instance.
        Returns:
        Map of attribute name to a set of attribute values.
      • getAttributeValues

        public Map getAttributeValues​(Set names)
        Returns the configuration attribute values for the specified attributes.
        Parameters:
        names - Set of specified attributes.
        Returns:
        Map of attribute name to a set of attribute values.
      • setAttributeValues

        public void setAttributeValues​(Map values)
                                throws SMSException,
                                       SSOException
        Sets the configuration parameters. This method will replace the existing attribute values with the given ones. For attributes that are not in values, they will not be modified.
        Parameters:
        values - the Map in which keys are the attribute names and values are the Set of attribute values.
        Throws:
        SMSException - if there is an error occurred while performing the operation.
        SSOException - if the user's SSO token is invalid or expired.
      • setAttribute

        public void setAttribute​(String name,
                                 Set values)
                          throws SMSException,
                                 SSOException
        Sets a configuration parameter with the specified value values.
        Parameters:
        name - the name of the attribute to be set.
        values - the Set of values for that attribute.
        Throws:
        SMSException - if there is an error occurred while performing the operation.
        SSOException - if the user's SSO token is invalid or expired.