Class AgentsModelImpl

    • Constructor Detail

      • AgentsModelImpl

        public AgentsModelImpl​(jakarta.servlet.http.HttpServletRequest req,
                               Map map)
        Creates an instance of this model implementation class.
        Parameters:
        req - HTTP Servlet Request.
        map - Map of setting properties.
    • Method Detail

      • getAgentNames

        public int getAgentNames​(String realmName,
                                 Set setTypes,
                                 String pattern,
                                 Set results)
                          throws AMConsoleException
        Returns agent names.
        Specified by:
        getAgentNames in interface AgentsModel
        Parameters:
        realmName - Realm where agents reside.
        setTypes - Agent Types.
        pattern - Search Pattern.
        results - Set to contains the results.
        Returns:
        error code.
        Throws:
        AMConsoleException - if result cannot be returned.
      • getAgentGroupNames

        public int getAgentGroupNames​(String realmName,
                                      Set setTypes,
                                      String pattern,
                                      Set results)
                               throws AMConsoleException
        Returns agent group names.
        Specified by:
        getAgentGroupNames in interface AgentsModel
        Parameters:
        realmName - Realm where agent groups reside.
        setTypes - Agent Types.
        pattern - Search Pattern.
        results - Set to contains the results.
        Returns:
        error code.
        Throws:
        AMConsoleException - if result cannot be returned.
      • createAgent

        public void createAgent​(String realmName,
                                String name,
                                String type,
                                String password,
                                String choice)
                         throws AMConsoleException
        Creates agent.
        Specified by:
        createAgent in interface AgentsModel
        Parameters:
        realmName - Realm where agent resides.
        name - Name of agent.
        type - Type of agent.
        password - Password of agent.
        choice - Choice of type of configuartion.
        Throws:
        AMConsoleException - if agent cannot be created.
      • deleteAgentGroups

        public void deleteAgentGroups​(String realmName,
                                      Set agentGroups)
                               throws AMConsoleException
        Deletes agent groups.
        Specified by:
        deleteAgentGroups in interface AgentsModel
        Parameters:
        realmName - Realm where agent group resides.
        agentGroups - Set of agent group names to be deleted.
        Throws:
        AMConsoleException - if agents cannot be deleted.
      • getAgentGroupId

        public String getAgentGroupId​(String realmName,
                                      String universalId)
                               throws AMConsoleException
        Returns the group of which agent belongs to.
        Specified by:
        getAgentGroupId in interface AgentsModel
        Parameters:
        realmName - Realm where agent group resides.
        universalId - Universal ID of the agent.
        Returns:
        the group of which agent belongs to.
        Throws:
        AMConsoleException - if object cannot located.
      • getAgentGroup

        public String getAgentGroup​(String realmName,
                                    String universalId)
                             throws AMConsoleException
        Returns the group of which agent belongs to.
        Specified by:
        getAgentGroup in interface AgentsModel
        Parameters:
        realmName - Realm where agent group resides.
        universalId - Universal ID of the agent.
        Returns:
        the group of which agent belongs to.
        Throws:
        AMConsoleException - if object cannot located.
      • getAttributeValues

        public Map getAttributeValues​(String realmName,
                                      String universalId,
                                      boolean withInheritValues)
                               throws AMConsoleException
        Returns attribute values of an agent or agent group.
        Specified by:
        getAttributeValues in interface AgentsModel
        Parameters:
        realmName - Realm where agent or agent group resides.
        universalId - Universal ID of the agent/agent group.
        withInheritValues - true to include inherited values.
        Returns:
        attribute values of an agent or agent group.
        Throws:
        AMConsoleException - if object cannot located.
      • setAttributeValues

        public void setAttributeValues​(String universalId,
                                       Map values)
                                throws AMConsoleException
        Modifies agent or agent group attribute values.
        Specified by:
        setAttributeValues in interface AgentsModel
        Parameters:
        universalId - Universal ID of the agent/agent group.
        values - attribute values of an agent or agent group.
        Throws:
        AMConsoleException - if object cannot located.
      • setGroup

        public boolean setGroup​(String realmName,
                                String universalId,
                                String groupName)
                         throws AMConsoleException
        Modifies agent's group.
        Specified by:
        setGroup in interface AgentsModel
        Parameters:
        realmName - realm where agent resides.
        universalId - Universal ID of the agent.
        groupName - Name of group.
        Returns:
        true if group is set.
        Throws:
        AMConsoleException - if object cannot located.
      • getSecurityMechanisms

        public Map getSecurityMechanisms​(String agentType)
        Returns a map of i18n key to supported security mechanism.
        Specified by:
        getSecurityMechanisms in interface AgentsModel
        Parameters:
        agentType - Type of agent.
        Returns:
        a map of i18n key to supported security mechanism.
      • getSTSConfigurations

        public Map getSTSConfigurations()
        Returns map of secure token service configurations.
        Specified by:
        getSTSConfigurations in interface AgentsModel
        Returns:
        map of secure token service configurations.
      • getDiscoveryConfigurations

        public Map getDiscoveryConfigurations()
        Returns map of discovery configurations.
        Specified by:
        getDiscoveryConfigurations in interface AgentsModel
        Returns:
        map of discovery configurations.
      • isAgentGroup

        public boolean isAgentGroup​(String universalId)
        Returns true if the identity if an agent group.
        Specified by:
        isAgentGroup in interface AgentsModel
        Parameters:
        universalId - Universal ID of the agent/agent group.
        Returns:
        true if the identity if an agent group.
      • getInheritedPropertyNames

        public Set getInheritedPropertyNames​(String realmName,
                                             String universalId)
        Returns a set of inherited property names
        Specified by:
        getInheritedPropertyNames in interface AgentsModel
        Parameters:
        realmName - Realm where agent resides
        universalId - Universal ID of the agent.
        Returns:
        a set of inherited property names.
      • getAttributeSchemas

        public Map getAttributeSchemas​(String agentType,
                                       Collection attributeNames)
        Returns attribute schemas of a given set of attributes.
        Specified by:
        getAttributeSchemas in interface AgentsModel
        Parameters:
        agentType - Agent type.
        Returns:
        attribute schemas of a given set of attributes.
      • getAgentGroupValues

        public Map getAgentGroupValues​(String realmName,
                                       String agentId,
                                       Set attrNames)
                                throws AMConsoleException
        Returns attribute values of agent's group.
        Specified by:
        getAgentGroupValues in interface AgentsModel
        Parameters:
        realmName - Realm where agent group resides
        agentId - Universal Id of the agent.
        attrNames - Attribute Names of interests.
        Returns:
        attribute values of agent's group.
        Throws:
        AMConsoleException - if unable to get the attribute values.
      • getTokenConversionTypes

        public List getTokenConversionTypes()
        Returns Token Conversion Types.
        Specified by:
        getTokenConversionTypes in interface AgentsModel
        Returns:
        Token Conversion Types.
      • isCentralized

        public boolean isCentralized​(String uid)
        Returns true if repository is centralized.
        Specified by:
        isCentralized in interface AgentsModel
        Parameters:
        uid - Agent's universal ID.
        Returns:
        true if repository is centralized.