Interface CustomModels

  • All Known Implementing Classes:
    CustomModelsImpl

    public interface CustomModels
    Author:
    Jamal Kaabi-Mofrad
    • Method Detail

      • getCustomModel

        CustomModel getCustomModel​(String modelName,
                                   Parameters parameters)
        Gets the org.alfresco.rest.api.model.CustomModel representation for the given model
        Parameters:
        modelName - the model name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomModel object
      • getCustomModels

        CollectionWithPagingInfo<CustomModel> getCustomModels​(Parameters parameters)
        Gets a paged list of all custom models
        Parameters:
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        a paged list of org.alfresco.rest.api.model.CustomModel objects
      • createCustomModel

        CustomModel createCustomModel​(CustomModel model)
        Creates custom model
        Parameters:
        model - the custom model to create
        Returns:
        org.alfresco.rest.api.model.CustomModel object
      • createCustomModel

        CustomModel createCustomModel​(org.alfresco.repo.dictionary.M2Model m2Model)
        Creates custom model from the imported M2Model.
        Parameters:
        m2Model - the model
        Returns:
        org.alfresco.rest.api.model.CustomModel object
      • updateCustomModel

        CustomModel updateCustomModel​(String modelName,
                                      CustomModel model,
                                      Parameters parameters)
        Updates or activates/deactivates the custom model
        Parameters:
        modelName - the model name
        model - the custom model to update (JSON payload)
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomModel object
      • deleteCustomModel

        void deleteCustomModel​(String modelName)
        Deletes the custom model
        Parameters:
        modelName - the model name
      • getCustomType

        CustomType getCustomType​(String modelName,
                                 String typeName,
                                 Parameters parameters)
        Gets the org.alfresco.rest.api.model.CustomType representation of the given model's type
        Parameters:
        modelName - the model name
        typeName - the model's type name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomType object
      • getCustomTypes

        CollectionWithPagingInfo<CustomType> getCustomTypes​(String modelName,
                                                            Parameters parameters)
        Gets a paged list of all the given custom model's types
        Parameters:
        modelName - the model name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        a paged list of org.alfresco.rest.api.model.CustomType objects
      • createCustomType

        CustomType createCustomType​(String modelName,
                                    CustomType type)
        Creates custom model's type
        Parameters:
        modelName - the model name
        type - the custom type to create within the given model
        Returns:
        org.alfresco.rest.api.model.CustomType object
      • updateCustomType

        CustomType updateCustomType​(String modelName,
                                    CustomType type,
                                    Parameters parameters)
        Updates the custom model's type
        Parameters:
        modelName - the model name
        type - the custom model's type to update (JSON payload)
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomType object
      • deleteCustomType

        void deleteCustomType​(String modelName,
                              String typeName)
        Deletes the custom model's type
        Parameters:
        modelName - the model name
        typeName - the model's type name
      • getCustomAspect

        CustomAspect getCustomAspect​(String modelName,
                                     String aspectName,
                                     Parameters parameters)
        Gets the org.alfresco.rest.api.model.CustomAspect representation of the given model's aspect
        Parameters:
        modelName - the model name
        aspectName - the model's aspect name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomAspect object
      • getCustomAspects

        CollectionWithPagingInfo<CustomAspect> getCustomAspects​(String modelName,
                                                                Parameters parameters)
        Gets a paged list of all the given custom model's aspects
        Parameters:
        modelName - the model name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        a paged list of org.alfresco.rest.api.model.CustomAspect objects
      • createCustomAspect

        CustomAspect createCustomAspect​(String modelName,
                                        CustomAspect aspect)
        Creates custom model's aspect
        Parameters:
        modelName - the model name
        aspect - the custom aspect to create within the given model
        Returns:
        org.alfresco.rest.api.model.CustomAspect object
      • updateCustomAspect

        CustomAspect updateCustomAspect​(String modelName,
                                        CustomAspect aspect,
                                        Parameters parameters)
        Updates the custom model's aspect
        Parameters:
        modelName - the model name
        aspect - the custom model's aspect to update (JSON payload)
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomAspect object
      • deleteCustomAspect

        void deleteCustomAspect​(String modelName,
                                String aspectName)
        Deletes the custom model's aspect
        Parameters:
        modelName - the model name
        aspectName - the model's aspect name
      • getCustomModelConstraint

        CustomModelConstraint getCustomModelConstraint​(String modelName,
                                                       String constraintName,
                                                       Parameters parameters)
        Gets the org.alfresco.rest.api.model.CustomModelConstraint representation of the given model's constraint
        Parameters:
        modelName - the model name
        constraintName - the model's constraint name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomModelConstraint object
      • getCustomModelConstraints

        CollectionWithPagingInfo<CustomModelConstraint> getCustomModelConstraints​(String modelName,
                                                                                  Parameters parameters)
        Gets a paged list of all of the given custom model's constraints
        Parameters:
        modelName - the model name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        a paged list of org.alfresco.rest.api.model.CustomModelConstraint objects
      • createCustomModelConstraint

        CustomModelConstraint createCustomModelConstraint​(String modelName,
                                                          CustomModelConstraint constraint)
        Creates custom model's constraint
        Parameters:
        modelName - the model name
        constraint - the custom constraint to create within the given model
        Returns:
        org.alfresco.rest.api.model.CustomModelConstraint object
      • createDownload

        CustomModelDownload createDownload​(String modelName,
                                           Parameters parameters)
        Starts the creation of a downloadable archive file containing the custom model file and its associated Share extension module file (if requested).
        Parameters:
        modelName - the model name
        parameters - the Parameters object to get the parameters passed into the request
        Returns:
        org.alfresco.rest.api.model.CustomModelDownload object containing the archive node reference