Search in sources :

Example 21 with Request

use of org.collectionspace.chain.csp.webui.main.Request in project application by collectionspace.

the class VocabulariesWorkflowTransition method run.

public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    store_transition(q.getStorage(), q.getUIRequest(), tail[0], tail[1]);
}
Also used : UIRequest(org.collectionspace.csp.api.ui.UIRequest) Request(org.collectionspace.chain.csp.webui.main.Request)

Example 22 with Request

use of org.collectionspace.chain.csp.webui.main.Request in project application by collectionspace.

the class ServicesXsd method run.

@Override
public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    String out = serviceschema(q.getStorage(), StringUtils.join(tail, "/"));
    q.getUIRequest().sendXMLResponse(out);
}
Also used : Request(org.collectionspace.chain.csp.webui.main.Request)

Example 23 with Request

use of org.collectionspace.chain.csp.webui.main.Request in project application by collectionspace.

the class UISchema method run.

@Override
public void run(Object in, String[] tail) throws UIException, UnauthorizedException {
    Request q = (Request) in;
    JSONObject out;
    if (this.record != null) {
        if (this.spectype.equals("search")) {
            out = uisearchschema(q.getStorage(), this.record);
        } else {
            out = uirecordschema(q.getStorage(), this.record);
        }
    } else {
        UISession session = q.getUIRequest().getSession();
        out = uiotherschema(session, q.getStorage(), StringUtils.join(tail, "/"));
    }
    UIRequest uir = q.getUIRequest();
    uir.sendJSONResponse(out);
    int cacheMaxAgeSeconds = spec.getAdminData().getUiSpecSchemaCacheAge();
    if (cacheMaxAgeSeconds > 0) {
        uir.setCacheMaxAgeSeconds(cacheMaxAgeSeconds);
    }
}
Also used : JSONObject(org.json.JSONObject) UISession(org.collectionspace.csp.api.ui.UISession) UIRequest(org.collectionspace.csp.api.ui.UIRequest) Request(org.collectionspace.chain.csp.webui.main.Request) UIRequest(org.collectionspace.csp.api.ui.UIRequest)

Example 24 with Request

use of org.collectionspace.chain.csp.webui.main.Request in project application by collectionspace.

the class RecordDelete method run.

public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    store_delete(q.getStorage(), q.getUIRequest(), StringUtils.join(tail, "/"));
}
Also used : UIRequest(org.collectionspace.csp.api.ui.UIRequest) Request(org.collectionspace.chain.csp.webui.main.Request)

Example 25 with Request

use of org.collectionspace.chain.csp.webui.main.Request in project application by collectionspace.

the class RelateCreateUpdate method run.

public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    String path = StringUtils.join(tail, "/");
    if (create)
        path = null;
    relate(q.getStorage(), q.getUIRequest(), path);
}
Also used : UIRequest(org.collectionspace.csp.api.ui.UIRequest) Request(org.collectionspace.chain.csp.webui.main.Request)

Aggregations

Request (org.collectionspace.chain.csp.webui.main.Request)36 UIRequest (org.collectionspace.csp.api.ui.UIRequest)34 JSONObject (org.json.JSONObject)5 CacheTermList (org.collectionspace.chain.csp.webui.nuispec.CacheTermList)2 UIException (org.collectionspace.csp.api.ui.UIException)2 UISession (org.collectionspace.csp.api.ui.UISession)1 StructuredDateFormatException (org.collectionspace.services.structureddate.StructuredDateFormatException)1 StructuredDateInternal (org.collectionspace.services.structureddate.StructuredDateInternal)1 JSONException (org.json.JSONException)1