public class RestDefinition extends DBObject implements RestPluginDS, RestPluginProcess, RestPluginContentType, RestPluginConvertResult, RestPluginThrottling
Standard parameters
http://en.wikipedia.org/wiki/Representational_state_transfer
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
ReST service definition
|
static java.lang.String |
DBCLASS_NAME
ReST service definition
|
static java.lang.String |
JSON_KEY_RESULTS |
static java.lang.String |
JSON_KEY_SUCCESS |
static java.lang.String |
PARAMETER_ACCEPT |
static java.lang.String |
PARAMETER_MAGIC |
static java.lang.String |
PARAMETER_METHOD
Override the default method.
|
static java.lang.String |
REST_DEFINITION_ATTRIBUTE
The current rest definition
|
static java.lang.ThreadLocal<java.lang.Boolean> |
SUPRESS_DEPRECATION_WARNING |
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
RestDefinition(DBClass theClass,
DataSource dataSource) |
Modifier and Type | Method and Description |
---|---|
static void |
checkAccess(RestDefinition rd,
WebClient client,
Method method,
DBMagicNumber magic) |
RestDefinition |
checkMagicNumber(RestMagicNumber mn) |
void |
checkVariables(WebClient client,
Method method) |
RestServerResponse |
convertResult(RestDefinition rd,
WebClient client,
ContentType type,
java.lang.Object value)
Convert the result
|
static RestDefinition |
create(MutableDataSource mds)
Make a new instance of this class.
|
protected RestPluginContentType |
defaultRestPluginContentType() |
protected RestPluginConvertResult |
defaultRestPluginConvertResult() |
protected RestPluginDS |
defaultRestPluginDS() |
protected RestPluginProcess |
defaultRestPluginProcess() |
protected RestPluginThrottling |
defaultRestPluginThrottling() |
boolean |
disableDefaultTransformers(java.lang.String... args) |
protected void |
extFixUp()
The extended fix up routine
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
OVERRIDE This method for all objects with derived fields that are NOT linked.
|
protected boolean |
extIsMandatory(DBField field)
OVERRIDE This method to specify fields should be mandatory under certain conditions.
|
protected void |
extPreSaveRecord()
OVERRIDE this method to add functionality to stSoftware BEFORE saving the record to the database.
|
protected void |
extPreValidate()
OVERRIDE To add functionality to before validation is called.
|
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Additional validation for particular field OVERRIDE THIS METHOD TO ADD VALIDATIONS FOR A FIELD.
|
ContentType |
find(java.lang.String accept) |
RestDefinition |
findCopyFrom(java.lang.String... args)
Copy RestDefinition From.
|
static RestDefinition |
findKey(DataSource ds,
java.lang.String key)
Find the target for this class by the primary key
|
RestDefinitionLifeCycle |
findLifeCycle(java.lang.String... args)
The life cycle phase.
|
protected RestDefinitionTransform |
findTransform(java.lang.String accept,
ReadOnlyDataSource ds) |
java.lang.String |
getAliases(java.lang.String... args) |
java.lang.String |
getCode(java.lang.String... args) |
java.lang.String |
getConfigurationJSON(java.lang.String... args) |
java.lang.String |
getConsumesDELETE(java.lang.String... args) |
java.lang.String |
getConsumesPOST(java.lang.String... args) |
java.lang.String |
getConsumesPUT(java.lang.String... args) |
RestDefinition |
getCopyFrom(java.lang.String... args) |
java.lang.String |
getCorsAllowedHosts(java.lang.String... args) |
java.lang.String |
getCounterKey(WebClient client,
RestDefinition rd)
get the key of the throttling counter, the key has to be shorter than 255 characters
|
java.util.Date |
getDeprecatedNoLongerAvailable(java.lang.String... args) |
java.lang.String |
getDeprecatedReason(java.lang.String... args) |
java.lang.String |
getKey(java.lang.String... args) |
RestDefinitionLifeCycle |
getLifeCycle(java.lang.String... args) |
int |
getParserVersion(java.lang.String... args) |
java.lang.String |
getPath(java.lang.String... args) |
int |
getPeriod(WebClient client,
RestDefinition rd)
get the throttling period in seconds
|
java.lang.String |
getPlugin(java.lang.String... args) |
int |
getRequestLimit(WebClient client,
RestDefinition rd)
-1 is no limit
0 is always reject
n is allow n requests in each throttling period
|
java.lang.String |
getSummary(Method method) |
java.lang.String |
getSummaryDELETE(java.lang.String... args) |
java.lang.String |
getSummaryDELETERaw(java.lang.String... args) |
java.lang.String |
getSummaryGET(java.lang.String... args) |
java.lang.String |
getSummaryGETRaw(java.lang.String... args) |
java.lang.String |
getSummaryPOST(java.lang.String... args) |
java.lang.String |
getSummaryPOSTRaw(java.lang.String... args) |
java.lang.String |
getSummaryPUT(java.lang.String... args) |
java.lang.String |
getSummaryPUTRaw(java.lang.String... args) |
java.lang.String |
getTags(java.lang.String... args) |
ContentType |
getTargetContentType(RestDefinition rd,
WebClient client,
ContentType acceptType)
The content type.
|
int |
getThrottlingPeriod(java.lang.String... args) |
int |
getThrottlingRequestLimit(java.lang.String... args) |
java.lang.String |
getUsage(Method method) |
java.lang.String |
getUsageDELETE(java.lang.String... args) |
java.lang.String |
getUsageDELETERaw(java.lang.String... args) |
java.lang.String |
getUsageGET(java.lang.String... args) |
java.lang.String |
getUsageGETRaw(java.lang.String... args) |
java.lang.String |
getUsagePOST(java.lang.String... args) |
java.lang.String |
getUsagePOSTRaw(java.lang.String... args) |
java.lang.String |
getUsagePUT(java.lang.String... args) |
java.lang.String |
getUsagePUTRaw(java.lang.String... args) |
int |
getVersion(java.lang.String... args) |
boolean |
hasModifyAccess(java.lang.String... args) |
boolean |
isApplicableTo(Method method) |
boolean |
isApplicableToDELETE(java.lang.String... args) |
boolean |
isApplicableToGET(java.lang.String... args) |
boolean |
isApplicableToPOST(java.lang.String... args) |
boolean |
isApplicableToPUT(java.lang.String... args) |
boolean |
isDeprecated(java.lang.String... args) |
boolean |
isFinalFg(java.lang.String... args) |
boolean |
isValidVariableName(java.lang.String code) |
FileUpload |
makeFile(WebClient client,
java.lang.String code)
Make the file.
|
java.lang.String[] |
makeList(WebClient client,
java.lang.String code)
Make the parameter value.
|
static DBQuery<RestDefinition> |
makeQuery(DataSource ds)
Make a new QUERY for this class.
|
java.lang.String |
makeValue(WebClient client,
java.lang.String code)
Make the parameter value.
|
boolean |
makeValueBoolean(WebClient client,
java.lang.String code,
boolean defaultValue)
Make the parameter Boolean value.
|
double |
makeValueDouble(WebClient client,
java.lang.String code,
double defaultValue)
Make the parameter double value.
|
int |
makeValueInt(WebClient client,
java.lang.String code,
int defaultValue)
Make the parameter integer value.
|
long |
makeValueLong(WebClient client,
java.lang.String code,
long defaultValue)
Make the parameter long value.
|
java.lang.String |
parseSQL(java.lang.String rawSQL,
WebClient client) |
java.lang.Object |
process(WebClient client) |
java.lang.Object |
restCreate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP POST calls the the Create ReST service.
|
java.lang.Object |
restDelete(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP DELETE calls the the Delete ReST service.
|
ReadOnlyDataSource |
restReadDS(WebClient client,
RestDefinition restDefinition)
Create a data source that will be used for reading.
|
java.lang.Object |
restRetrieve(WebClient client,
RestDefinition restDefinition,
ReadOnlyDataSource rds)
HTTP GET calls the the Retrieval ReST service.
|
java.lang.Object |
restUpdate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP PUT calls the the Update ReST service.
|
MutableDataSource |
restWriteDS(WebClient client,
RestDefinition restDefinition)
Create a data source that will be used for writing.
|
RestDefinition |
setAliases(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setCode(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setConfigurationJSON(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setConsumesDELETE(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setConsumesPOST(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setConsumesPUT(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setCopyFrom(com.aspc.dal.cms.rest.RestDefinition value,
java.lang.String... args) |
RestDefinition |
setCorsAllowedHosts(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setDeprecated(boolean value,
java.lang.String... args) |
RestDefinition |
setDeprecatedNoLongerAvailable(java.util.Date value,
java.lang.String... args) |
RestDefinition |
setDeprecatedReason(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setDisableDefaultTransformers(boolean value,
java.lang.String... args) |
RestDefinition |
setFinalFg(boolean value,
java.lang.String... args) |
RestDefinition |
setKey(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setLifeCycle(com.aspc.dal.cms.rest.RestDefinitionLifeCycle value,
java.lang.String... args) |
RestDefinition |
setParserVersion(int value,
java.lang.String... args) |
RestDefinition |
setPlugin(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setSummary(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setSummaryDELETERaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setSummaryGETRaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setSummaryPOSTRaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setSummaryPUTRaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setTags(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setThrottlingPeriod(int value,
java.lang.String... args) |
RestDefinition |
setThrottlingRequestLimit(int value,
java.lang.String... args) |
RestDefinition |
setUsage(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setUsageDELETERaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setUsageGETRaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setUsagePOSTRaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setUsagePUTRaw(java.lang.String value,
java.lang.String... args) |
RestDefinition |
setVersion(int value,
java.lang.String... args) |
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyIncludeField, copyInwardLinks, delete, denormalizedResult, displayLogName, displayName, displayValue, doSearch, dump, equals, eventDataLoaded, eventFieldUpdated, extAutoEnterCreate, extCanDeleteDependantObject, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extCheckModifyAccess, extCheckReadAccess, extCopy, extDelete, extDeleteRecord, extGetDerivedGlobalKey, extGetValue, extIsOnChange, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extPreDeleteRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extSetValue, extUndelete, extValidateDelete, extValidateRecord, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public static final java.lang.String PARAMETER_METHOD
public static final java.lang.String PARAMETER_ACCEPT
public static final java.lang.String PARAMETER_MAGIC
public static final java.lang.String JSON_KEY_RESULTS
public static final java.lang.String JSON_KEY_SUCCESS
public static final java.lang.String REST_DEFINITION_ATTRIBUTE
public static final java.lang.ThreadLocal<java.lang.Boolean> SUPRESS_DEPRECATION_WARNING
public RestDefinition(DBClass theClass, DataSource dataSource) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getKey(java.lang.String... args)
@Nonnull public RestDefinition setKey(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getAliases(java.lang.String... args)
@Nonnull public RestDefinition setAliases(@MatchesPattern(value="/[a-zA-Z/_\\-\\*0-9]+(,/[a-zA-Z/_\\-\\*0-9]+)*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isApplicableToDELETE(java.lang.String... args)
@CheckReturnValue public boolean isApplicableToGET(java.lang.String... args)
@CheckReturnValue public boolean isApplicableToPOST(java.lang.String... args)
@CheckReturnValue public boolean isApplicableToPUT(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getCode(java.lang.String... args)
@Nonnull public RestDefinition setCode(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getConfigurationJSON(java.lang.String... args)
@Nonnull public RestDefinition setConfigurationJSON(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getConsumesDELETE(java.lang.String... args)
@Nonnull public RestDefinition setConsumesDELETE(@MatchesPattern(value="[a-zA-Z0-9]+/[a-zA-Z0-9\\-; =]+(,[a-zA-Z0-9]+/[a-zA-Z0-9\\-; =]+)*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getConsumesPOST(java.lang.String... args)
@Nonnull public RestDefinition setConsumesPOST(@MatchesPattern(value="[a-zA-Z0-9]+/[a-zA-Z0-9\\-; =]+(,[a-zA-Z0-9]+/[a-zA-Z0-9\\-; =]+)*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getConsumesPUT(java.lang.String... args)
@Nonnull public RestDefinition setConsumesPUT(@MatchesPattern(value="[a-zA-Z0-9]+/[a-zA-Z0-9\\-; =]+(,[a-zA-Z0-9]+/[a-zA-Z0-9\\-; =]+)*") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public RestDefinition getCopyFrom(java.lang.String... args)
@CheckReturnValue @Nonnull public final RestDefinition findCopyFrom(java.lang.String... args) throws NotFoundException
RestDefinition
(String, Searchable)args
- the optional argumentsNotFoundException
- RestDefinition was not found@Nonnull public RestDefinition setCopyFrom(com.aspc.dal.cms.rest.RestDefinition value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCorsAllowedHosts(java.lang.String... args)
@Nonnull public RestDefinition setCorsAllowedHosts(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isDeprecated(java.lang.String... args)
@Nonnull public RestDefinition setDeprecated(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getDeprecatedNoLongerAvailable(java.lang.String... args)
@Nonnull public RestDefinition setDeprecatedNoLongerAvailable(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getDeprecatedReason(java.lang.String... args)
@Nonnull public RestDefinition setDeprecatedReason(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean disableDefaultTransformers(java.lang.String... args)
@Nonnull public RestDefinition setDisableDefaultTransformers(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isFinalFg(java.lang.String... args)
@Nonnull public RestDefinition setFinalFg(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean hasModifyAccess(java.lang.String... args)
@CheckReturnValue @Nullable public RestDefinitionLifeCycle getLifeCycle(java.lang.String... args)
@CheckReturnValue @Nonnull public final RestDefinitionLifeCycle findLifeCycle(java.lang.String... args) throws NotFoundException
RestDefinitionLifeCycle
(String, Searchable)args
- the optional argumentsNotFoundException
- RestDefinitionLifeCycle was not found@Nonnull public RestDefinition setLifeCycle(com.aspc.dal.cms.rest.RestDefinitionLifeCycle value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnegative public int getParserVersion(java.lang.String... args)
@Nonnull public RestDefinition setParserVersion(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPath(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getPlugin(java.lang.String... args)
@Nonnull public RestDefinition setPlugin(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull public RestDefinition setSummary(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSummaryDELETE(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getSummaryDELETERaw(java.lang.String... args)
@Nonnull public RestDefinition setSummaryDELETERaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSummaryGET(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getSummaryGETRaw(java.lang.String... args)
@Nonnull public RestDefinition setSummaryGETRaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSummaryPOST(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getSummaryPOSTRaw(java.lang.String... args)
@Nonnull public RestDefinition setSummaryPOSTRaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSummaryPUT(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getSummaryPUTRaw(java.lang.String... args)
@Nonnull public RestDefinition setSummaryPUTRaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getTags(java.lang.String... args)
@Nonnull public RestDefinition setTags(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnegative public int getThrottlingPeriod(java.lang.String... args)
@Nonnull public RestDefinition setThrottlingPeriod(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getThrottlingRequestLimit(java.lang.String... args)
@Nonnull public RestDefinition setThrottlingRequestLimit(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull public RestDefinition setUsage(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getUsageDELETE(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getUsageDELETERaw(java.lang.String... args)
@Nonnull public RestDefinition setUsageDELETERaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getUsageGET(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getUsageGETRaw(java.lang.String... args)
@Nonnull public RestDefinition setUsageGETRaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getUsagePOST(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getUsagePOSTRaw(java.lang.String... args)
@Nonnull public RestDefinition setUsagePOSTRaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getUsagePUT(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getUsagePUTRaw(java.lang.String... args)
@Nonnull public RestDefinition setUsagePUTRaw(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnegative public int getVersion(java.lang.String... args)
@Nonnull public RestDefinition setVersion(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull @CheckReturnValue public static RestDefinition create(@Nonnull MutableDataSource mds) throws java.lang.Exception
mds
- the datasourcejava.lang.Exception
- an object of this class could not be created@Nonnull @CheckReturnValue public static DBQuery<RestDefinition> makeQuery(@Nonnull DataSource ds) throws NotFoundException
ds
- the datasourceNotFoundException
- if class could not be found@Nonnull @CheckReturnValue public static RestDefinition findKey(@Nonnull DataSource ds, @Nonnull java.lang.String key) throws NotFoundException, java.lang.Exception
ds
- the datasourcekey
- the valueNotFoundException
- if target could not be foundjava.lang.Exception
- a serious problem@Nonnull @CheckReturnValue public ContentType find(@Nullable java.lang.String accept) throws ExceptionResponse
ExceptionResponse
@CheckReturnValue public boolean isValidVariableName(java.lang.String code)
@CheckReturnValue protected boolean extIsMandatory(DBField field)
DBObject
extIsMandatory
in class DBObject
field
- The field to check@CheckReturnValue public int makeValueInt(WebClient client, java.lang.String code, int defaultValue) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.defaultValue
- return this value if the variable doesn't have a default value, and this variable is blank.ExceptionResponse
- a problem@CheckReturnValue public long makeValueLong(WebClient client, java.lang.String code, long defaultValue) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.defaultValue
- return this value if the variable doesn't have a default value, and this variable is blank.ExceptionResponse
- a problem@CheckReturnValue public double makeValueDouble(WebClient client, java.lang.String code, double defaultValue) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.defaultValue
- return this value if the variable doesn't have a default value, and this variable is blank.ExceptionResponse
- a problem@CheckReturnValue public boolean makeValueBoolean(WebClient client, java.lang.String code, boolean defaultValue) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.defaultValue
- the default value;ExceptionResponse
- a problem@CheckReturnValue @Nonnull public java.lang.String makeValue(WebClient client, java.lang.String code) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.ExceptionResponse
- a problem@CheckReturnValue @Nonnull public java.lang.String[] makeList(WebClient client, java.lang.String code) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.ExceptionResponse
- a problempublic FileUpload makeFile(WebClient client, java.lang.String code) throws ExceptionResponse
client
- the client callcode
- the parameter to evaluate.ExceptionResponse
- a problem@OverridingMethodsMustInvokeSuper protected void extPreSaveRecord() throws java.lang.Exception
DBObject
extPreSaveRecord
in class DBObject
java.lang.Exception
- A Serious problem@OverridingMethodsMustInvokeSuper protected void extPreValidate() throws java.lang.Exception
DBObject
extPreValidate
in class DBObject
java.lang.Exception
- a serious problem@OverridingMethodsMustInvokeSuper protected void extFixUp() throws java.lang.Exception
DBObject
@Nullable @CheckReturnValue @OverridingMethodsMustInvokeSuper protected ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
DBObject
extValidateField
in class DBObject
field
- The field to be validatedlist
- The validation listjava.lang.Exception
- a serious error@CheckReturnValue protected java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
DBObject
extGetDerivedValue
in class DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- a serious problempublic java.lang.String getSummary(Method method)
public java.lang.String getUsage(Method method)
public boolean isApplicableTo(Method method) throws java.lang.Exception
java.lang.Exception
public java.lang.String parseSQL(java.lang.String rawSQL, WebClient client) throws ExceptionResponse
ExceptionResponse
@Nonnull public RestDefinition checkMagicNumber(@Nonnull RestMagicNumber mn) throws ExceptionResponse
ExceptionResponse
public static void checkAccess(RestDefinition rd, WebClient client, @Nonnull Method method, @Nullable DBMagicNumber magic) throws ExceptionResponse
ExceptionResponse
protected RestPluginDS defaultRestPluginDS()
protected RestPluginProcess defaultRestPluginProcess()
protected RestPluginContentType defaultRestPluginContentType()
protected RestPluginConvertResult defaultRestPluginConvertResult()
protected RestPluginThrottling defaultRestPluginThrottling()
public java.lang.Object process(WebClient client) throws java.lang.Exception
java.lang.Exception
protected RestDefinitionTransform findTransform(@Nonnull java.lang.String accept, @Nonnull ReadOnlyDataSource ds) throws java.lang.Exception
java.lang.Exception
public void checkVariables(WebClient client, @Nonnull Method method) throws ExceptionResponse
ExceptionResponse
public MutableDataSource restWriteDS(WebClient client, RestDefinition restDefinition) throws java.lang.Exception
RestPluginDS
restWriteDS
in interface RestPluginDS
client
- the clientrestDefinition
- the definitionjava.lang.Exception
- a problem occurred.public ReadOnlyDataSource restReadDS(WebClient client, RestDefinition restDefinition) throws java.lang.Exception
RestPluginDS
restReadDS
in interface RestPluginDS
client
- the clientrestDefinition
- the definitionjava.lang.Exception
- a problem occurred.public java.lang.Object restCreate(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcess
restCreate
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionmds
- the data source to usejava.lang.UnsupportedOperationException
- if this method is NOT supported.ExceptionResponse
- an error has occurred.java.lang.Exception
public java.lang.Object restRetrieve(WebClient client, RestDefinition restDefinition, ReadOnlyDataSource rds) throws java.lang.Exception
RestPluginProcess
restRetrieve
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionrds
- the data source to usejava.lang.UnsupportedOperationException
- if this method is NOT supported.java.lang.Exception
- an error has occurred.public java.lang.Object restUpdate(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcess
restUpdate
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionmds
- the data source to usejava.lang.UnsupportedOperationException
- if this method is NOT supported.ExceptionResponse
- an error has occurred.java.lang.Exception
public java.lang.Object restDelete(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcess
restDelete
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionmds
- the data source to use.java.lang.UnsupportedOperationException
- if this method is NOT supported.ExceptionResponse
- an error has occurred.java.lang.Exception
public ContentType getTargetContentType(RestDefinition rd, WebClient client, ContentType acceptType)
RestPluginContentType
getTargetContentType
in interface RestPluginContentType
rd
- the definitionclient
- the clientacceptType
- the accepted type.public RestServerResponse convertResult(RestDefinition rd, WebClient client, ContentType type, java.lang.Object value) throws java.lang.Exception
RestPluginConvertResult
convertResult
in interface RestPluginConvertResult
rd
- the definitionclient
- the clienttype
- the target typevalue
- the value to be converted.java.lang.Exception
- a serious problem.public java.lang.String getCounterKey(@Nonnull WebClient client, @Nonnull RestDefinition rd) throws java.lang.UnsupportedOperationException, java.lang.Exception, java.lang.IllegalArgumentException
RestPluginThrottling
getCounterKey
in interface RestPluginThrottling
client
- the client. Null means check only of opsrd
- the definitionjava.lang.UnsupportedOperationException
- if this method is NOT supported.java.lang.Exception
- an error has occurred.java.lang.IllegalArgumentException
public int getRequestLimit(@Nonnull WebClient client, @Nonnull RestDefinition rd) throws java.lang.UnsupportedOperationException, java.lang.Exception
RestPluginThrottling
getRequestLimit
in interface RestPluginThrottling
client
- the client. Null means check only of opsrd
- the definitionjava.lang.UnsupportedOperationException
- use default throttling settings configured in RestDefinition recordjava.lang.Exception
public int getPeriod(@Nonnull WebClient client, @Nonnull RestDefinition rd) throws java.lang.UnsupportedOperationException, java.lang.Exception
RestPluginThrottling
getPeriod
in interface RestPluginThrottling
client
- the client. Null means check only of opsrd
- the definitionjava.lang.UnsupportedOperationException
- use default throttling settings configured in RestDefinition recordjava.lang.Exception
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.