public class RestURLDataControl extends AbstractImpl implements UpdateableDataControl, DefinitionProviderDataControl
METHOD_CREATE, METHOD_EXECUTE, mName, SORT_CRITERIA
Constructor and Description |
---|
RestURLDataControl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
createRowData(RowContext ctx)
This method is called by the data binding framework when a new
row is needed from the data control.
|
java.lang.Object |
getDataProvider()
Returns the Business Service Object that this datacontrol is associated with.
|
Definition |
getDefinition(java.lang.String name,
int type)
Returns a definition of the specified type.
|
java.util.Map<java.lang.String,java.lang.String> |
getDynamicQueryParams() |
java.lang.String |
getHttpErrorResponse()
Returns the error response of the server
if the last call to invokeOperation fetched a HTTP Response
with HTTP Status code >300 and if HTTP Header Content-Type is of media type
application/json, text/plain or application/xml (or an extension of xml e.g application/rss+xml)
The error response from last invoked operation is cleared, once another call to invokeOperation is made.
|
java.lang.String |
getName()
Returns name to identify this datacontrol inside a BindingContext.
|
java.util.Map<java.lang.String,java.lang.String> |
getRequestHTTPHeaders()
The method do not clone and return the header maps.
|
java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
getResponseHTTPHeaders()
Returns the Response HTTP Header from the HTTP call made by
invokeOperation
The headers e from last invoked operation is cleared, once another call to invokeOperation is made.
|
int |
getStatusCode()
Give the status code for last HTTP request.
|
boolean |
invokeOperation(java.util.Map bindingContext,
OperationBinding action)
All OperationBindings should first delegate to the DataControl associated
with the binding to perform the action.
|
java.lang.Object |
registerDataProvider(RowContext ctx)
This method is called by the data binding facility before the row in the RowContext object is
modified or marked as removed, so the row can be marked dirty by the data control.
|
void |
release()
Releases the DataControl.
|
boolean |
removeRowData(RowContext ctx)
This method is called by the data binding facility when a row
should be removed from the underlying data source.
|
boolean |
setAttributeValue(AttributeContext ctx,
java.lang.Object value)
This method is called by the data binding framework when a new
value is to be set on an attribute in a bean.
|
void |
setDynamicQueryParams(java.util.Map<java.lang.String,java.lang.String> dynamicQueryParams)
Sets the Query Parameter to the http requests made for this data control Instance
|
void |
setRequestHTTPHeaders(java.util.Map<java.lang.String,java.lang.String> requestHttpHeaderParams)
Meant for groovy invocation.
|
void |
validate()
Validates transaction if dirty.
|
addParameter, createAndAddNewRow, createEmptyDataSet, findContainedDef, getAdapterContext, getDefinition, getDefinitionInternal, getParameterNames, getParameterValue, getSortCriteria, getStructureDef, getStructureDef, processResult, removeCurrentRow, setDefinition, setName, setParameterValue, setStructureDef, shouldReexecuteOperation
public void setDynamicQueryParams(java.util.Map<java.lang.String,java.lang.String> dynamicQueryParams)
dynamicQueryParams
- public java.lang.String getHttpErrorResponse()
public int getStatusCode()
public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getResponseHTTPHeaders()
public void setRequestHTTPHeaders(java.util.Map<java.lang.String,java.lang.String> requestHttpHeaderParams)
public java.util.Map<java.lang.String,java.lang.String> getRequestHTTPHeaders()
public java.util.Map<java.lang.String,java.lang.String> getDynamicQueryParams()
public boolean invokeOperation(java.util.Map bindingContext, OperationBinding action)
DataControl
invokeOperation
in interface DataControl
public java.lang.Object createRowData(RowContext ctx)
UpdateableDataControl
createRowData
in interface UpdateableDataControl
ctx
- Context of the new row.public java.lang.Object getDataProvider()
DataControl
getDataProvider
in interface DataControl
public Definition getDefinition(java.lang.String name, int type)
DefinitionProviderDataControl
getDefinition
in interface DefinitionProviderDataControl
public java.lang.String getName()
DataControl
getName
in interface DataControl
public java.lang.Object registerDataProvider(RowContext ctx)
UpdateableDataControl
registerDataProvider
in interface UpdateableDataControl
ctx
- Context of the row to be modified or removed.public void release()
DataControl
This should close all open DataControl resources.
release
in interface DataControl
public boolean removeRowData(RowContext ctx)
UpdateableDataControl
removeRowData
in interface UpdateableDataControl
ctx
- Context of the row to be removed.public boolean setAttributeValue(AttributeContext ctx, java.lang.Object value)
UpdateableDataControl
Return true if the base framework should skip any further processing of this attribute set. Otherwise return false so that framework can perform a set or put of the attribute value based on introspection.
setAttributeValue
in interface UpdateableDataControl
public void validate()
UpdateableDataControl
validate
in interface UpdateableDataControl