Class Service

  • All Implemented Interfaces:
    javax.xml.namespace.NamespaceContext

    public class Service
    extends SaxRepresentation
    Represents an Atom introspection document.
    Author:
    Jerome Louvel
    • Field Detail

      • APP_NAMESPACE

        public static final java.lang.String APP_NAMESPACE
        Atom Publishing Protocol namespace.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Service

        public Service​(org.restlet.Client clientDispatcher)
        Constructor.
        Parameters:
        clientDispatcher - The client HTTP dispatcher.
      • Service

        public Service​(org.restlet.Client clientDispatcher,
                       java.lang.String serviceUri)
                throws java.io.IOException
        Constructor.
        Parameters:
        clientDispatcher - The client HTTP dispatcher.
        serviceUri - The service URI.
        Throws:
        java.io.IOException
      • Service

        public Service​(org.restlet.Context context,
                       java.lang.String serviceUri)
                throws java.io.IOException
        Constructor.
        Parameters:
        context - The context from which the client dispatcher will be retrieved.
        serviceUri - The service URI.
        Throws:
        java.io.IOException
      • Service

        public Service​(org.restlet.representation.Representation xmlService)
                throws java.io.IOException
        Constructor.
        Parameters:
        xmlService - The XML introspection document.
        Throws:
        java.io.IOException
      • Service

        public Service​(org.restlet.Restlet clientDispatcher,
                       java.lang.String serviceUri,
                       org.restlet.representation.Representation xmlService)
                throws java.io.IOException
        Constructor.
        Parameters:
        clientDispatcher - The client HTTP dispatcher.
        serviceUri - The service URI.
        xmlService - The XML introspection document.
        Throws:
        java.io.IOException
      • Service

        public Service​(java.lang.String serviceUri)
                throws java.io.IOException
        Constructor.
        Parameters:
        serviceUri - The service URI.
        Throws:
        java.io.IOException
      • Service

        public Service​(java.lang.String serviceUri,
                       org.restlet.representation.Representation xmlService)
                throws java.io.IOException
        Constructor.
        Parameters:
        serviceUri - The service URI.
        xmlService - The XML introspection document.
        Throws:
        java.io.IOException
    • Method Detail

      • deleteResource

        public org.restlet.data.Status deleteResource​(java.lang.String uri)
        Deletes a resource.
        Parameters:
        uri - The resource URI.
        Returns:
        The result status.
      • getBaseReference

        public org.restlet.data.Reference getBaseReference()
        Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.
        Returns:
        The base reference used to resolve relative references found within the scope of the xml:base attribute.
      • getClientDispatcher

        public org.restlet.Restlet getClientDispatcher()
        Returns the client HTTP dispatcher.
        Returns:
        The client HTTP dispatcher.
      • getReference

        public org.restlet.data.Reference getReference()
        Returns the hypertext reference.
        Returns:
        The hypertext reference.
      • getResource

        public org.restlet.representation.Representation getResource​(java.lang.String uri)
        Retrieves a resource representation.
        Parameters:
        uri - The resource URI.
        Returns:
        The resource representation.
      • getWorkspaces

        public java.util.List<Workspace> getWorkspaces()
        Returns the list of workspaces.
        Returns:
        The list of workspaces.
      • setBaseReference

        public void setBaseReference​(org.restlet.data.Reference baseReference)
        Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.
        Parameters:
        baseReference - The base reference used to resolve relative references found within the scope of the xml:base attribute.
      • setClientDispatcher

        public void setClientDispatcher​(org.restlet.Client clientDispatcher)
        Sets the client HTTP dispatcher.
        Parameters:
        clientDispatcher - The client HTTP dispatcher.
      • setReference

        public void setReference​(org.restlet.data.Reference ref)
        Sets the hypertext reference.
        Parameters:
        ref - The hypertext reference.
      • updateResource

        public org.restlet.data.Status updateResource​(java.lang.String uri,
                                                      org.restlet.representation.Representation updatedRepresentation)
        Updates a resource representation.
        Parameters:
        uri - The resource URI.
        Returns:
        The resource representation.
      • write

        public void write​(XmlWriter writer)
                   throws java.io.IOException
        Writes the representation to a XML writer.
        Overrides:
        write in class SaxRepresentation
        Parameters:
        writer - The XML writer to write to.
        Throws:
        java.io.IOException