public class JsonOrJsonpBatchHandler extends Object implements M3BatchHandler
M3BatchHandler.Entity, M3BatchHandler.M3Argument, M3BatchHandler.M3BatchResponse, M3BatchHandler.M3Request, M3BatchHandler.Operation
Modifier and Type | Field and Description |
---|---|
static boolean |
ADD_INFERENCES |
boolean |
CHECK_LITERAL_IDENTIFIERS |
static boolean |
ENFORCE_EXTERNAL_VALIDATE |
static String |
JSONP_DEFAULT_CALLBACK |
static String |
JSONP_DEFAULT_OVERWRITE |
static boolean |
USE_USER_ID |
static boolean |
VALIDATE_BEFORE_SAVE |
Constructor and Description |
---|
JsonOrJsonpBatchHandler(UndoAwareMolecularModelManager models,
Set<org.semanticweb.owlapi.model.OWLObjectProperty> importantRelations,
ExternalLookupService externalLookupService) |
Modifier and Type | Method and Description |
---|---|
String |
checkModelId(String modelId,
M3BatchHandler.M3Request request) |
protected void |
checkPermissions(M3BatchHandler.Entity entity,
M3BatchHandler.Operation operation,
boolean isPrivileged) |
protected String |
generateDateString()
separate method, intended to be overridden during test.
|
static void |
initResponseData(JsonModel jsonModel,
M3BatchHandler.M3BatchResponse.ResponseData data) |
M3BatchHandler.M3BatchResponse |
m3Batch(String uid,
String intention,
String packetId,
M3BatchHandler.M3Request[] requests,
boolean isPrivileged)
Process a batch request.
|
M3BatchHandler.M3BatchResponse |
m3BatchGet(String intention,
String packetId,
String requestString)
Jersey REST method for GET with three query parameters.
|
M3BatchHandler.M3BatchResponse |
m3BatchGetPrivileged(String uid,
String intention,
String packetId,
String requestString)
Jersey REST method for GET with three query parameters with privileged rights.
|
M3BatchHandler.M3BatchResponse |
m3BatchPost(String intention,
String packetId,
String requestString)
Jersey REST method for POST with three form parameters.
|
M3BatchHandler.M3BatchResponse |
m3BatchPostPrivileged(String uid,
String intention,
String packetId,
String requestString)
Jersey REST method for POST with three form parameters with privileged rights.
|
public static final String JSONP_DEFAULT_CALLBACK
public static final String JSONP_DEFAULT_OVERWRITE
public static boolean USE_USER_ID
public static boolean ADD_INFERENCES
public static boolean VALIDATE_BEFORE_SAVE
public static boolean ENFORCE_EXTERNAL_VALIDATE
public boolean CHECK_LITERAL_IDENTIFIERS
public JsonOrJsonpBatchHandler(UndoAwareMolecularModelManager models, Set<org.semanticweb.owlapi.model.OWLObjectProperty> importantRelations, ExternalLookupService externalLookupService)
@JSONP(callback="jsonp", queryParam="json.wrf") public M3BatchHandler.M3BatchResponse m3BatchGet(String intention, String packetId, String requestString)
M3BatchHandler
m3BatchGet
in interface M3BatchHandler
intention
- JSONP relevantrequestString
- JSON string of the batch request@JSONP(callback="jsonp", queryParam="json.wrf") public M3BatchHandler.M3BatchResponse m3BatchGetPrivileged(String uid, String intention, String packetId, String requestString)
M3BatchHandler
m3BatchGetPrivileged
in interface M3BatchHandler
uid
- user id, JSONP relevantintention
- JSONP relevantrequestString
- JSON string of the batch request@JSONP(callback="jsonp", queryParam="json.wrf") public M3BatchHandler.M3BatchResponse m3BatchPost(String intention, String packetId, String requestString)
M3BatchHandler
m3BatchPost
in interface M3BatchHandler
intention
- JSONP relevantrequestString
- JSON string of the batch request@JSONP(callback="jsonp", queryParam="json.wrf") public M3BatchHandler.M3BatchResponse m3BatchPostPrivileged(String uid, String intention, String packetId, String requestString)
M3BatchHandler
m3BatchPostPrivileged
in interface M3BatchHandler
uid
- user id, JSONP relevantintention
- JSONP relevantrequestString
- JSON string of the batch requestpublic M3BatchHandler.M3BatchResponse m3Batch(String uid, String intention, String packetId, M3BatchHandler.M3Request[] requests, boolean isPrivileged)
M3BatchHandler
m3Batch
in interface M3BatchHandler
uid
- user id, JSONP relevantintention
- JSONP relevantpacketId
- response relevant, may be nullrequests
- batch requestisPrivileged
- true, if the access is privilegedpublic static void initResponseData(JsonModel jsonModel, M3BatchHandler.M3BatchResponse.ResponseData data)
protected void checkPermissions(M3BatchHandler.Entity entity, M3BatchHandler.Operation operation, boolean isPrivileged) throws owltools.gaf.lego.server.handler.JsonOrJsonpBatchHandler.InsufficientPermissionsException
public String checkModelId(String modelId, M3BatchHandler.M3Request request) throws owltools.gaf.lego.server.handler.OperationsTools.MissingParameterException, owltools.gaf.lego.server.handler.OperationsImpl.MultipleModelIdsParameterException
modelId
- request
- owltools.gaf.lego.server.handler.OperationsTools.MissingParameterException
MultipleModelIdsParameterException
owltools.gaf.lego.server.handler.OperationsImpl.MultipleModelIdsParameterException
protected String generateDateString()
Copyright © 2010–2015. All rights reserved.