Class ComponentXmlParser


  • @Deprecated
    public class ComponentXmlParser
    extends java.lang.Object
    Deprecated.
    Use XML support in the Spring extension instead.
    Parser for component XML configuration.
    See Also:
    Component
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      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.
      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.
      private boolean getBoolean​(org.w3c.dom.Node node, boolean defaultValue)
      Deprecated.
      Parses a node and returns its boolean value.
      private Component getComponent()
      Deprecated.
      Returns the component to update.
      private float getFloat​(org.w3c.dom.Node node, float defaultValue)
      Deprecated.
      Parses a node and returns the float value.
      private int getInt​(org.w3c.dom.Node node, int defaultValue)
      Deprecated.
      Parses a node and returns the int value.
      private java.util.logging.Logger getLogger()
      Deprecated.
      Returns the component's logger.
      private long getLong​(org.w3c.dom.Node node, long defaultValue)
      Deprecated.
      Parses a node and returns the long value.
      private Protocol getProtocol​(java.lang.String scheme)
      Deprecated.
      Returns a protocol by its scheme.
      private Representation getXmlConfiguration()
      Deprecated.
      Returns the XML configuration to parse.
      private static boolean isParameter​(org.w3c.dom.Node domNode)
      Deprecated.
      Indicates if the DOM node is a "parameter" element.
      void parse()
      Deprecated.
      Parse a configuration file and update the component's configuration.
      private void parseHost​(VirtualHost host, org.w3c.dom.Node hostNode)
      Deprecated.
      Parse the attributes of a DOM node and update the given host.
      private static Parameter parseParameter​(org.w3c.dom.Node domNode)
      Deprecated.
      Parses the DOM node into a Parameter instance.
      private void parseRestlet​(Restlet restlet, org.w3c.dom.Node restletNode)
      Deprecated.
      Parse the attributes of a DOM node and update the given restlet.
      private void parseRouter​(Router router, org.w3c.dom.Node routerNode)
      Deprecated.
      Parse the attributes of a DOM node and update the given router.
      private void setAttach​(Router router, org.w3c.dom.Node node)
      Deprecated.
      Attaches Restlet to a router.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 a Parameter instance.
        Parameters:
        domNode - The DOM node to parse.
        Returns:
        The Parameter instance.
      • 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.