Class RemoteParams

java.lang.Object
fr.becpg.repo.entity.remote.RemoteParams

public class RemoteParams extends Object

RemoteParams class.

Author:
matthieu
  • Field Details

    • PARAM_APPEND_CODE

      public static final String PARAM_APPEND_CODE
      Constant PARAM_APPEND_CODE="appendCode"
      See Also:
    • PARAM_APPEND_ERP_CODE

      public static final String PARAM_APPEND_ERP_CODE
      Constant PARAM_APPEND_ERP_CODE="appendErpCode"
      See Also:
    • PARAM_APPEND_MLTEXT_CONSTRAINT

      public static final String PARAM_APPEND_MLTEXT_CONSTRAINT
      Constant PARAM_APPEND_MLTEXT_CONSTRAINT="appendMlTextConstraint"
      See Also:
    • PARAM_APPEND_NODEREF

      public static final String PARAM_APPEND_NODEREF
      Constant PARAM_APPEND_NODEREF="appendNodeRef"
      See Also:
    • PARAM_UPDATE_ENTITY_NODEREFS

      public static final String PARAM_UPDATE_ENTITY_NODEREFS
      Constant PARAM_UPDATE_ENTITY_NODEREFS="updateEntityNodeRefs"
      See Also:
    • PARAM_REPLACE_HISTORY_NODEREFS

      public static final String PARAM_REPLACE_HISTORY_NODEREFS
      Constant PARAM_REPLACE_HISTORY_NODEREFS="replaceHistoryNodeRefs"
      See Also:
    • PARAM_APPEND_CONTENT

      public static final String PARAM_APPEND_CONTENT
      Constant PARAM_APPEND_CONTENT="appendContent"
      See Also:
    • PARAM_APPEND_PARENT

      public static final String PARAM_APPEND_PARENT
      Constant PARAM_APPEND_PARENT="appendParent"

      Opt-in flag, OFF by default: when set, the JSON serialisation of a listing row (RemoteJSONContext.JsonVisitNodeType.ENTITY_LIST) also carries its primary parent (parent + path) and, for a datalist item, the nodeRef of the entity owning the list (entityId). Left unset the output is unchanged.

      See Also:
    • PARAM_IS_INITIAL_VERSION

      public static final String PARAM_IS_INITIAL_VERSION
      Constant PARAM_IS_INITIAL_VERSION="isInitialVersion"
      See Also:
    • PARAM_REPLACE_EXISTING_LISTS

      public static final String PARAM_REPLACE_EXISTING_LISTS
      Constant PARAM_REPLACE_EXISTING_LISTS="replaceExistingLists"
      See Also:
    • PARAM_DATALISTS_TO_REPLACE

      public static final String PARAM_DATALISTS_TO_REPLACE
      Constant PARAM_DATALISTS_TO_REPLACE="dataListsToReplace"
      See Also:
    • PARAM_FAIL_ON_ASSOC_NOT_FOUND

      public static final String PARAM_FAIL_ON_ASSOC_NOT_FOUND
      Constant PARAM_FAIL_ON_ASSOC_NOT_FOUND="failOnAssociationNotFound"
      See Also:
    • PARAM_APPEND_MLTEXT

      public static final String PARAM_APPEND_MLTEXT
      Constant PARAM_APPEND_MLTEXT="appendMlText"
      See Also:
    • PARAM_APPEND_NESTED_DATALIST_TYPE

      public static final String PARAM_APPEND_NESTED_DATALIST_TYPE
      Constant PARAM_APPEND_NESTED_DATALIST_TYPE="appendNestedDataListType"
      See Also:
    • PARAM_APPEND_REPORT_PROPS

      public static final String PARAM_APPEND_REPORT_PROPS
      Constant PARAM_APPEND_REPORT_PROPS="appendReportProps"
      See Also:
    • format

      private RemoteEntityFormat format
    • jsonParams

      private org.json.JSONObject jsonParams
    • appendParent

      private boolean appendParent
    • filteredProperties

      private Set<org.alfresco.service.namespace.QName> filteredProperties
    • ignoredFields

      private Set<org.alfresco.service.namespace.QName> ignoredFields
    • filteredLists

      private Set<String> filteredLists
    • filteredAssocProperties

      private Map<org.alfresco.service.namespace.QName,Set<org.alfresco.service.namespace.QName>> filteredAssocProperties
  • Constructor Details

  • Method Details

    • getFormat

      public RemoteEntityFormat getFormat()

      Getter for the field format.

      Returns:
      a RemoteEntityFormat object
    • setJsonParams

      public void setJsonParams(org.json.JSONObject jsonParams)

      Setter for the field jsonParams.

      Parameters:
      jsonParams - a JSONObject object
    • isAppendParent

      public boolean isAppendParent()

      isAppendParent.

      Whether the parent of a listing row should be serialized, see PARAM_APPEND_PARENT. Defaults to false so that the output stays unchanged for every existing consumer.
      Returns:
      a boolean
    • setAppendParent

      public void setAppendParent(boolean appendParent)

      Setter for the field appendParent.

      Parameters:
      appendParent - a boolean
    • getFilteredAssocProperties

      public Map<org.alfresco.service.namespace.QName,Set<org.alfresco.service.namespace.QName>> getFilteredAssocProperties()

      Getter for the field filteredAssocProperties.

      Returns:
      a Map object
    • getJsonParams

      public org.json.JSONObject getJsonParams()

      Getter for the field jsonParams.

      Returns:
      a JSONObject object
    • getFilteredProperties

      public Set<org.alfresco.service.namespace.QName> getFilteredProperties()

      Getter for the field filteredProperties.

      Returns:
      a Set object
    • getIgnoredFields

      public Set<org.alfresco.service.namespace.QName> getIgnoredFields()

      Getter for the field ignoredFields.

      Returns:
      a Set object
    • getFilteredLists

      public Set<String> getFilteredLists()

      Getter for the field filteredLists.

      Returns:
      a Set object
    • setFilteredProperties

      public void setFilteredProperties(Set<org.alfresco.service.namespace.QName> filteredProperties)

      Setter for the field filteredProperties.

      Parameters:
      filteredProperties - a Set object
    • setFilteredLists

      public void setFilteredLists(Set<String> filteredLists)

      Setter for the field filteredLists.

      Parameters:
      filteredLists - a Set object
    • setFilteredAssocProperties

      public void setFilteredAssocProperties(Map<org.alfresco.service.namespace.QName,Set<org.alfresco.service.namespace.QName>> filteredAssocProperties)

      Setter for the field filteredAssocProperties.

      Parameters:
      filteredAssocProperties - a Map object
    • setFilteredFields

      public void setFilteredFields(Set<String> fields, org.alfresco.service.namespace.NamespaceService namespaceService)

      setFilteredFields.

      Parameters:
      fields - a List object.
      namespaceService - a NamespaceService object
    • canSkipProperty

      public boolean canSkipProperty(org.alfresco.service.namespace.QName assocName, org.alfresco.service.namespace.QName propQName)
      Whether a property can be discarded before resolving its prefixed name and its definition, both of which are paid once per property and per row. Only a positive property filter allows the shortcut: an assoc|property request is answered by the association branch and a rejection filter (!field) says what to drop rather than what to keep.
      Parameters:
      assocName - the association being visited, or null for the node itself
      propQName - the raw property QName
      Returns:
      true when the property is certainly not wanted
    • requiresAssociations

      public boolean requiresAssociations(Predicate<org.alfresco.service.namespace.QName> isAssociation)
      Whether serialising a node under this filter needs its child and target associations walked, a traversal otherwise paid for every row of a listing. A requested field name lands in the properties set whether it denotes a property or an association, hence the dictionary lookup passed in to tell them apart.
      Parameters:
      isAssociation - tells whether a QName is an association in the model
      Returns:
      true when the associations must be visited
    • isValidQNameString

      protected boolean isValidQNameString(String qName)

      isValidQNameString.

      Parameters:
      qName - a String object.
      Returns:
      a boolean.
    • extractParams

      public <T> T extractParams(String paramKey, T defaultValue) throws org.json.JSONException

      extractParams.

      Type Parameters:
      T - a T class
      Parameters:
      paramKey - a String object
      defaultValue - a T object
      Returns:
      a T object
      Throws:
      org.json.JSONException - if any.
    • shouldExtractList

      public boolean shouldExtractList(String listName)

      shouldExtractList.

      Parameters:
      listName - a String object
      Returns:
      a boolean
    • shouldExtractField

      public boolean shouldExtractField(org.alfresco.service.namespace.QName field)

      shouldExtractField.

      Parameters:
      field - a QName object
      Returns:
      a boolean