Class Service

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

    public class Service
    extends SaxRepresentation
    Represents an Atom introspection document.
    • Field Detail

      • APP_NAMESPACE

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

        private volatile Reference baseReference
        The base reference used to resolve relative references found within the scope of the xml:base attribute.
      • clientDispatcher

        private volatile Restlet clientDispatcher
        The client HTTP dispatcher.
      • reference

        private volatile Reference reference
        The reference.
      • workspaces

        private volatile java.util.List<Workspace> workspaces
        The list of workspaces.
    • Constructor Detail

      • Service

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

        public Service​(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​(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​(Representation xmlService)
                throws java.io.IOException
        Constructor.
        Parameters:
        xmlService - The XML introspection document.
        Throws:
        java.io.IOException
      • Service

        public Service​(Restlet clientDispatcher,
                       java.lang.String serviceUri,
                       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,
                       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 Status deleteResource​(java.lang.String uri)
        Deletes a resource.
        Parameters:
        uri - The resource URI.
        Returns:
        The result status.
      • getBaseReference

        public 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 Restlet getClientDispatcher()
        Returns the client HTTP dispatcher.
        Returns:
        The client HTTP dispatcher.
      • getReference

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

        public 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​(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​(Client clientDispatcher)
        Sets the client HTTP dispatcher.
        Parameters:
        clientDispatcher - The client HTTP dispatcher.
      • setReference

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

        public Status updateResource​(java.lang.String uri,
                                     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