Package org.alfresco.rest.requests
Class CascadingDictionaries
java.lang.Object
org.alfresco.rest.requests.ModelRequest<CascadingDictionaries>
org.alfresco.rest.requests.CascadingDictionaries
Declares all Rest API under the /cascading-dictionaries path
-
Field Summary
Fields inherited from class org.alfresco.rest.requests.ModelRequest
restWrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCascadingDictionaryContent(String aspectId, String contentJson) Adds content (data + level definitions) to a cascading dictionary, creating a new version.createCascadingDictionary(String name, String aspect, String keyProperty, String versionProperty) Creates a new cascading dictionary definition.voiddeleteCascadingDictionary(String aspectId) Deletes a cascading dictionary definition by its aspect prefixed name.Lists all registered cascading dictionaries.getCascadingDictionary(String aspectId) Retrieves a single cascading dictionary by its aspect prefixed name.getCascadingDictionaryVersion(String aspectId, String version) Retrieves a specific version of a cascading dictionary.updateCascadingDictionary(String aspectId, String newName) Updates the header (name) of an existing cascading dictionary.Methods inherited from class org.alfresco.rest.requests.ModelRequest
include, includePath, usingParams
-
Constructor Details
-
CascadingDictionaries
-
-
Method Details
-
getCascadingDictionaries
Lists all registered cascading dictionaries.GET /cascading-dictionaries- Returns:
- paged collection of
RestCDModel - Throws:
JsonToModelConversionException- if the response cannot be deserialized
-
getCascadingDictionary
Retrieves a single cascading dictionary by its aspect prefixed name.GET /cascading-dictionaries/{aspectId}- Parameters:
aspectId- the prefixed aspect name (e.g."custom:myAspect")- Returns:
- the
RestCDModelfor the given aspect - Throws:
JsonToModelConversionException- if the response cannot be deserialized
-
getCascadingDictionaryVersion
public RestCDModel getCascadingDictionaryVersion(String aspectId, String version) throws JsonToModelConversionException Retrieves a specific version of a cascading dictionary.GET /cascading-dictionaries/{aspectId}/versions/{version}- Parameters:
aspectId- the prefixed aspect name (e.g."cdict:account")version- the version string (e.g."1.0")- Returns:
- the
RestCDModelfor the given aspect and version - Throws:
JsonToModelConversionException- if the response cannot be deserialized
-
createCascadingDictionary
public RestCDModel createCascadingDictionary(String name, String aspect, String keyProperty, String versionProperty) throws JsonToModelConversionException Creates a new cascading dictionary definition.POST /cascading-dictionaries- Parameters:
name- human-readable name for the dictionary (e.g."Department")aspect- the prefixed aspect name that must already exist in the content model (e.g."cdict:department")keyProperty- the prefixed property name used as the lookup key (e.g."cdict:departmentId")versionProperty- the prefixed property name holding the dictionary version (e.g."cdict:departmentDictVersion")- Returns:
- the created
RestCDModel - Throws:
JsonToModelConversionException- if the response cannot be deserialized
-
addCascadingDictionaryContent
public RestCDModel addCascadingDictionaryContent(String aspectId, String contentJson) throws JsonToModelConversionException Adds content (data + level definitions) to a cascading dictionary, creating a new version. UseusingParams("majorVersion=true")before calling to produce version1.0; the default produces a minor version (e.g.0.1).POST /cascading-dictionaries/{aspectId}/content- Parameters:
aspectId- the prefixed aspect name (e.g."cdict:department")contentJson- the JSON body withdefinition(levels) anddata(entries)- Returns:
- the
RestCDModelfor the resulting dictionary version - Throws:
JsonToModelConversionException- if the response cannot be deserialized
-
updateCascadingDictionary
public RestCDModel updateCascadingDictionary(String aspectId, String newName) throws JsonToModelConversionException Updates the header (name) of an existing cascading dictionary.PUT /cascading-dictionaries/{aspectId}- Parameters:
aspectId- the prefixed aspect name (e.g."cdict:department")newName- the new human-readable name for the dictionary- Returns:
- the updated
RestCDModel - Throws:
JsonToModelConversionException- if the response cannot be deserialized
-
deleteCascadingDictionary
Deletes a cascading dictionary definition by its aspect prefixed name.DELETE /cascading-dictionaries/{aspectId}- Parameters:
aspectId- the prefixed aspect name (e.g."cdict:department")
-