Package org.restlet.engine.component
Class ComponentXmlParser
- java.lang.Object
-
- org.restlet.engine.component.ComponentXmlParser
-
@Deprecated public class ComponentXmlParser extends java.lang.ObjectDeprecated.Use XML support in the Spring extension instead.Parser for component XML configuration.- See Also:
Component
-
-
Field Summary
Fields Modifier and Type Field Description private ComponentcomponentDeprecated.The component to update.private RepresentationxmlConfigurationDeprecated.The XML configuration to parse.
-
Constructor Summary
Constructors Constructor Description ComponentXmlParser(Component component, Representation xmlConfiguration)Deprecated.Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private TemplateRouteattach(Router router, java.lang.String targetClassName, java.lang.String uriPattern, boolean defaultRoute)Deprecated.Creates a new route on a router according to a target class name and a URI pattern.private TemplateRouteattachWithDescriptor(Router router, java.lang.String targetDescriptor, java.lang.String uriPattern, boolean defaultRoute)Deprecated.Creates a new route on a router according to a target descriptor and a URI pattern.private booleangetBoolean(org.w3c.dom.Node node, boolean defaultValue)Deprecated.Parses a node and returns its boolean value.private ComponentgetComponent()Deprecated.Returns the component to update.private floatgetFloat(org.w3c.dom.Node node, float defaultValue)Deprecated.Parses a node and returns the float value.private intgetInt(org.w3c.dom.Node node, int defaultValue)Deprecated.Parses a node and returns the int value.private java.util.logging.LoggergetLogger()Deprecated.Returns the component's logger.private longgetLong(org.w3c.dom.Node node, long defaultValue)Deprecated.Parses a node and returns the long value.private ProtocolgetProtocol(java.lang.String scheme)Deprecated.Returns a protocol by its scheme.private RepresentationgetXmlConfiguration()Deprecated.Returns the XML configuration to parse.private static booleanisParameter(org.w3c.dom.Node domNode)Deprecated.Indicates if the DOM node is a "parameter" element.voidparse()Deprecated.Parse a configuration file and update the component's configuration.private voidparseHost(VirtualHost host, org.w3c.dom.Node hostNode)Deprecated.Parse the attributes of a DOM node and update the given host.private static ParameterparseParameter(org.w3c.dom.Node domNode)Deprecated.Parses the DOM node into aParameterinstance.private voidparseRestlet(Restlet restlet, org.w3c.dom.Node restletNode)Deprecated.Parse the attributes of a DOM node and update the given restlet.private voidparseRouter(Router router, org.w3c.dom.Node routerNode)Deprecated.Parse the attributes of a DOM node and update the given router.private voidsetAttach(Router router, org.w3c.dom.Node node)Deprecated.Attaches Restlet to a router.
-
-
-
Field Detail
-
component
private volatile Component component
Deprecated.The component to update.
-
xmlConfiguration
private volatile Representation xmlConfiguration
Deprecated.The XML configuration to parse.
-
-
Constructor Detail
-
ComponentXmlParser
public ComponentXmlParser(Component component, Representation xmlConfiguration)
Deprecated.Constructor.- Parameters:
component- The component to update.xmlConfiguration- The XML configuration to parse.
-
-
Method Detail
-
isParameter
private static boolean isParameter(org.w3c.dom.Node domNode)
Deprecated.Indicates if the DOM node is a "parameter" element.- Parameters:
domNode- The DOM node to test.- Returns:
- True if the DOM node is a "parameter" element.
-
parseParameter
private static Parameter parseParameter(org.w3c.dom.Node domNode)
Deprecated.Parses the DOM node into aParameterinstance.- Parameters:
domNode- The DOM node to parse.- Returns:
- The
Parameterinstance.
-
attach
private TemplateRoute attach(Router router, java.lang.String targetClassName, java.lang.String uriPattern, boolean defaultRoute)
Deprecated.Creates a new route on a router according to a target class name and a URI pattern.- Parameters:
router- the router.targetClassName- the target class name.uriPattern- the URI pattern.defaultRoute- Is this route the default one?- Returns:
- the created route, or null.
-
attachWithDescriptor
private TemplateRoute attachWithDescriptor(Router router, java.lang.String targetDescriptor, java.lang.String uriPattern, boolean defaultRoute)
Deprecated.Creates a new route on a router according to a target descriptor and a URI pattern.- Parameters:
router- the router.targetDescriptor- the target descriptor.uriPattern- the URI pattern.defaultRoute- Is this route the default one?- Returns:
- the created route, or null.
-
getBoolean
private boolean getBoolean(org.w3c.dom.Node node, boolean defaultValue)Deprecated.Parses a node and returns its boolean value.- Parameters:
Node- the node to parse.defaultValue- the default value;- Returns:
- The boolean value of the node.
-
getComponent
private Component getComponent()
Deprecated.Returns the component to update.- Returns:
- The component to update.
-
getFloat
private float getFloat(org.w3c.dom.Node node, float defaultValue)Deprecated.Parses a node and returns the float value.- Parameters:
node- the node to parse.defaultValue- the default value;- Returns:
- the float value of the node.
-
getInt
private int getInt(org.w3c.dom.Node node, int defaultValue)Deprecated.Parses a node and returns the int value.- Parameters:
node- the node to parse.defaultValue- the default value;- Returns:
- the int value of the node.
-
getLogger
private java.util.logging.Logger getLogger()
Deprecated.Returns the component's logger.- Returns:
- The component's logger.
-
getLong
private long getLong(org.w3c.dom.Node node, long defaultValue)Deprecated.Parses a node and returns the long value.- Parameters:
node- the node to parse.defaultValue- the default value;- Returns:
- the long value of the node.
-
getProtocol
private Protocol getProtocol(java.lang.String scheme)
Deprecated.Returns a protocol by its scheme. If the latter is unknown, instantiate a new protocol object.- Parameters:
scheme- the scheme of the desired protocol.- Returns:
- a known protocol or a new instance.
-
getXmlConfiguration
private Representation getXmlConfiguration()
Deprecated.Returns the XML configuration to parse.- Returns:
- The XML configuration to parse.
-
parse
public void parse()
Deprecated.Parse a configuration file and update the component's configuration.
-
parseHost
private void parseHost(VirtualHost host, org.w3c.dom.Node hostNode)
Deprecated.Parse the attributes of a DOM node and update the given host.- Parameters:
host- the host to update.hostNode- the DOM node.
-
parseRestlet
private void parseRestlet(Restlet restlet, org.w3c.dom.Node restletNode)
Deprecated.Parse the attributes of a DOM node and update the given restlet.- Parameters:
restlet- the restlet to update.restletNode- the DOM node.
-
parseRouter
private void parseRouter(Router router, org.w3c.dom.Node routerNode)
Deprecated.Parse the attributes of a DOM node and update the given router.- Parameters:
router- the router to update.routerNode- the DOM node.
-
setAttach
private void setAttach(Router router, org.w3c.dom.Node node)
Deprecated.Attaches Restlet to a router.- Parameters:
router- The router to attach to.node- The node describing the Restlets to attach.
-
-