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]);
}
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);
}
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);
}
}
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, "/"));
}
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);
}
Aggregations