org.restlet.ext.atom
Class Service

java.lang.Object
  extended by org.restlet.resource.Variant
      extended by org.restlet.resource.Representation
          extended by org.restlet.resource.StreamRepresentation
              extended by org.restlet.resource.OutputRepresentation
                  extended by org.restlet.resource.XmlRepresentation
                      extended by org.restlet.resource.SaxRepresentation
                          extended by org.restlet.ext.atom.Service
All Implemented Interfaces:
javax.xml.namespace.NamespaceContext

public class Service
extends SaxRepresentation

Represents an Atom introspection document.

Author:
Jerome Louvel

Field Summary
static java.lang.String APP_NAMESPACE
          Atom Publishing Protocol namespace.
 
Fields inherited from class org.restlet.resource.Representation
UNKNOWN_SIZE
 
Constructor Summary
Service(Context context, java.lang.String serviceUri)
          Constructor.
Service(java.lang.String serviceUri)
          Constructor.
Service(java.lang.String serviceUri, Representation xmlService)
          Constructor.
Service(Uniform clientDispatcher)
          Constructor.
Service(Uniform clientDispatcher, java.lang.String serviceUri)
          Constructor.
Service(Uniform clientDispatcher, java.lang.String serviceUri, Representation xmlService)
          Constructor.
 
Method Summary
 Status deleteResource(java.lang.String uri)
          Deletes a resource.
 Uniform getClientDispatcher()
          Returns the client HTTP dispatcher.
 Reference getReference()
          Returns the hypertext reference.
 Representation getResource(java.lang.String uri)
          Retrieves a resource representation.
 java.util.List<Workspace> getWorkspaces()
          Returns the list of workspaces.
 void setClientDispatcher(Uniform clientDispatcher)
          Sets the client HTTP dispatcher.
 void setReference(Reference ref)
          Sets the hypertext reference.
 Status updateResource(java.lang.String uri, Representation updatedRepresentation)
          Updates a resource representation.
 void write(XmlWriter writer)
          Writes the representation to a XML writer.
 
Methods inherited from class org.restlet.resource.SaxRepresentation
evaluate, getSaxSource, parse, release, setSaxSource, write
 
Methods inherited from class org.restlet.resource.XmlRepresentation
getBoolean, getDocumentBuilder, getDomSource, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getStreamSource, getText, isNamespaceAware, putNamespace, setNamespaceAware, validate, validate, validate, validate
 
Methods inherited from class org.restlet.resource.OutputRepresentation
getStream
 
Methods inherited from class org.restlet.resource.StreamRepresentation
getChannel, getReader, write, write
 
Methods inherited from class org.restlet.resource.Representation
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDownloadName, getExpirationDate, getModificationDate, getRange, getSize, getTag, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDownloadable, setDownloadName, setExpirationDate, setModificationDate, setRange, setSize, setTag, setTransient
 
Methods inherited from class org.restlet.resource.Variant
getCharacterSet, getEncodings, getIdentifier, getLanguages, getMediaType, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setMediaType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(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(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

Service

public Service(Uniform clientDispatcher)
Constructor.

Parameters:
clientDispatcher - The client HTTP dispatcher.

Service

public Service(Uniform 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(Uniform 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
Method Detail

deleteResource

public Status deleteResource(java.lang.String uri)
Deletes a resource.

Parameters:
uri - The resource URI.
Returns:
The result status.

getClientDispatcher

public Uniform 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.

setClientDispatcher

public void setClientDispatcher(Uniform 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


Copyright © 2005-2008 Noelios Technologies.