Package org.restlet.ext.atom
Class Service
- java.lang.Object
-
- All Implemented Interfaces:
javax.xml.namespace.NamespaceContext
public class Service extends SaxRepresentation
Represents an Atom introspection document.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPP_NAMESPACEAtom Publishing Protocol namespace.private ReferencebaseReferenceThe base reference used to resolve relative references found within the scope of the xml:base attribute.private RestletclientDispatcherThe client HTTP dispatcher.private ReferencereferenceThe reference.private java.util.List<Workspace>workspacesThe list of workspaces.-
Fields inherited from class org.restlet.ext.xml.SaxRepresentation
XML_SECURE_PROCESSING
-
Fields inherited from class org.restlet.ext.xml.XmlRepresentation
XML_EXPANDING_ENTITY_REFS, XML_VALIDATING_DTD
-
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
-
-
Constructor Summary
Constructors Constructor Description Service(java.lang.String serviceUri)Constructor.Service(java.lang.String serviceUri, Representation xmlService)Constructor.Service(Client clientDispatcher)Constructor.Service(Client clientDispatcher, java.lang.String serviceUri)Constructor.Service(Context context, java.lang.String serviceUri)Constructor.Service(Representation xmlService)Constructor.Service(Restlet clientDispatcher, java.lang.String serviceUri, Representation xmlService)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusdeleteResource(java.lang.String uri)Deletes a resource.ReferencegetBaseReference()Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.RestletgetClientDispatcher()Returns the client HTTP dispatcher.ReferencegetReference()Returns the hypertext reference.RepresentationgetResource(java.lang.String uri)Retrieves a resource representation.java.util.List<Workspace>getWorkspaces()Returns the list of workspaces.voidsetBaseReference(Reference baseReference)Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.voidsetClientDispatcher(Client clientDispatcher)Sets the client HTTP dispatcher.voidsetReference(Reference ref)Sets the hypertext reference.StatusupdateResource(java.lang.String uri, Representation updatedRepresentation)Updates a resource representation.voidwrite(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
getBoolean, getDocument, getDocumentBuilder, getDomSource, getEntityResolver, getErrorHandler, getNamespaces, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getSchema, getStreamSource, getText, getTextContent, 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, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
-
-
-
-
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.IOExceptionConstructor.- Parameters:
serviceUri- The service URI.- Throws:
java.io.IOException
-
Service
public Service(java.lang.String serviceUri, Representation xmlService) throws java.io.IOExceptionConstructor.- 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:
writein classSaxRepresentation- Parameters:
writer- The XML writer to write to.- Throws:
java.io.IOException
-
-