Package com.adobe.aem.dermis.api.bridge
Class Query
- java.lang.Object
-
- com.adobe.aem.dermis.api.bridge.Query
-
public class Query extends java.lang.ObjectThis represents a query object that is used to execute a operation in dermis.
-
-
Constructor Summary
Constructors Constructor Description Query(java.lang.String formDataModelPath, DataContext dataContext)Create Query using form data model path and data contextQuery(java.lang.String formDataModelPath, DataContext dataContext, OperationOptions options)Create Query using form data model path, data context and operation arguments
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEntityAndOperation(java.lang.String entityId, java.lang.String operationId)org.apache.sling.commons.json.JSONObjectgetArguments()Deprecated.UsegetArgumentsValueMap()insteadIValueMapgetArgumentsValueMap()Get arguments representing the input of the operation as IValueMapDataContextgetDataContext()GetsDataContextrepresents a pluggable mechanism for resolving a operation arguments at evaluation time.java.lang.StringgetEntityId()java.util.Map<java.lang.String,java.lang.String>getEntityOperationMapping()java.lang.StringgetFormDataModelPath()Get FormDataModel unique identifierjava.lang.StringgetOperationId()OperationOptionsgetOptions()GetOperationOptionswhich provide additional option of querybooleangetOutputTypeArray()Tells whether return type of this operation is an array or notjava.lang.StringgetSelectionPoints()booleanisEvaluateComputedAttrs()voidreplaceOperationRefByName(java.lang.String operationRef, java.lang.String operationName)voidsetArguments(org.apache.sling.commons.json.JSONObject arguments)Deprecated.UsesetArgumentsValueMap(IValueMap)insteadvoidsetArgumentsValueMap(IValueMap arguments)Set operation arguments, accepts an IValueMap for arguments Input arguments can be given either as a JSONObject or as IValueMap - these two formats are mutually exclusive.voidsetDataContext(DataContext dataContext)Sets the dataContext which will be used for resolving a operation arguments at evaluation time.voidsetEvaluateComputedAttrs(boolean evaluateComputedAttrs)voidsetFormDataModelPath(java.lang.String formDataModelPath)Sets the formDataModel unique identifier.voidsetOptions(OperationOptions options)SetOperationOptionsin queryvoidsetOutputTypeArray(boolean isOutputTypeArray)Sets whether return type of this operation is an array or not
-
-
-
Constructor Detail
-
Query
public Query(java.lang.String formDataModelPath, DataContext dataContext)Create Query using form data model path and data context- Parameters:
formDataModelPath-dataContext-
-
Query
public Query(java.lang.String formDataModelPath, DataContext dataContext, OperationOptions options)Create Query using form data model path, data context and operation arguments- Parameters:
formDataModelPath-dataContext-options-
-
-
Method Detail
-
getDataContext
public DataContext getDataContext()
GetsDataContextrepresents a pluggable mechanism for resolving a operation arguments at evaluation time.- Returns:
- -
DataContext
-
setDataContext
public void setDataContext(DataContext dataContext)
Sets the dataContext which will be used for resolving a operation arguments at evaluation time.- Parameters:
dataContext-DataContext
-
getFormDataModelPath
public java.lang.String getFormDataModelPath()
Get FormDataModel unique identifier- Returns:
- identifier of FormDataModel
-
setFormDataModelPath
public void setFormDataModelPath(java.lang.String formDataModelPath)
Sets the formDataModel unique identifier.- Parameters:
formDataModelPath- - unique identifier of FormDataModel
-
getEntityId
public java.lang.String getEntityId()
- Returns:
- - identifier of entity
-
getOperationId
public java.lang.String getOperationId()
- Returns:
- - identifier of entity
-
addEntityAndOperation
public void addEntityAndOperation(java.lang.String entityId, java.lang.String operationId)- Parameters:
entityId-operationId-
-
getOptions
public OperationOptions getOptions()
GetOperationOptionswhich provide additional option of query- Returns:
OperationOptions
-
setOptions
public void setOptions(OperationOptions options)
SetOperationOptionsin query- Parameters:
options-OperationOptions
-
setArguments
@Deprecated public void setArguments(org.apache.sling.commons.json.JSONObject arguments)
Deprecated.UsesetArgumentsValueMap(IValueMap)insteadSet operation arguments, accepts a JSONObject for arguments Input arguments can be given either as a JSONObject or as IValueMap - these two formats are mutually exclusive. If input arguments have been provided in one format, it should not be provided in another format, unless the already provided inputs are cleared- Parameters:
arguments-
-
setArgumentsValueMap
public void setArgumentsValueMap(IValueMap arguments)
Set operation arguments, accepts an IValueMap for arguments Input arguments can be given either as a JSONObject or as IValueMap - these two formats are mutually exclusive. If input arguments have been provided in one format, it should not be provided in another format, unless the already provided inputs are cleared- Parameters:
arguments-
-
getArguments
@Deprecated public org.apache.sling.commons.json.JSONObject getArguments()
Deprecated.UsegetArgumentsValueMap()insteadGet arguments representing the input of the operation as JSONObject- Returns:
- input in
JSONObjectformat
-
getArgumentsValueMap
public IValueMap getArgumentsValueMap()
Get arguments representing the input of the operation as IValueMap- Returns:
- input in
IValueMapformat
-
getEntityOperationMapping
public java.util.Map<java.lang.String,java.lang.String> getEntityOperationMapping()
- Returns:
- Map of entity related operation details..
-
replaceOperationRefByName
public void replaceOperationRefByName(java.lang.String operationRef, java.lang.String operationName)- Parameters:
operationRef-operationName-
-
getSelectionPoints
public java.lang.String getSelectionPoints()
- Returns:
- selectionPoints
-
getOutputTypeArray
public boolean getOutputTypeArray()
Tells whether return type of this operation is an array or not- Returns:
-
setOutputTypeArray
public void setOutputTypeArray(boolean isOutputTypeArray)
Sets whether return type of this operation is an array or not
-
isEvaluateComputedAttrs
public boolean isEvaluateComputedAttrs()
-
setEvaluateComputedAttrs
public void setEvaluateComputedAttrs(boolean evaluateComputedAttrs)
-
-