public class AgentConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AGENT_ROOT_URL |
static String |
AGENT_TYPE_2_DOT_2_AGENT |
static String |
AGENT_TYPE_AGENT_AUTHENTICATOR |
static String |
AGENT_TYPE_J2EE |
static String |
AGENT_TYPE_OAUTH2 |
static String |
AGENT_TYPE_WEB |
static String |
ATTR_CONFIG_REPO |
static String |
ATTR_NAME_FREE_FORM |
static String |
ATTR_NAME_PWD |
static String |
DEVICE_KEY |
static String |
VAL_CONFIG_REPO_LOCAL |
Modifier and Type | Method and Description |
---|---|
static void |
AddAgentToGroup(AMIdentity group,
AMIdentity agent)
Adds an agent to a group.
|
static AMIdentity |
createAgent(SSOToken ssoToken,
String realm,
String agentName,
String agentType,
Map attrValues)
Creates an agent.
|
static void |
createAgent(SSOToken ssoToken,
String realm,
String agentName,
String agentType,
Map attrValues,
String serverURL,
String agentURL)
Creates an agent.
|
static void |
createAgentGroup(SSOToken ssoToken,
String realm,
String agentGroupName,
String agentType,
Map attrValues)
Creates an agent group.
|
static void |
createAgentGroup(SSOToken ssoToken,
String realm,
String agentGroupName,
String agentType,
Map attrValues,
String serverURL,
String agentURL)
Creates an agent group.
|
static void |
createAgentLocal(SSOToken ssoToken,
String realm,
String agentName,
String agentType,
Map attrValues,
String agentURL)
Creates a localized agent.
|
static void |
deleteAgentGroups(SSOToken ssoToken,
String realm,
Set agentGroups)
Deletes agent groups.
|
static Map |
getAgentAttributes(AMIdentity amid,
boolean reformat)
Returns agent's attribute values.
|
static Map |
getAgentAttributes(SSOToken ssoToken,
String realm,
String agentName)
Returns agent's attribute values.
|
static Map |
getAgentAttributes(SSOToken ssoToken,
String realm,
String agentName,
boolean bInherit)
Returns agent's attribute values.
|
static AttributeSchema |
getAgentAttributeSchema(String name,
String agentTypeName)
Returns attribute schema of a given agent type.
|
static Set |
getAgentAttributeSchemas(String agentTypeName)
Returns a set of attribute schemas of a given agent type.
|
static Map |
getAgentGroupAttributes(SSOToken ssoToken,
String realm,
String agentGroupName)
Returns agent group's attribute values.
|
static String |
getAgentType(AMIdentity amid)
For the given Agent identity, return the value that represents the agent type.
|
static Set |
getAgentTypes()
Returns a set of supported agent types.
|
static Map |
getAttributeSchemas(String agentType,
Collection names)
Returns attribute schema for a given set of attribute names.
|
static Set |
getAttributesSchemaNames(AMIdentity amid,
AttributeSchema.Syntax syntax)
Returns a set of attribute schema names whose schema match a given
syntax.
|
static Set |
getAttributesSchemaNames(String agentType,
AttributeSchema.Type type)
Returns a set of attribute schema names whose schema match a given
type.
|
static Map |
getChoiceValues(String name,
String agentType)
Returns choice values of an attribute schema.
|
static Map |
getDefaultValues(String agentType,
boolean bGroup)
Returns the default values of attribute schemas
of a given agent type.
|
static Set |
getInheritedAttributeNames(AMIdentity amid)
Returns the inherited attribute names.
|
static Set |
getLocalPropertyNames(String agentType)
Returns a set of local property name if an agent type.
|
static String |
getResourceBundleName()
Returns resource bundle name of agent service.
|
static ResourceBundle |
getServiceResourceBundle(Locale locale) |
static boolean |
removeAgentGroup(AMIdentity amid,
AMIdentity groupToRemove)
Removes agent from it group.
|
static void |
removeDefaultDuplicates(Map<String,Set<String>> attributeValues,
Map<String,Set<String>> finalAttributes)
For the given map of user supplied attributeValues, use the keys to find duplicate default
values and remove them from the finalAttributes which will end up being used to create the
actual agent configuration.
|
static boolean |
setAgentGroup(AMIdentity amid,
AMIdentity newGroup)
Set agent group.
|
static boolean |
setAgentGroup(SSOToken ssoToken,
String realm,
AMIdentity amid,
String groupName)
Set agent group.
|
static boolean |
setAgentGroup(SSOToken ssoToken,
String realm,
String universalId,
String groupName)
Set agent group.
|
static boolean |
supportLocalProperties(String agentType)
Returns
true if an agent type support local properties. |
static void |
tagswapAttributeValues(Map attributeValues,
String agentType,
FQDNUrl serverURL,
FQDNUrl agentURL) |
static void |
updateAgent(SSOToken ssoToken,
String realm,
String agentName,
Map attrValues,
boolean bSet)
Updates agent attribute values.
|
static void |
updateAgentGroup(SSOToken ssoToken,
String realm,
String agentGroupName,
Map attrValues)
Updates agent group attribute values.
|
static void |
updateAgentGroup(SSOToken ssoToken,
String realm,
String agentGroupName,
Map attrValues,
boolean bSet)
Updates agent group attribute values.
|
static void |
updateInheritance(AMIdentity amid,
Map inherit)
Updates the inherited attribute names.
|
static void |
validateAgentRootURLs(Map map) |
public static final String AGENT_TYPE_J2EE
public static final String AGENT_TYPE_WEB
public static final String AGENT_TYPE_OAUTH2
public static final String AGENT_TYPE_2_DOT_2_AGENT
public static final String AGENT_TYPE_AGENT_AUTHENTICATOR
public static final String ATTR_NAME_PWD
public static final String ATTR_NAME_FREE_FORM
public static final String ATTR_CONFIG_REPO
public static final String VAL_CONFIG_REPO_LOCAL
public static final String AGENT_ROOT_URL
public static String DEVICE_KEY
public static Set getAgentTypes() throws SMSException, SSOException
SMSException
SSOException
public static void createAgentGroup(SSOToken ssoToken, String realm, String agentGroupName, String agentType, Map attrValues) throws IdRepoException, SSOException, SMSException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Realm where group resides.agentGroupName
- Name of agent group.agentType
- Type of agent group.attrValues
- Map of attribute name to its values.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.ConfigurationException
- if there are missing information in
server or agent URL; or invalid agent type.public static void createAgentGroup(SSOToken ssoToken, String realm, String agentGroupName, String agentType, Map attrValues, String serverURL, String agentURL) throws IdRepoException, SSOException, SMSException, MalformedURLException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Realm where group resides.agentGroupName
- Name of agent group.agentType
- Type of agent group.attrValues
- Map of attribute name to its values.serverURL
- Server URL.agentURL
- Agent URL.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.MalformedURLException
- if server or agent URL is invalid.ConfigurationException
- if there are missing information in
server or agent URL; or invalid agent typepublic static void createAgent(SSOToken ssoToken, String realm, String agentName, String agentType, Map attrValues, String serverURL, String agentURL) throws IdRepoException, SSOException, SMSException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Realm where agent resides.agentName
- Name of agent.agentType
- Type of agent.attrValues
- Map of attribute name to its values.serverURL
- Server URL.agentURL
- Agent URL.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.ConfigurationException
- if there are missing information in
server or agent URL; or invalid agent type.public static void createAgentLocal(SSOToken ssoToken, String realm, String agentName, String agentType, Map attrValues, String agentURL) throws IdRepoException, SSOException, SMSException, MalformedURLException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Realm where agent resides.agentName
- Name of agent.agentType
- Type of agent.attrValues
- Map of attribute name to its values.agentURL
- Agent URL.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.MalformedURLException
- if server or agent URL is invalid.ConfigurationException
- if there are missing information in
server or agent URL; or invalid agent type.public static AMIdentity createAgent(SSOToken ssoToken, String realm, String agentName, String agentType, Map attrValues) throws IdRepoException, SSOException, SMSException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Realm where agent resides.agentName
- Name of agent.agentType
- Type of agent.attrValues
- Map of attribute name to its values.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.ConfigurationException
- if there are missing information in
server or agent URL; or invalid agent type.public static void validateAgentRootURLs(Map map) throws ConfigurationException
ConfigurationException
public static void removeDefaultDuplicates(Map<String,Set<String>> attributeValues, Map<String,Set<String>> finalAttributes)
com.sun.identity.agents.config.notenforced.url=[[0]=] from defaults is transformed into com.sun.identity.agents.config.notenforced.url[0]= which then clashes with any supplied values like com.sun.identity.agents.config.notenforced.url[0]=[*.gif]
attributeValues
- a map of values supplied when configuring the agentfinalAttributes
- a map of values that will be used to create the agent configuration.public static void tagswapAttributeValues(Map attributeValues, String agentType, FQDNUrl serverURL, FQDNUrl agentURL) throws ConfigurationException
ConfigurationException
public static void updateAgent(SSOToken ssoToken, String realm, String agentName, Map attrValues, boolean bSet) throws IdRepoException, SSOException, SMSException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Name of realm where agent resides.agentName
- Name of agent.attrValues
- Map of attribute name to its values.bSet
- true
to overwrite the values for the
attribute.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.ConfigurationException
- if agent does not exist.public static void updateAgentGroup(SSOToken ssoToken, String realm, String agentGroupName, Map attrValues) throws IdRepoException, SSOException, SMSException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Realm where group resides.agentGroupName
- Name group of agent.attrValues
- Map of attribute name to its values.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.ConfigurationException
- if attribute values map contains invalid
values.public static void updateAgentGroup(SSOToken ssoToken, String realm, String agentGroupName, Map attrValues, boolean bSet) throws IdRepoException, SSOException, SMSException, ConfigurationException
ssoToken
- Single Sign On token that is to be used for creation.realm
- Name of realm where agent resides.agentGroupName
- Name of agent group.attrValues
- Map of attribute name to its values.bSet
- true
to overwrite the values for the
attribute.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.ConfigurationException
- if attribute values map contains invalid
values.public static Set getAgentAttributeSchemas(String agentTypeName) throws SMSException, SSOException
agentTypeName
- Name of agent type.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Map getAgentGroupAttributes(SSOToken ssoToken, String realm, String agentGroupName) throws IdRepoException, SMSException, SSOException
ssoToken
- Single Sign On token that is to be used for query.realm
- Name of realm where agent group resides.agentGroupName
- Name of agent group.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Map getAgentAttributes(SSOToken ssoToken, String realm, String agentName) throws IdRepoException, SMSException, SSOException
ssoToken
- Single Sign On token that is to be used for query.realm
- Realm where agent resides.agentName
- Name of agent.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Map getAgentAttributes(SSOToken ssoToken, String realm, String agentName, boolean bInherit) throws IdRepoException, SMSException, SSOException
ssoToken
- Single Sign On token that is to be used for query.realm
- Realm where agent resides.agentName
- Name of agent.bInherit
- true
to inherit from group.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Map getAgentAttributes(AMIdentity amid, boolean reformat) throws IdRepoException, SMSException, SSOException
amid
- Identity object.reformat
- true
to reformat the values.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static String getAgentType(AMIdentity amid) throws IdRepoException, SSOException
amid
- Identity object containing value.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has expired.public static Set getAttributesSchemaNames(AMIdentity amid, AttributeSchema.Syntax syntax) throws SMSException, SSOException, IdRepoException
amid
- Identity Object. Agent Type is to be gotten from it.syntax
- Syntax.IdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Set getAttributesSchemaNames(String agentType, AttributeSchema.Type type) throws SMSException, SSOException
agentType
- Agent typetype
- AttributeSchema typeIdRepoException
- if there are Id Repository related errors.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static String getResourceBundleName() throws SMSException, SSOException
SMSException
- if Service Schema cannot be located.SSOException
- if admin single sign on token has expired.public static Map getDefaultValues(String agentType, boolean bGroup) throws SMSException, SSOException
agentType
- Type of agent.bGroup
- true
if this is for a group.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Map getChoiceValues(String name, String agentType) throws SMSException, SSOException
name
- Name of attribute schema.agentType
- Type of agent.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static AttributeSchema getAgentAttributeSchema(String name, String agentTypeName) throws SMSException, SSOException
name
- Name of attribute schema.agentTypeName
- Name of agent type.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static Set getInheritedAttributeNames(AMIdentity amid) throws IdRepoException, SSOException, SMSException
amid
- Identity object of the agent.IdRepoException
- if attribute names cannot obtained.SSOException
- if single sign on token is expired or invalid.SMSException
public static void updateInheritance(AMIdentity amid, Map inherit) throws IdRepoException, SSOException, SMSException
amid
- Identity object of the agent.inherit
- Map of attribute name to either "1" or "0". "1" to
inherit and "0" not.IdRepoException
- if attribute names cannot obtained.SSOException
- if single sign on token is expired or invalid.SMSException
public static Map getAttributeSchemas(String agentType, Collection names) throws SMSException, SSOException
agentType
- Agent type.names
- Set of attribute names.SMSException
SSOException
public static ResourceBundle getServiceResourceBundle(Locale locale) throws SMSException, SSOException
SMSException
SSOException
public static void AddAgentToGroup(AMIdentity group, AMIdentity agent) throws IdRepoException, SSOException, ConfigurationException
group
- Agent Group.agent
- Agent.SSOException
- if Single Sign on for accessing identity attribute
values is invalid.IdRepoException
- if unable to access attribute values.ConfigurationException
- if agent's properties are locally stored.public static boolean supportLocalProperties(String agentType)
true
if an agent type support local properties.agentType
- Agent Type.true
if an agent type support local properties.public static Set getLocalPropertyNames(String agentType)
agentType
- Agent Type.public static void deleteAgentGroups(SSOToken ssoToken, String realm, Set agentGroups) throws IdRepoException, SSOException, SMSException
ssoToken
- Single Sign On token that is to be used for deletion.realm
- Realm where agent groups reside.agentGroups
- Set of Agent Group object.IdRepoException
- if unable to delete groups.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layers.public static boolean setAgentGroup(SSOToken ssoToken, String realm, String universalId, String groupName) throws IdRepoException, SSOException, SMSException
true
if group is set.ssoToken
- Single Sign On token that is to be used for this
operation.realm
- Realm name where agent and group reside.universalId
- Universal ID of Agent.groupName
- Name of Group object to be set.true
if group is set.IdRepoException
- if group cannot be set.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layerspublic static boolean setAgentGroup(SSOToken ssoToken, String realm, AMIdentity amid, String groupName) throws IdRepoException, SSOException, SMSException
true
if group is set.ssoToken
- Single Sign On token that is to be used for this
operation.realm
- Realm name where agent and group reside.amid
- Agent object.groupName
- Name of Group object to be set.true
if group is set.IdRepoException
- if group cannot be set.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layerspublic static boolean setAgentGroup(AMIdentity amid, AMIdentity newGroup) throws IdRepoException, SSOException, SMSException
true
if group is set.amid
- Agent object.newGroup
- Group object to be set.true
if group is set.IdRepoException
- if group cannot be set.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layerspublic static boolean removeAgentGroup(AMIdentity amid, AMIdentity groupToRemove) throws IdRepoException, SSOException, SMSException
true
if group is
removed.amid
- Agent object.groupToRemove
- Group object to be removed.true
if group is removed.IdRepoException
- if group cannot be removed.SSOException
- if the Single Sign On token is invalid or has
expired.SMSException
- if there are errors in service management layersCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.