AbstractCaosDBServerResource#

public abstract class AbstractCaosDBServerResource extends ServerResource#

Class is still under construction.

Author:

Timm Fitschen

Fields#

sRID#

protected String sRID#

Methods#

connectionFailed#

protected Representation connectionFailed()#

doInit#

protected void doInit()#

Setup method, called by org.restlet.resource.Resource.init(org.restlet.Context,org.restlet.Request,org.restlet.Response).

doRelease#

protected void doRelease()#

emptyEntity#

protected Representation emptyEntity()#

error#

protected Representation error(Message m, Status status)#

Return a Representation containing the error message and set the Response‘s Status.

Parameters:
  • m

    • the error message.

  • status

    • the response status

Returns:

A Representation of the error.

error#

protected Representation error(Representation entity, Status status)#

error#

protected Representation error(Message m)#

error#

protected Representation error(Status status)#

generateRootElement#

protected Element generateRootElement()#

Creates the XML root.

The XML root node contains:

  • User info as per addUserInfo

  • The sRID (server-side request ID)

  • A timestamp

  • The URI to this resource.

generateRootElement#

protected Element generateRootElement(Element... elements)#

getCRID#

public String getCRID()#

Returns the client request ID, which can be set by the client.

Returns:

The cRID.

getFlags#

public HashMap<String, String> getFlags()#

getRequestedItems#

public String[] getRequestedItems()#

getSRID#

public String getSRID()#

Returns the (probably unique) server request ID.

Returns:

The server request ID.

getTimestamp#

public Long getTimestamp()#

getUser#

public Subject getUser()#

getUtils#

public WebinterfaceUtils getUtils()#

Return the WebinterfaceUtils instance for this resource.

getXSLScript#

protected String getXSLScript()#

handleThrowable#

public Representation handleThrowable(Throwable t)#

httpDelete#

public Representation httpDelete()#

httpDeleteInChildClass#

protected Representation httpDeleteInChildClass()#

httpGet#

public Representation httpGet()#

httpGetInChildClass#

protected abstract Representation httpGetInChildClass()#

httpPost#

public Representation httpPost(Representation entity)#

httpPostInChildClass#

protected Representation httpPostInChildClass(Representation entity)#

httpPut#

public Representation httpPut(Representation entity)#

httpPutInChildClass#

protected Representation httpPutInChildClass(Representation entity)#

noWellFormedNess#

protected Representation noWellFormedNess()#

ok#

protected JdomRepresentation ok(Element root)#

Wrap an element for an “OK” response.

ok#

protected JdomRepresentation ok(Document doc)#

Return a JDomRepresentation of the document and leave the Response‘s Status where it is - which is usually 200 - OK when this method happens to be called.

parseEntity#

public Document parseEntity(Representation entity)#

parseEntity#

public Document parseEntity(InputStream stream)#

setCRID#

public void setCRID(String cRID)#

warning#

protected JdomRepresentation warning(Message m)#

Return a Representation containing the warning message but leave the Response‘s Status where it is - which is usually 200 - OK when this method happens to be called.

Parameters:
  • m

    • the warning message.

Returns:

A Representation of the warning.