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 String
escapeSpecialCharacters(String txt)
The method escapes '&', '<', '>', '"', '''static String
getDummyXML(String serviceName, String version)
String
getPluginSchema(String pluginName)
Method returns the XML plugin schema for the given plugin name in a String format that can stored in a directory.String
getPluginSchema(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.String
getPluginSchema(Node pluginName)
Method returns the XML plugin schema for the given plugin name in a String format that can stored in a directory.String
getSchema()
Method returns the XML schema for the service in a String format that can stored in a directory.protected String
getSchema(String serviceName)
Method returns the XML schema for the given service name in a String format that can stored in a directory.protected String
getServiceName()
protected Node
getServiceNode()
protected String
getServiceVersion()
static Document
getXMLDocument(InputStream in)
static Document
getXMLDocument(InputStream in, boolean validation)
static Document
getXMLDocument(String xml, boolean validation)
static String
nodeToString(Node a)
static String
unescapeName(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:
SchemaException
SMSException
-
getXMLDocument
public static Document getXMLDocument(InputStream in) throws SchemaException, SMSException
- Throws:
SchemaException
SMSException
-
getXMLDocument
public static Document getXMLDocument(InputStream in, boolean validation) throws SchemaException, SMSException
- Throws:
SchemaException
SMSException
-
escapeSpecialCharacters
public static String escapeSpecialCharacters(String txt)
The method escapes '&', '<', '>', '"', '''
-
-