public class ServiceSchemaManager extends Object
ServiceSchemaManager
provides interfaces to manage
the service's schema. It provides access to ServiceSchema
,
which represents a single "schema" in the service.Constructor and Description |
---|
ServiceSchemaManager(SSOToken token,
String serviceName,
String version)
Creates an instance of
ServiceSchemaManager for the given service and version
pair. |
ServiceSchemaManager(String serviceName,
SSOToken token)
Constructor for service's schema manager to manage the attributes and
sub configurations.
|
Modifier and Type | Method and Description |
---|---|
String |
addListener(ServiceListener listener)
Registers for changes to service's schema.
|
void |
addPluginInterface(String interfaceName,
String interfaceClass,
String i18nKey)
Adds a new plugin interface objct to service's schema.
|
boolean |
equals(Object o)
Returns true if the given object equals this
object.
|
protected Document |
getDocumentCopy() |
ServiceSchema |
getDynamicSchema()
Returns the dynamic service configuration schema.
|
ServiceSchema |
getGlobalSchema()
Returns the global service configuration schema.
|
String |
getI18NFileName()
Returns the I18N properties file name for the
service.
|
String |
getI18NJarURL()
Returns the URL of the JAR file that contains the
I18N properties file.
|
String |
getI18NKey()
Returns i18nKey of the schema.
|
String |
getLastModifiedTime()
Returns the last modified time stamp of this service schema.
|
String |
getName()
Returns the name of the service.
|
ServiceSchema |
getOrganizationCreationSchema()
Returns the organization creation configuration schema if present; else
returns
null |
ServiceSchema |
getOrganizationSchema()
Returns the organization service configuration
schema.
|
PluginInterface |
getPluginInterface(String pluginInterfaceName)
Returns the
PluginInterface object of the service for the
specified plugin interface name |
Set |
getPluginInterfaceNames()
Returns the names of the plugin interfaces used by the service
|
PluginSchema |
getPluginSchema(String pluginSchemaName,
String interfaceName,
String orgName)
Returns the PluginSchema object given the schema name and the interface
name for the specified organization.
|
Set |
getPluginSchemaNames(String interfaceName,
String orgName)
Returns the names of plugins configured for the plugin interface.
|
ServiceSchema |
getPolicySchema()
Returns the policy service configuration schema.
|
String |
getPropertiesViewBeanURL()
Returns URL of the view bean for the service
|
String |
getResourceName()
Returns the service's resource name for CREST representation, or the
service name if a resource name is not defined.
|
int |
getRevisionNumber()
iPlanet_PUBLIC-METHOD Returns the revision number of the service schema.
|
InputStream |
getSchema()
Returns the service schema in XML for this service.
|
ServiceSchema |
getSchema(SchemaType type)
Returns the configuration schema for the given
schema type
|
ServiceSchema |
getSchema(String type)
Returns the configuration schema for the given
schema type
|
Set<SchemaType> |
getSchemaTypes()
Returns the schema types available with this
service.
|
Set |
getServiceAttributeNames(SchemaType type)
Returns the attribute schemas for the given schema
type excluding status and service identifier attributes.
|
String |
getServiceHierarchy()
Returns the service's hierarchy.
|
ServiceSchema |
getUserSchema()
Returns the user service configuration schema.
|
String |
getVersion()
Returns the version of the service.
|
int |
hashCode() |
boolean |
isSSOTokenValid()
Returns true if admin token cached within this class is valid
|
<E extends Exception> |
modifySchema(org.forgerock.util.Function<Document,Boolean,E> modifier) |
void |
removeListener(String listenerID)
Removes the listener from the service for the given
listener ID.
|
void |
removePluginInterface(String interfacename)
Removes the plugin interface object from the service schema.
|
protected void |
replaceSchema(Document document) |
void |
replaceSchema(InputStream xmlServiceSchema)
Replaces the existing service schema with the given
schema defined by the XML input stream that follows the SMS DTD.
|
void |
setI18NFileName(String url)
Sets the I18N properties file name for the service
|
void |
setI18NJarURL(String url)
Sets the URL of the JAR file that contains the I18N
properties
|
void |
setI18NKey(String i18nKey)
Sets the i18nKey of the schema.
|
void |
setPropertiesViewBeanURL(String url)
Sets the URL of the view bean for the service.
|
void |
setResourceName(String name)
Sets the service's resource name for CREST representation.
|
void |
setRevisionNumber(int revisionNumber)
iPlanet_PUBLIC-METHOD Sets the revision number for the service schema.
|
void |
setServiceHierarchy(String newhierarchy)
Sets the service's hierarchy
|
String |
toString()
Returns the string representation of the Service
Schema.
|
String |
toXML(AMEncryption encryptObj) |
public ServiceSchemaManager(String serviceName, SSOToken token) throws SMSException, SSOException
SMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredpublic ServiceSchemaManager(SSOToken token, String serviceName, String version) throws SMSException, SSOException
ServiceSchemaManager
for the given service and version
pair. It requires an user identity, that will used to perform operations
with. It is assumed that the application calling this constructor should
authenticate the user.token
- single sign on token of the user identity on whose behalf the
operations are performed.serviceName
- the name of the service.version
- the version of the service.SMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredpublic String getName()
public String getVersion()
public String getI18NFileName()
public void setI18NFileName(String url) throws SMSException, SSOException
url
- properties file nameSMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredpublic String getI18NJarURL()
CLASSPATH
.I18N
properties file.public void setI18NJarURL(String url) throws SMSException, SSOException
url
- URLSMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredpublic String getServiceHierarchy()
public void setServiceHierarchy(String newhierarchy) throws SMSException, SSOException
newhierarchy
- service hierarchySMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredpublic String getI18NKey()
public void setI18NKey(String i18nKey) throws SMSException, SSOException
i18nKey
- i18nKey
of the schema.SMSException
- if an error occurred while trying to perform the operation.SSOException
- if the single sign on token is invalid or expired.public String getPropertiesViewBeanURL()
public void setPropertiesViewBeanURL(String url) throws SMSException, SSOException
url
- of the view bean for the service.SMSException
- if an error occurred while trying to perform the operation.SSOException
- if the single sign on token is invalid or expired.public String getResourceName()
public void setResourceName(String name) throws SMSException, SSOException
name
- resource name for CREST representationSMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredpublic int getRevisionNumber()
public void setRevisionNumber(int revisionNumber) throws SMSException, SSOException
revisionNumber
- revision number of the service schema.SMSException
- if there is a problem setting the value in the data store.SSOException
- If the user has an invalid SSO token.public Set<SchemaType> getSchemaTypes() throws SMSException
SchemaTypes
in this service.SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getSchema(String type) throws SMSException
type
- schema type.SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getSchema(SchemaType type) throws SMSException
type
- schema type.SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getOrganizationCreationSchema() throws SMSException
null
SMSException
- if an error occurred while trying to perform the operationpublic Set getServiceAttributeNames(SchemaType type) throws SMSException
type
- schema type.SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getGlobalSchema() throws SMSException
SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getOrganizationSchema() throws SMSException
SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getDynamicSchema() throws SMSException
SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getUserSchema() throws SMSException
SMSException
- if an error occurred while trying to perform the operationpublic ServiceSchema getPolicySchema() throws SMSException
SMSException
- if an error occurred while trying to perform the operationpublic InputStream getSchema() throws SMSException
SMSException
- if an error occurred while trying to perform the operationpublic void replaceSchema(InputStream xmlServiceSchema) throws SSOException, SMSException, IOException
xmlServiceSchema
- the XML format of the service schemaSMSException
- if an error occurred while trying to perform the operationSSOException
- if the single sign on token is invalid or expiredIOException
- if an error occurred with the InputStream
public boolean equals(Object o)
public String toString()
public String addListener(ServiceListener listener)
listener
- callback object that will be invoked when schema changes.public void removeListener(String listenerID)
listenerID
- the listener ID issued when the listener was registeredpublic String getLastModifiedTime() throws SMSException, SSOException
yyyyMMddhhmmss
SMSException
- if there is an error trying to read from the
datastore.SSOException
- if the single sign-on token of the user is invalid.public Set getPluginInterfaceNames()
public PluginInterface getPluginInterface(String pluginInterfaceName)
PluginInterface
object of the service for the
specified plugin interface namepluginInterfaceName
- name of the plugin interfacenull
public void addPluginInterface(String interfaceName, String interfaceClass, String i18nKey) throws SMSException, SSOException
interfaceName
- name for the plugin interfaceinterfaceClass
- fully qualified interface class namei18nKey
- I18N key that will by used by UI to get messages to display
the interface nameSMSException
SSOException
public void removePluginInterface(String interfacename) throws SMSException, SSOException
interfacename
- Name of the plugin class.SMSException
SSOException
public Set getPluginSchemaNames(String interfaceName, String orgName) throws SMSException
null
, returns the plugins configured for
the "root" organization.SMSException
public PluginSchema getPluginSchema(String pluginSchemaName, String interfaceName, String orgName) throws SMSException
null
, returns the PluginSchema for the "root" organization.SMSException
public boolean isSSOTokenValid()
protected Document getDocumentCopy() throws SMSException
SMSException
protected void replaceSchema(Document document) throws SSOException, SMSException
SSOException
SMSException
public <E extends Exception> void modifySchema(org.forgerock.util.Function<Document,Boolean,E> modifier) throws E extends Exception, SMSException, SSOException
E extends Exception
SMSException
SSOException
public String toXML(AMEncryption encryptObj) throws SMSException
SMSException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.