Class RemoteParams
RemoteParams class.
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Set<org.alfresco.service.namespace.QName> private RemoteEntityFormatprivate Set<org.alfresco.service.namespace.QName> private org.json.JSONObjectstatic final StringConstantPARAM_APPEND_CODE="appendCode"static final StringConstantPARAM_APPEND_CONTENT="appendContent"static final StringConstantPARAM_APPEND_ERP_CODE="appendErpCode"static final StringConstantPARAM_APPEND_MLTEXT="appendMlText"static final StringConstantPARAM_APPEND_MLTEXT_CONSTRAINT="appendMlTextConstraint"static final StringConstantPARAM_APPEND_NESTED_DATALIST_TYPE="appendNestedDataListType"static final StringConstantPARAM_APPEND_NODEREF="appendNodeRef"static final StringConstantPARAM_APPEND_PARENT="appendParent"static final StringConstantPARAM_APPEND_REPORT_PROPS="appendReportProps"static final StringConstantPARAM_DATALISTS_TO_REPLACE="dataListsToReplace"static final StringConstantPARAM_FAIL_ON_ASSOC_NOT_FOUND="failOnAssociationNotFound"static final StringConstantPARAM_IGNORE_PATH_FOR_SEARCH="ignorePathOnSearch"static final StringConstantPARAM_IS_INITIAL_VERSION="isInitialVersion"static final StringConstantPARAM_REPLACE_EXISTING_LISTS="replaceExistingLists"static final StringConstantPARAM_REPLACE_HISTORY_NODEREFS="replaceHistoryNodeRefs"static final StringConstantPARAM_UPDATE_ENTITY_NODEREFS="updateEntityNodeRefs" -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSkipProperty(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.<T> TextractParams(String paramKey, T defaultValue) extractParams.Getter for the fieldfilteredAssocProperties.Getter for the fieldfilteredLists.Set<org.alfresco.service.namespace.QName> Getter for the fieldfilteredProperties.Getter for the fieldformat.Set<org.alfresco.service.namespace.QName> Getter for the fieldignoredFields.org.json.JSONObjectGetter for the fieldjsonParams.booleanisAppendParent.protected booleanisValidQNameString(String qName) isValidQNameString.booleanrequiresAssociations(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.voidsetAppendParent(boolean appendParent) Setter for the fieldappendParent.voidsetFilteredAssocProperties(Map<org.alfresco.service.namespace.QName, Set<org.alfresco.service.namespace.QName>> filteredAssocProperties) Setter for the fieldfilteredAssocProperties.voidsetFilteredFields(Set<String> fields, org.alfresco.service.namespace.NamespaceService namespaceService) setFilteredFields.voidsetFilteredLists(Set<String> filteredLists) Setter for the fieldfilteredLists.voidsetFilteredProperties(Set<org.alfresco.service.namespace.QName> filteredProperties) Setter for the fieldfilteredProperties.voidsetJsonParams(org.json.JSONObject jsonParams) Setter for the fieldjsonParams.booleanshouldExtractField(org.alfresco.service.namespace.QName field) shouldExtractField.booleanshouldExtractList(String listName) shouldExtractList.
-
Field Details
-
PARAM_APPEND_CODE
ConstantPARAM_APPEND_CODE="appendCode"- See Also:
-
PARAM_APPEND_ERP_CODE
ConstantPARAM_APPEND_ERP_CODE="appendErpCode"- See Also:
-
PARAM_APPEND_MLTEXT_CONSTRAINT
ConstantPARAM_APPEND_MLTEXT_CONSTRAINT="appendMlTextConstraint"- See Also:
-
PARAM_APPEND_NODEREF
ConstantPARAM_APPEND_NODEREF="appendNodeRef"- See Also:
-
PARAM_UPDATE_ENTITY_NODEREFS
ConstantPARAM_UPDATE_ENTITY_NODEREFS="updateEntityNodeRefs"- See Also:
-
PARAM_REPLACE_HISTORY_NODEREFS
ConstantPARAM_REPLACE_HISTORY_NODEREFS="replaceHistoryNodeRefs"- See Also:
-
PARAM_APPEND_CONTENT
ConstantPARAM_APPEND_CONTENT="appendContent"- See Also:
-
PARAM_APPEND_PARENT
ConstantPARAM_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
ConstantPARAM_IS_INITIAL_VERSION="isInitialVersion"- See Also:
-
PARAM_REPLACE_EXISTING_LISTS
ConstantPARAM_REPLACE_EXISTING_LISTS="replaceExistingLists"- See Also:
-
PARAM_DATALISTS_TO_REPLACE
ConstantPARAM_DATALISTS_TO_REPLACE="dataListsToReplace"- See Also:
-
PARAM_FAIL_ON_ASSOC_NOT_FOUND
ConstantPARAM_FAIL_ON_ASSOC_NOT_FOUND="failOnAssociationNotFound"- See Also:
-
PARAM_IGNORE_PATH_FOR_SEARCH
ConstantPARAM_IGNORE_PATH_FOR_SEARCH="ignorePathOnSearch"- See Also:
-
PARAM_APPEND_MLTEXT
ConstantPARAM_APPEND_MLTEXT="appendMlText"- See Also:
-
PARAM_APPEND_NESTED_DATALIST_TYPE
ConstantPARAM_APPEND_NESTED_DATALIST_TYPE="appendNestedDataListType"- See Also:
-
PARAM_APPEND_REPORT_PROPS
ConstantPARAM_APPEND_REPORT_PROPS="appendReportProps"- See Also:
-
format
-
jsonParams
private org.json.JSONObject jsonParams -
appendParent
private boolean appendParent -
filteredProperties
-
ignoredFields
-
filteredLists
-
filteredAssocProperties
-
-
Constructor Details
-
RemoteParams
Constructor for RemoteParams.
- Parameters:
format- aRemoteEntityFormatobject
-
-
Method Details
-
getFormat
Getter for the field
format.- Returns:
- a
RemoteEntityFormatobject
-
setJsonParams
public void setJsonParams(org.json.JSONObject jsonParams) Setter for the field
jsonParams.- Parameters:
jsonParams- aJSONObjectobject
-
isAppendParent
public boolean isAppendParent()isAppendParent.
Whether the parent of a listing row should be serialized, seePARAM_APPEND_PARENT. Defaults tofalseso 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
Mapobject
-
getJsonParams
public org.json.JSONObject getJsonParams()Getter for the field
jsonParams.- Returns:
- a
JSONObjectobject
-
getFilteredProperties
Getter for the field
filteredProperties.- Returns:
- a
Setobject
-
getIgnoredFields
Getter for the field
ignoredFields.- Returns:
- a
Setobject
-
getFilteredLists
Getter for the field
filteredLists.- Returns:
- a
Setobject
-
setFilteredProperties
Setter for the field
filteredProperties.- Parameters:
filteredProperties- aSetobject
-
setFilteredLists
Setter for the field
filteredLists.- Parameters:
filteredLists- aSetobject
-
setFilteredAssocProperties
public void setFilteredAssocProperties(Map<org.alfresco.service.namespace.QName, Set<org.alfresco.service.namespace.QName>> filteredAssocProperties) Setter for the field
filteredAssocProperties.- Parameters:
filteredAssocProperties- aMapobject
-
setFilteredFields
public void setFilteredFields(Set<String> fields, org.alfresco.service.namespace.NamespaceService namespaceService) setFilteredFields.
- Parameters:
fields- aListobject.namespaceService- aNamespaceServiceobject
-
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: anassoc|propertyrequest 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, ornullfor the node itselfpropQName- the raw property QName- Returns:
- true when the property is certainly not wanted
-
requiresAssociations
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
isValidQNameString.
- Parameters:
qName- aStringobject.- Returns:
- a boolean.
-
extractParams
extractParams.
- Type Parameters:
T- a T class- Parameters:
paramKey- aStringobjectdefaultValue- a T object- Returns:
- a T object
- Throws:
org.json.JSONException- if any.
-
shouldExtractList
shouldExtractList.
- Parameters:
listName- aStringobject- Returns:
- a boolean
-
shouldExtractField
public boolean shouldExtractField(org.alfresco.service.namespace.QName field) shouldExtractField.
- Parameters:
field- aQNameobject- Returns:
- a boolean
-