Search in sources :

Example 6 with Request

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

the class RelateRead method run.

public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    relate_get(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 7 with Request

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

the class DataGenerator method run.

@Override
public void run(Object in, String[] tail) throws UIException {
    initvariables();
    Request q = (Request) in;
    ctl = new CacheTermList(q.getCache());
    JSONObject out = new JSONObject();
    tty = q.getUIRequest().getTTYOutputter();
    if (doall) {
        out = createAllRecords(q.getStorage(), q.getUIRequest());
    } else {
        out = createRecords(q.getStorage(), q.getUIRequest());
    }
    q.getUIRequest().sendJSONResponse(out);
}
Also used : JSONObject(org.json.JSONObject) UIRequest(org.collectionspace.csp.api.ui.UIRequest) Request(org.collectionspace.chain.csp.webui.main.Request)

Example 8 with Request

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

the class UISpec method run.

@Override
public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    ctl = new CacheTermList(q.getCache());
    JSONObject out = uispec(q.getStorage());
    UIRequest uir = q.getUIRequest();
    uir.sendJSONResponse(out);
    int cacheMaxAgeSeconds = spec.getAdminData().getUiSpecSchemaCacheAge();
    if (cacheMaxAgeSeconds > 0) {
        uir.setCacheMaxAgeSeconds(cacheMaxAgeSeconds);
    }
}
Also used : JSONObject(org.json.JSONObject) UIRequest(org.collectionspace.csp.api.ui.UIRequest) Request(org.collectionspace.chain.csp.webui.main.Request) UIRequest(org.collectionspace.csp.api.ui.UIRequest)

Example 9 with Request

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

the class BlobRead method run.

@Override
public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    get_blob(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 10 with Request

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

the class RecordTraverser method run.

@Override
public void run(Object in, String[] tail) throws UIException {
    Request q = (Request) in;
    store_get(q.getStorage(), q.getUIRequest(), StringUtils.join(tail, "/"));
}
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