.. java:import:: java.io IOException .. java:import:: java.io InputStream .. java:import:: java.io UnsupportedEncodingException .. java:import:: java.security NoSuchAlgorithmException .. java:import:: java.sql SQLException .. java:import:: java.util Collection .. java:import:: java.util HashMap .. java:import:: java.util LinkedList .. java:import:: java.util NoSuchElementException .. java:import:: java.util.logging Level .. java:import:: org.apache.commons.fileupload FileUploadException .. java:import:: org.apache.shiro SecurityUtils .. java:import:: org.apache.shiro.authc AuthenticationException .. java:import:: org.apache.shiro.authz AuthorizationException .. java:import:: org.apache.shiro.subject Subject .. java:import:: org.caosdb.server CaosDBException .. java:import:: org.caosdb.server.accessControl AuthenticationUtils .. java:import:: org.caosdb.server.accessControl Principal .. java:import:: org.caosdb.server.database.backend.implementation MySQL.ConnectionException .. java:import:: org.caosdb.server.entity Message .. java:import:: org.caosdb.server.utils ServerMessages .. java:import:: org.caosdb.server.utils WebinterfaceUtils .. java:import:: org.jdom2 Document .. java:import:: org.jdom2 Element .. java:import:: org.jdom2 JDOMException .. java:import:: org.jdom2.input SAXBuilder .. java:import:: org.restlet.data Form .. java:import:: org.restlet.data Header .. java:import:: org.restlet.data Parameter .. java:import:: org.restlet.data Status .. java:import:: org.restlet.representation Representation .. java:import:: org.restlet.resource Delete .. java:import:: org.restlet.resource Get .. java:import:: org.restlet.resource Post .. java:import:: org.restlet.resource Put .. java:import:: org.restlet.resource ServerResource .. java:import:: org.restlet.util Series AbstractCaosDBServerResource ============================ .. java:package:: org.caosdb.server.resource :noindex: .. java:type:: public abstract class AbstractCaosDBServerResource extends ServerResource Class is still under construction. :author: Timm Fitschen Fields ------ sRID ^^^^ .. java:field:: protected String sRID :outertype: AbstractCaosDBServerResource Methods ------- connectionFailed ^^^^^^^^^^^^^^^^ .. java:method:: protected Representation connectionFailed() :outertype: AbstractCaosDBServerResource doInit ^^^^^^ .. java:method:: @Override protected void doInit() :outertype: AbstractCaosDBServerResource Setup method, called by \ :java:ref:`org.restlet.resource.Resource.init(org.restlet.Context,org.restlet.Request,org.restlet.Response)`\ . doRelease ^^^^^^^^^ .. java:method:: @Override protected void doRelease() :outertype: AbstractCaosDBServerResource emptyEntity ^^^^^^^^^^^ .. java:method:: protected Representation emptyEntity() :outertype: AbstractCaosDBServerResource error ^^^^^ .. java:method:: protected Representation error(Message m, Status status) :outertype: AbstractCaosDBServerResource Return a Representation containing the error message and set the \ :java:ref:`Response`\ 's \ :java:ref:`Status`\ . :param m: - the error message. :param status: - the response status :return: A Representation of the error. error ^^^^^ .. java:method:: protected Representation error(Representation entity, Status status) :outertype: AbstractCaosDBServerResource error ^^^^^ .. java:method:: protected Representation error(Message m) :outertype: AbstractCaosDBServerResource error ^^^^^ .. java:method:: protected Representation error(Status status) :outertype: AbstractCaosDBServerResource generateRootElement ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected Element generateRootElement() :outertype: AbstractCaosDBServerResource 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 ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected Element generateRootElement(Element... elements) :outertype: AbstractCaosDBServerResource getCRID ^^^^^^^ .. java:method:: public String getCRID() :outertype: AbstractCaosDBServerResource Returns the client request ID, which can be set by the client. :return: The cRID. getFlags ^^^^^^^^ .. java:method:: public HashMap getFlags() :outertype: AbstractCaosDBServerResource getRequestedItems ^^^^^^^^^^^^^^^^^ .. java:method:: public String[] getRequestedItems() :outertype: AbstractCaosDBServerResource getSRID ^^^^^^^ .. java:method:: public String getSRID() :outertype: AbstractCaosDBServerResource Returns the (probably unique) server request ID. :return: The server request ID. getTimestamp ^^^^^^^^^^^^ .. java:method:: public Long getTimestamp() :outertype: AbstractCaosDBServerResource getUser ^^^^^^^ .. java:method:: public Subject getUser() :outertype: AbstractCaosDBServerResource getUtils ^^^^^^^^ .. java:method:: public WebinterfaceUtils getUtils() :outertype: AbstractCaosDBServerResource Return the \ :java:ref:`WebinterfaceUtils`\ instance for this resource. getXSLScript ^^^^^^^^^^^^ .. java:method:: protected String getXSLScript() :outertype: AbstractCaosDBServerResource handleThrowable ^^^^^^^^^^^^^^^ .. java:method:: public Representation handleThrowable(Throwable t) :outertype: AbstractCaosDBServerResource httpDelete ^^^^^^^^^^ .. java:method:: @Delete public Representation httpDelete() :outertype: AbstractCaosDBServerResource httpDeleteInChildClass ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected Representation httpDeleteInChildClass() throws ConnectionException, SQLException, CaosDBException, IOException, NoSuchAlgorithmException, Exception :outertype: AbstractCaosDBServerResource httpGet ^^^^^^^ .. java:method:: @Get public Representation httpGet() :outertype: AbstractCaosDBServerResource httpGetInChildClass ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected abstract Representation httpGetInChildClass() throws ConnectionException, IOException, SQLException, CaosDBException, NoSuchAlgorithmException, Exception :outertype: AbstractCaosDBServerResource httpPost ^^^^^^^^ .. java:method:: @Post public Representation httpPost(Representation entity) :outertype: AbstractCaosDBServerResource httpPostInChildClass ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected Representation httpPostInChildClass(Representation entity) throws ConnectionException, SQLException, CaosDBException, IOException, NoSuchAlgorithmException, xmlNotWellFormedException, JDOMException, Exception :outertype: AbstractCaosDBServerResource httpPut ^^^^^^^ .. java:method:: @Put public Representation httpPut(Representation entity) :outertype: AbstractCaosDBServerResource httpPutInChildClass ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected Representation httpPutInChildClass(Representation entity) throws ConnectionException, JDOMException, Exception, xmlNotWellFormedException :outertype: AbstractCaosDBServerResource noWellFormedNess ^^^^^^^^^^^^^^^^ .. java:method:: protected Representation noWellFormedNess() :outertype: AbstractCaosDBServerResource ok ^^ .. java:method:: protected JdomRepresentation ok(Element root) :outertype: AbstractCaosDBServerResource Wrap an element for an "OK" response. ok ^^ .. java:method:: protected JdomRepresentation ok(Document doc) :outertype: AbstractCaosDBServerResource Return a JDomRepresentation of the document and leave the \ :java:ref:`Response`\ 's \ :java:ref:`Status`\ where it is - which is usually 200 - OK when this method happens to be called. parseEntity ^^^^^^^^^^^ .. java:method:: public Document parseEntity(Representation entity) throws xmlNotWellFormedException, IOException :outertype: AbstractCaosDBServerResource parseEntity ^^^^^^^^^^^ .. java:method:: public Document parseEntity(InputStream stream) throws xmlNotWellFormedException, IOException :outertype: AbstractCaosDBServerResource setCRID ^^^^^^^ .. java:method:: public void setCRID(String cRID) :outertype: AbstractCaosDBServerResource warning ^^^^^^^ .. java:method:: protected JdomRepresentation warning(Message m) :outertype: AbstractCaosDBServerResource Return a Representation containing the warning message but leave the \ :java:ref:`Response`\ 's \ :java:ref:`Status`\ where it is - which is usually 200 - OK when this method happens to be called. :param m: - the warning message. :return: A Representation of the warning.