|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sun.identity.sm.ServiceSchema
The class ServiceSchema provides interfaces
to manage the schema information of a service.
The schema for a service can be one of the following types:
GLOBAL, ORGANIZATION, DYNAMIC, USER, and POLICY.
| Method Summary | |
void |
addAttributeSchema(java.io.InputStream xmlAttrSchema)
Adds the attribute schema to this service. |
void |
addSubSchema(java.io.InputStream xmlSubSchema)
Adds the service's sub-schema given the XML inputstream that follows the SMS DTD. |
java.util.Map |
getAttributeDefaults()
Returns a map of all the attribute and their default values in this schema. |
AttributeSchema |
getAttributeSchema(java.lang.String attributeName)
Returns the schema for an attribute given the name of the attribute, defined for this service. |
java.util.Set |
getAttributeSchemaNames()
Returns the names of the schema attributes defined for the service. |
java.util.Set |
getAttributeSchemas()
Returns the attribute schemas defined for the service. |
java.lang.String |
getI18NKey()
Returns the I18N key that points to the description of the service. |
java.lang.String |
getName()
Returns the name of the schema. |
java.lang.String |
getPropertiesViewBeanURL()
Returns the view bean URL for this service |
java.util.Map |
getReadOnlyAttributeDefaults()
Returns an unmodifiable map of all the attribute and their default values in this schema. |
org.w3c.dom.Node |
getSchemaNode()
Returns the Node of this schema element. |
java.util.Set |
getServiceAttributeNames()
Returns the attribute schemas defined for the service that is not a status attribute and is not a service attribute. |
java.lang.String |
getServiceName()
Returns the name of the service. |
SchemaType |
getServiceType()
Returns the schema tyoe |
java.lang.String |
getStatusAttribute()
Returns the name of the status attribute, as defined in the Service schema |
ServiceSchema |
getSubSchema(java.lang.String subSchemaName)
Returns ServiceSchema object given
the name of the service's sub-schema. |
java.util.Set |
getSubSchemaNames()
Returns the names of sub-schemas for the service. |
java.lang.String |
getVersion()
Returns the version of the service. |
void |
removeAttributeDefaults(java.util.Set attrs)
Removes the default values of attributes in the schema. |
void |
removeAttributeSchema(java.lang.String attrName)
Removes the attribute schema from this service. |
void |
removeSubSchema(java.lang.String subSchemaName)
Removes the service's sub-schema from the service. |
void |
setAttributeDefaults(java.util.Map attrs)
Method to change the default values of attributes in the schema. |
void |
setAttributeDefaults(java.lang.String attrName,
java.util.Set values)
Method to change default value for a specific attribute. |
void |
setI18Nkey(java.lang.String key)
Sets the value of the I18N key in the service schema. |
java.lang.String |
toString()
Returns string represenation of the schema |
java.util.Map |
validateAndInheritDefaults(java.util.Map attrMap,
boolean inherit)
This method validates the attrMap against the attributes defined in this schema of the service. |
boolean |
validateAttributes(java.util.Map attributeSet)
Determines whether each attribute in the attribute set is valid. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public java.lang.String getServiceName()
public java.lang.String getVersion()
public java.lang.String getName()
public SchemaType getServiceType()
public java.lang.String getI18NKey()
public void setI18Nkey(java.lang.String key)
throws SMSException,
SSOException
key - Value to be set for the I18N key 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 java.lang.String getPropertiesViewBeanURL()
public java.lang.String getStatusAttribute()
public java.util.Set getAttributeSchemaNames()
public AttributeSchema getAttributeSchema(java.lang.String attributeName)
attributeName - the name of the schema attributepublic java.util.Set getAttributeSchemas()
public java.util.Set getServiceAttributeNames()
public java.util.Map validateAndInheritDefaults(java.util.Map attrMap,
boolean inherit)
throws SMSException
inherit is set to true.attrMap - map of attributesinherit - if true, then inherit the default valuesSMSException - if invalid attribute names are present in
the attrMap
public void addAttributeSchema(java.io.InputStream xmlAttrSchema)
throws SSOException,
SMSException
xmlAttrSchema - the XML format of the attribute schemaSMSException -
public void removeAttributeSchema(java.lang.String attrName)
throws SSOException,
SMSException
attrName - the name of the attribute schemaSMSException, - SSOExceptionpublic java.util.Map getAttributeDefaults()
public java.util.Map getReadOnlyAttributeDefaults()
public void setAttributeDefaults(java.util.Map attrs)
throws SSOException,
SMSException
java.util.Map - A map of the names of AttributeSchema to modify,
and a Set of Values which should replace the default values of
the current schemaSchemaException - com.iplanet.ss.SMSException - com.iplanet.ss.SSOException -
public void setAttributeDefaults(java.lang.String attrName,
java.util.Set values)
throws SchemaException,
SMSException,
SSOException
java.lang.String - Name of the attribute for which defaults
values need to be replaced.java.util.Set - Set of new values to replace the old ones.SchemaException - com.iplaner.sm.SMSException -
public void removeAttributeDefaults(java.util.Set attrs)
throws SMSException,
SSOException
java.util.Set - A set of the names of AttributeSchemacom.iplanet.services.SchemaException - com.sun.identity.sms.SMSException - public java.util.Set getSubSchemaNames()
public ServiceSchema getSubSchema(java.lang.String subSchemaName)
throws SMSException
ServiceSchema object given
the name of the service's sub-schema.subSchemaName - the name of the service's sub-schemaServiceSchema objectSMSException -
public void addSubSchema(java.io.InputStream xmlSubSchema)
throws SSOException,
SMSException
xmlSubSchema - the XML format of the sub-schemaSMSException -
public void removeSubSchema(java.lang.String subSchemaName)
throws SSOException,
SMSException
subSchemaName - the name of the service's sub-schemaSMSException -
public boolean validateAttributes(java.util.Map attributeSet)
throws SMSException
attributeSet - the Map where key is the
attribute name and value is the
Set of attribute valuesSMSException - public java.lang.String toString()
toString in class java.lang.Objectpublic org.w3c.dom.Node getSchemaNode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||