Class CascadingDictionaries

java.lang.Object
org.alfresco.rest.requests.ModelRequest<CascadingDictionaries>
org.alfresco.rest.requests.CascadingDictionaries

public class CascadingDictionaries extends ModelRequest<CascadingDictionaries>
Declares all Rest API under the /cascading-dictionaries path
  • Constructor Details

    • CascadingDictionaries

      public CascadingDictionaries(RestWrapper restWrapper)
  • Method Details

    • getCascadingDictionaries

      public RestCDModelsCollection getCascadingDictionaries() throws JsonToModelConversionException
      Lists all registered cascading dictionaries. GET /cascading-dictionaries
      Returns:
      paged collection of RestCDModel
      Throws:
      JsonToModelConversionException - if the response cannot be deserialized
    • getCascadingDictionary

      public RestCDModel getCascadingDictionary(String aspectId) throws JsonToModelConversionException
      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 RestCDModel for 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 RestCDModel for 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. Use usingParams("majorVersion=true") before calling to produce version 1.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 with definition (levels) and data (entries)
      Returns:
      the RestCDModel for 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

      public void deleteCascadingDictionary(String aspectId)
      Deletes a cascading dictionary definition by its aspect prefixed name. DELETE /cascading-dictionaries/{aspectId}
      Parameters:
      aspectId - the prefixed aspect name (e.g. "cdict:department")