org.restlet.ext.atom
Class Service

java.lang.Object
  extended by org.restlet.representation.Variant
      extended by org.restlet.representation.RepresentationInfo
          extended by org.restlet.representation.Representation
              extended by org.restlet.representation.CharacterRepresentation
                  extended by org.restlet.representation.WriterRepresentation
                      extended by org.restlet.ext.xml.XmlRepresentation
                          extended by org.restlet.ext.xml.SaxRepresentation
                              extended by org.restlet.ext.atom.Service
All Implemented Interfaces:
NamespaceContext

public class Service
extends SaxRepresentation

Represents an Atom introspection document.

Author:
Jerome Louvel

Field Summary
static String APP_NAMESPACE
          Atom Publishing Protocol namespace.
 
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
 
Constructor Summary
Service(Client clientDispatcher)
          Constructor.
Service(Client clientDispatcher, String serviceUri)
          Constructor.
Service(Context context, String serviceUri)
          Constructor.
Service(Representation xmlService)
          Constructor.
Service(Restlet clientDispatcher, String serviceUri, Representation xmlService)
          Constructor.
Service(String serviceUri)
          Constructor.
Service(String serviceUri, Representation xmlService)
          Constructor.
 
Method Summary
 Status deleteResource(String uri)
          Deletes a resource.
 Reference getBaseReference()
          Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.
 Restlet getClientDispatcher()
          Returns the client HTTP dispatcher.
 Reference getReference()
          Returns the hypertext reference.
 Representation getResource(String uri)
          Retrieves a resource representation.
 List<Workspace> getWorkspaces()
          Returns the list of workspaces.
 void setBaseReference(Reference baseReference)
          Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.
 void setClientDispatcher(Client clientDispatcher)
          Sets the client HTTP dispatcher.
 void setReference(Reference ref)
          Sets the hypertext reference.
 Status updateResource(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.ext.xml.SaxRepresentation
getInputSource, getSaxSource, isSecureProcessing, parse, release, setSaxSource, setSecureProcessing, write
 
Methods inherited from class org.restlet.ext.xml.XmlRepresentation
evaluate, getBoolean, getDocument, getDocumentBuilder, getDomSource, getEntityResolver, getErrorHandler, getNamespaces, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getSchema, getStreamSource, getText, isCoalescing, isExpandingEntityRefs, isIgnoringComments, isIgnoringExtraWhitespaces, isNamespaceAware, isValidatingDtd, isXIncludeAware, setCoalescing, setEntityResolver, setErrorHandler, setExpandingEntityRefs, setIgnoringComments, setIgnoringExtraWhitespaces, setNamespaceAware, setNamespaces, setSchema, setSchema, setValidatingDtd, setXIncludeAware, validate, validate, validate, validate
 
Methods inherited from class org.restlet.representation.WriterRepresentation
getReader
 
Methods inherited from class org.restlet.representation.CharacterRepresentation
getChannel, getStream, write, write
 
Methods inherited from class org.restlet.representation.Representation
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
 
Methods inherited from class org.restlet.representation.RepresentationInfo
getModificationDate, getTag, setModificationDate, setTag
 
Methods inherited from class org.restlet.representation.Variant
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

APP_NAMESPACE

public static final String APP_NAMESPACE
Atom Publishing Protocol namespace.

See Also:
Constant Field Values
Constructor Detail

Service

public Service(Client clientDispatcher)
Constructor.

Parameters:
clientDispatcher - The client HTTP dispatcher.

Service

public Service(Client clientDispatcher,
               String serviceUri)
        throws IOException
Constructor.

Parameters:
clientDispatcher - The client HTTP dispatcher.
serviceUri - The service URI.
Throws:
IOException

Service

public Service(Restlet clientDispatcher,
               String serviceUri,
               Representation xmlService)
        throws IOException
Constructor.

Parameters:
clientDispatcher - The client HTTP dispatcher.
serviceUri - The service URI.
xmlService - The XML introspection document.
Throws:
IOException

Service

public Service(Context context,
               String serviceUri)
        throws IOException
Constructor.

Parameters:
context - The context from which the client dispatcher will be retrieved.
serviceUri - The service URI.
Throws:
IOException

Service

public Service(Representation xmlService)
        throws IOException
Constructor.

Parameters:
xmlService - The XML introspection document.
Throws:
IOException

Service

public Service(String serviceUri)
        throws IOException
Constructor.

Parameters:
serviceUri - The service URI.
Throws:
IOException

Service

public Service(String serviceUri,
               Representation xmlService)
        throws IOException
Constructor.

Parameters:
serviceUri - The service URI.
xmlService - The XML introspection document.
Throws:
IOException
Method Detail

deleteResource

public Status deleteResource(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(String uri)
Retrieves a resource representation.

Parameters:
uri - The resource URI.
Returns:
The resource representation.

getWorkspaces

public 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(String uri,
                             Representation updatedRepresentation)
Updates a resource representation.

Parameters:
uri - The resource URI.
Returns:
The resource representation.

write

public void write(XmlWriter writer)
           throws IOException
Writes the representation to a XML writer.

Overrides:
write in class SaxRepresentation
Parameters:
writer - The XML writer to write to.
Throws:
IOException


Copyright © 2005-2013 Restlet.