Class AgentsModelImpl
- java.lang.Object
-
- com.sun.identity.console.base.model.AMModelBase
-
- com.sun.identity.console.agentconfig.model.AgentsModelImpl
-
- All Implemented Interfaces:
AgentsModel,AMAdminConstants,AMModel
public class AgentsModelImpl extends AMModelBase implements AgentsModel
Agent Configuration model impplementation.
-
-
Field Summary
-
Fields inherited from class com.sun.identity.console.base.model.AMModelBase
debug, locale, locationDN
-
Fields inherited from interface com.sun.identity.console.base.model.AMAdminConstants
ADMIN_CONSOLE_SERVICE, ADMIN_DISPLAY_ATTRIBUTE, ADMIN_DISPLAY_READONLY_ATTRIBUTE, AGENT_REPOSITORY_LOCATION_ATTR, AGENTS_NODE_ID, AMSDK_DEBUG_FILENAME, ATTR_USER_OLD_PASSWORD, ATTR_USER_PASSWORD, ATTR_USER_RESOURCE_OFFERING, ATTR_USER_STATUS, AUTH_CONFIG_SERVICE, CDM_CONTENT_TYPE_PROPERTY_NAME, CHOICES, CONFIGURATION_NODE_ID, CONSOLE_DEBUG_FILENAME, CONSOLE_LOCATION_DN, CONSOLE_ORG_CUSTOM_JSP_DIRECTORY, CONSOLE_UM_ENABLED_ATTR, CONSOLE_USER_ATTRS_SEARCH_KEY, CONSOLE_USER_SEARCH_KEY, CONSOLE_USER_SEARCH_RETURN_KEY, CORE_AUTH_SERVICE, CURRENT_ORG, CURRENT_PROFILE, CURRENT_REALM, DEFAULT_RB, DEFAULT_SEARCH_TIMEOUT, DISCOVERY_SERVICE, DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, DISCOVERY_SERVICE_NAME_DYNAMIC_DISCO_ENTRIES, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_ID_MAPPER, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_PROVIDER_ID, DISPLAY_ATTRIBUTE, DISPLAY_READONLY_ATTRIBUTE, DYN_LINK_COMPONENT_NAME, ENCRYPTED, FED_TAB_ID, G11N_SERIVCE_COMMON_NAME_FORMAT, G11N_SERVICE_NAME, IDREPO_SERVICE_NAME, IMAGES_PRIMARY_PRODUCT_NAME_PNG, OPERATION_ADD, OPERATION_EDIT, OPTIONAL_ATTRIBUTE, ORGANIZATION_NODE_ID, PASSWORD, PERMISSION_DELEGATE, PERMISSION_MODIFY, PERMISSION_READ, PG_SESSION_INIT_PAGETRAIL, PLATFORM_SERVICE, POLICY_SELECTED_RESPONSE_PROVIDER, POLICY_SERVICE, PREVIOUS_ORGANIZATION, PREVIOUS_REALM, PREVIOUS_TAB_ID, PW_RESET_SERVICE, REALM_NODE_ID, REQUIRED_ATTRIBUTE, REST_STS_SERVICE, ROLE_DISPLAY_OPTION_ATTRIBUTE_NAME, SAML_SERVICE, SAVE_VB_NAME, SERVICE_NAME, SESSION_SERVICE, SESSIONS_NODE_ID, SOAP_STS_SERVICE, SSO_TOKEN_LOCALE_ATTRIBUTE_NAME, SSO_TOKEN_ORGANIZATION_ATTRIBUTE_NAME, STRING_ACTIVE, STRING_FALSE, STRING_INACTIVE, SUBJECTS_NODE_ID, TAB_AGENT_PREFIX, TAB_AGENT_PREFIX_INT, URL_LOGIN, URL_LOGOUT, USER_SERVICE, USER_SERVICE_PREFERRED_LOCALE, VALUES
-
Fields inherited from interface com.sun.identity.console.base.model.AMModel
CONSOLE_PAGING_SIZE_ATTR, CONSOLE_SEARCH_RESULT_LIMIT_ATTR, CONSOLE_SEARCH_TIME_LIMIT_ATTR, DEFAULT_PAGE_SIZE, DEFAULT_SEARCH_RESULT_LIMIT, DEFAULT_SEARCH_TIME_LIMIT
-
-
Constructor Summary
Constructors Constructor Description AgentsModelImpl(jakarta.servlet.http.HttpServletRequest req, Map map)Creates an instance of this model implementation class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateAgent(String realmName, String name, String type, String password, String choice)Creates agent.voidcreateAgent(String realmName, String name, String type, String password, String serverURL, String agentURL)Creates agent.voidcreateAgentGroup(String realmName, String name, String type)Creates agent group.voidcreateAgentGroup(String realmName, String name, String type, String serverURL, String agentURL)Creates agent group.voidcreateAgentLocal(String realmName, String name, String type, String password, String agentURL)Creates localized agent.voiddeleteAgentGroups(String realmName, Set agentGroups)Deletes agent groups.voiddeleteAgents(String realmName, Set agents)Deletes agents.StringgetAgentGroup(String realmName, String universalId)Returns the group of which agent belongs to.StringgetAgentGroupId(String realmName, String universalId)Returns the group of which agent belongs to.SetgetAgentGroupMembers(String agentId)Returns a set of members of an agent group.intgetAgentGroupNames(String realmName, Set setTypes, String pattern, Set results)Returns agent group names.MapgetAgentGroupValues(String realmName, String agentId, Set attrNames)Returns attribute values of agent's group.intgetAgentNames(String realmName, Set setTypes, String pattern, Set results)Returns agent names.StringgetAgentType(AMIdentity amid)Returns agent type.MapgetAttributeSchemas(String agentType, Collection attributeNames)Returns attribute schemas of a given set of attributes.MapgetAttributeValues(String realmName, String universalId, boolean withInheritValues)Returns attribute values of an agent or agent group.SetgetAuthenticationChains()Returns all the authentication chains in a realm.MapgetDiscoveryConfigurations()Returns map of discovery configurations.StringgetDisplayName(String universalId)Returns display name of an agent/group.MapgetGroupAttributeValues(String realmName, String groupName)Returns attribute values of an agent group.SetgetInheritedPropertyNames(String realmName, String universalId)Returns a set of inherited property namesMapgetSecurityMechanisms(String agentType)Returns a map of i18n key to supported security mechanism.MapgetSTSConfigurations()Returns map of secure token service configurations.ListgetTokenConversionTypes()Returns Token Conversion Types.booleanisAgentGroup(String universalId)Returnstrueif the identity if an agent group.booleanisCentralized(String uid)Returnstrueif repository is centralized.voidsetAttributeValues(String universalId, Map values)Modifies agent or agent group attribute values.booleansetGroup(String realmName, String universalId, String groupName)Modifies agent's group.voidupdateAgentConfigInheritance(String universalId, Map inherit)Updates inheritance setting.-
Methods inherited from class com.sun.identity.console.base.model.AMModelBase
encryptString, getAttributesToDisplay, getAuthenticatedOrgDN, getClientType, getConsoleAttributes, getConsoleDirectory, getErrorString, getGlobalPageSize, getGlobalSearchResultLimit, getGlobalSearchTimeOutLimit, getLocalizedServiceName, getLocalizedServiceName, getLocalizedString, getLocationDN, getLogoutURL, getPageSize, getRandomString, getRealmNames, getResourceBundle, getSearchResultLimit, getSearchTimeOutLimit, getServerInstanceForLogMsg, getServicePropertiesViewBeanURL, getServiceResourceBundle, getServiceSchemaManager, getSpecialUsers, getStartDN, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserAdditionalSearchAttributes, getUserDisplayAttribute, getUserDisplayName, getUserDN, getUserInfo, getUserLocale, getUserName, getUserOrganization, getUserSearchAttribute, getUserSSOToken, ignoreUserProfile, initialize, isAmadminUser, isAMSDKEnabled, isDisplayed, logEvent, setLocationDN, validateUserStatusEntry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.identity.console.base.model.AMModel
getClientType, getConsoleDirectory, getErrorString, getLocalizedServiceName, getLocalizedString, getLocationDN, getPageSize, getRandomString, getRealmNames, getServicePropertiesViewBeanURL, getSpecialUsers, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserDisplayName, getUserDN, getUserLocale, getUserName, getUserSSOToken, ignoreUserProfile, isAmadminUser, isAMSDKEnabled, logEvent, setLocationDN
-
-
-
-
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:
getAgentNamesin interfaceAgentsModel- 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:
getAgentGroupNamesin interfaceAgentsModel- 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.
-
getAgentType
public String getAgentType(AMIdentity amid) throws AMConsoleException
Returns agent type.- Specified by:
getAgentTypein interfaceAgentsModel- Parameters:
amid- Identity Object.- Returns:
- agent type.
- Throws:
AMConsoleException- if agent type cannot be obtained.
-
createAgent
public void createAgent(String realmName, String name, String type, String password, String choice) throws AMConsoleException
Creates agent.- Specified by:
createAgentin interfaceAgentsModel- 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.
-
createAgentLocal
public void createAgentLocal(String realmName, String name, String type, String password, String agentURL) throws AMConsoleException
Creates localized agent.- Specified by:
createAgentLocalin interfaceAgentsModel- Parameters:
realmName- Realm where agent resides.name- Name of agent.type- Type of agent.password- Password of agent.agentURL- Agent URL.- Throws:
AMConsoleException- if agent cannot be created.
-
createAgent
public void createAgent(String realmName, String name, String type, String password, String serverURL, String agentURL) throws AMConsoleException
Creates agent.- Specified by:
createAgentin interfaceAgentsModel- Parameters:
realmName- Realm where agent resides.name- Name of agent.type- Type of agent.password- Password of agent.serverURL- Server URL.agentURL- Agent URL.- Throws:
AMConsoleException- if agent cannot be created.
-
createAgentGroup
public void createAgentGroup(String realmName, String name, String type, String serverURL, String agentURL) throws AMConsoleException
Creates agent group.- Specified by:
createAgentGroupin interfaceAgentsModel- Parameters:
realmName- Realm where agent group resides.name- Name of agent group.type- Type of agent group.serverURL- Server URL.agentURL- Agent URL.- Throws:
AMConsoleException- if agent group cannot be created.
-
createAgentGroup
public void createAgentGroup(String realmName, String name, String type) throws AMConsoleException
Creates agent group.- Specified by:
createAgentGroupin interfaceAgentsModel- Parameters:
realmName- Realm where agent group resides.name- Name of agent group.type- Type of agent group.- Throws:
AMConsoleException- if agent group cannot be created.
-
deleteAgents
public void deleteAgents(String realmName, Set agents) throws AMConsoleException
Deletes agents.- Specified by:
deleteAgentsin interfaceAgentsModel- Parameters:
realmName- Realm where agent resides.agents- Set of agent names to be deleted.- Throws:
AMConsoleException- if agents cannot be deleted.
-
deleteAgentGroups
public void deleteAgentGroups(String realmName, Set agentGroups) throws AMConsoleException
Deletes agent groups.- Specified by:
deleteAgentGroupsin interfaceAgentsModel- 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:
getAgentGroupIdin interfaceAgentsModel- 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:
getAgentGroupin interfaceAgentsModel- 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:
getAttributeValuesin interfaceAgentsModel- Parameters:
realmName- Realm where agent or agent group resides.universalId- Universal ID of the agent/agent group.withInheritValues-trueto include inherited values.- Returns:
- attribute values of an agent or agent group.
- Throws:
AMConsoleException- if object cannot located.
-
getGroupAttributeValues
public Map getGroupAttributeValues(String realmName, String groupName) throws AMConsoleException
Returns attribute values of an agent group.- Specified by:
getGroupAttributeValuesin interfaceAgentsModel- Parameters:
realmName- Realm where agent group resides.groupName- agent group.- Returns:
- attribute values of an 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:
setAttributeValuesin interfaceAgentsModel- 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:
setGroupin interfaceAgentsModel- Parameters:
realmName- realm where agent resides.universalId- Universal ID of the agent.groupName- Name of group.- Returns:
trueif group is set.- Throws:
AMConsoleException- if object cannot located.
-
getAuthenticationChains
public Set getAuthenticationChains() throws AMConsoleException
Returns all the authentication chains in a realm.- Specified by:
getAuthenticationChainsin interfaceAgentsModel- Returns:
- all the authentication chains in a realm.
- Throws:
AMConsoleException- if authentication chains cannot be returned.
-
getSecurityMechanisms
public Map getSecurityMechanisms(String agentType)
Returns a map of i18n key to supported security mechanism.- Specified by:
getSecurityMechanismsin interfaceAgentsModel- 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:
getSTSConfigurationsin interfaceAgentsModel- Returns:
- map of secure token service configurations.
-
getDiscoveryConfigurations
public Map getDiscoveryConfigurations()
Returns map of discovery configurations.- Specified by:
getDiscoveryConfigurationsin interfaceAgentsModel- Returns:
- map of discovery configurations.
-
getDisplayName
public String getDisplayName(String universalId) throws AMConsoleException
Returns display name of an agent/group.- Specified by:
getDisplayNamein interfaceAgentsModel- Parameters:
universalId- Universal ID of the agent/agent group.- Returns:
- display name of an agent/group.
- Throws:
AMConsoleException- if object cannot located.
-
isAgentGroup
public boolean isAgentGroup(String universalId)
Returnstrueif the identity if an agent group.- Specified by:
isAgentGroupin interfaceAgentsModel- Parameters:
universalId- Universal ID of the agent/agent group.- Returns:
trueif the identity if an agent group.
-
getInheritedPropertyNames
public Set getInheritedPropertyNames(String realmName, String universalId)
Returns a set of inherited property names- Specified by:
getInheritedPropertyNamesin interfaceAgentsModel- Parameters:
realmName- Realm where agent residesuniversalId- 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:
getAttributeSchemasin interfaceAgentsModel- Parameters:
agentType- Agent type.- Returns:
- attribute schemas of a given set of attributes.
-
updateAgentConfigInheritance
public void updateAgentConfigInheritance(String universalId, Map inherit) throws AMConsoleException
Updates inheritance setting.- Specified by:
updateAgentConfigInheritancein interfaceAgentsModel- Parameters:
universalId- Universal ID of the agent.inherit- Map of attribute name to either "1" or "0". "1" to inherit and "0" not.- Throws:
AMConsoleException- if update failed.
-
getAgentGroupValues
public Map getAgentGroupValues(String realmName, String agentId, Set attrNames) throws AMConsoleException
Returns attribute values of agent's group.- Specified by:
getAgentGroupValuesin interfaceAgentsModel- Parameters:
realmName- Realm where agent group residesagentId- 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.
-
getAgentGroupMembers
public Set getAgentGroupMembers(String agentId) throws AMConsoleException
Returns a set of members of an agent group.- Specified by:
getAgentGroupMembersin interfaceAgentsModel- Parameters:
agentId- Universal Id of the agent group.- Throws:
AMConsoleException- if members cannot be returned.
-
getTokenConversionTypes
public List getTokenConversionTypes()
Returns Token Conversion Types.- Specified by:
getTokenConversionTypesin interfaceAgentsModel- Returns:
- Token Conversion Types.
-
isCentralized
public boolean isCentralized(String uid)
Returnstrueif repository is centralized.- Specified by:
isCentralizedin interfaceAgentsModel- Parameters:
uid- Agent's universal ID.- Returns:
trueif repository is centralized.
-
-