Class Query


  • public class Query
    extends java.lang.Object
    This represents a query object that is used to execute a operation in dermis.
    • 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()
        Gets DataContext represents 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 -
      • setArguments

        @Deprecated
        public void setArguments​(org.apache.sling.commons.json.JSONObject arguments)
        Deprecated.
        Set 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.
        Get arguments representing the input of the operation as JSONObject
        Returns:
        input in JSONObject format
      • getArgumentsValueMap

        public IValueMap getArgumentsValueMap()
        Get arguments representing the input of the operation as IValueMap
        Returns:
        input in IValueMap format
      • 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)