Package com.sun.identity.sm
Class SMSSchema
- java.lang.Object
-
- com.sun.identity.sm.SMSSchema
-
public class SMSSchema extends Object
This class provides methods to obtain service schema and plugin schema from XML documents.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringescapeSpecialCharacters(String txt)The method escapes '&', '<', '>', '"', '''static StringgetDummyXML(String serviceName, String version)StringgetPluginSchema(String pluginName)Method returns the XML plugin schema for the given plugin name in a String format that can stored in a directory.StringgetPluginSchema(String serviceName, String pluginName)Method returns the XML plugin schema for the given service name and plugin name in a String format that can stored in a directory.StringgetPluginSchema(Node pluginName)Method returns the XML plugin schema for the given plugin name in a String format that can stored in a directory.StringgetSchema()Method returns the XML schema for the service in a String format that can stored in a directory.protected StringgetSchema(String serviceName)Method returns the XML schema for the given service name in a String format that can stored in a directory.protected StringgetServiceName()protected NodegetServiceNode()protected StringgetServiceVersion()static DocumentgetXMLDocument(InputStream in)static DocumentgetXMLDocument(InputStream in, boolean validation)static DocumentgetXMLDocument(String xml, boolean validation)static StringnodeToString(Node a)static StringunescapeName(String txtName)The method reverses the escape sequence "/" to the character "/".
-
-
-
Method Detail
-
getServiceName
protected String getServiceName() throws SMSException
- Throws:
SMSException
-
getServiceVersion
protected String getServiceVersion() throws SMSException
- Throws:
SMSException
-
getServiceNode
protected Node getServiceNode() throws SMSException
- Throws:
SMSException
-
getSchema
protected String getSchema(String serviceName) throws SMSException
Method returns the XML schema for the given service name in a String format that can stored in a directory.- Parameters:
serviceName- name of the service- Returns:
- service schema in serialized String format
- Throws:
SMSException
-
getSchema
public String getSchema() throws SMSException
Method returns the XML schema for the service in a String format that can stored in a directory.- Returns:
- service schema in serialized String format
- Throws:
SMSException
-
getPluginSchema
public String getPluginSchema(String serviceName, String pluginName) throws SMSException
Method returns the XML plugin schema for the given service name and plugin name in a String format that can stored in a directory.- Parameters:
serviceName- name of the servicepluginName- name of the plugin schema name- Returns:
- service plugin schema in serialized String format
- Throws:
SMSException
-
getPluginSchema
public String getPluginSchema(String pluginName) throws SMSException
Method returns the XML plugin schema for the given plugin name in a String format that can stored in a directory.- Parameters:
pluginName- name of the plugin schema name- Returns:
- service plugin schema in serialized String format
- Throws:
SMSException
-
getPluginSchema
public String getPluginSchema(Node pluginName) throws SMSException
Method returns the XML plugin schema for the given plugin name in a String format that can stored in a directory.- Parameters:
pluginName- plugin schema name- Returns:
- service plugin schema in serialized String format
- Throws:
SMSException
-
getXMLDocument
public static Document getXMLDocument(String xml, boolean validation) throws SchemaException, SMSException
- Throws:
SchemaExceptionSMSException
-
getXMLDocument
public static Document getXMLDocument(InputStream in) throws SchemaException, SMSException
- Throws:
SchemaExceptionSMSException
-
getXMLDocument
public static Document getXMLDocument(InputStream in, boolean validation) throws SchemaException, SMSException
- Throws:
SchemaExceptionSMSException
-
escapeSpecialCharacters
public static String escapeSpecialCharacters(String txt)
The method escapes '&', '<', '>', '"', '''
-
-