public class ServiceInstance extends Object
ServiceInstance
provides methods to manage service's
instance variables.Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String attrName,
Set values)
Adds the given attribute name and values to the attribute set.
|
Map |
getAttributes()
Returns the attributes that are associated with the service's instances.
|
String |
getGroup()
Returns the group name from which the configuration parameters for the
instance must be obtained.
|
String |
getName()
Returns the instance name.
|
String |
getServiceName()
Returns the service name.
|
String |
getURI()
Returns the URL of the service.
|
String |
getVersion()
Returns the service version.
|
void |
removeAttribute(String attrName)
Removes the specified attribute name and its values from the attribute
set.
|
void |
removeAttributeValues(String attrName,
Set values)
Removes the specified attribute's values.
|
void |
replaceAttributeValue(String attrName,
String oldValue,
String newValue)
Replaces the attribute's old value with the new value.
|
void |
replaceAttributeValues(String attrName,
Set oldValues,
Set newValues)
Replaces the attribute's old values with the new values
|
void |
setAttributes(Map attrs)
Sets the attributes that are specific to the service instance.
|
void |
setGroup(String groupName)
Sets the group name for this instance.
|
void |
setURI(String uri)
Sets the URI for the service instance.
|
String |
toString()
Returns the String representation of the
ServiceInstance
object. |
String |
toXML() |
protected void |
validate() |
protected void |
validateServiceInstance() |
public String getName()
public String getServiceName()
public String getVersion()
public String getGroup()
public void setGroup(String groupName) throws SSOException, SMSException
groupName
- name of group.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic String getURI()
null
if the
service does not have an URI.null
if the
service does not have an URI.public void setURI(String uri) throws SSOException, SMSException
uri
- URI of the service instance.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic String toString()
ServiceInstance
object.public Map getAttributes()
public void setAttributes(Map attrs) throws SSOException, SMSException
attrs
- map of attribute name to values.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic void addAttribute(String attrName, Set values) throws SSOException, SMSException
attrName
- name of attribute.values
- values to be added.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic void removeAttribute(String attrName) throws SSOException, SMSException
attrName
- name of attribute.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic void removeAttributeValues(String attrName, Set values) throws SSOException, SMSException
attrName
- name of attribute.values
- values to be removed.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic void replaceAttributeValue(String attrName, String oldValue, String newValue) throws SSOException, SMSException
attrName
- name of attribute.oldValue
- old value.newValue
- new value.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic void replaceAttributeValues(String attrName, Set oldValues, Set newValues) throws SSOException, SMSException
attrName
- name of attribute.oldValues
- old values.newValues
- new values.SSOException
- if the user's single sign on token is invalid or expiredSMSException
- if an error occurred while performing the operationpublic String toXML()
protected void validate()
protected void validateServiceInstance() throws SMSException
SMSException
Copyright © 2010-2018, ForgeRock All Rights Reserved.