Interface ITextResourceManagementService

  • All Known Subinterfaces:
    ICustomUIService, IResourceService<MetadataBean,​CollectionContentBean,​ResourceData,​ContentBean,​PermissionBean,​VersionsBean,​ResourceTreeEntryBean,​ContentDownloadBean,​PropertiesBean>

    public interface ITextResourceManagementService
    This provides an interface to manage text resources.
    • Method Detail

      • getTextContent

        String getTextContent​(String path)
                       throws Exception
        Method to obtain the text content of the given resource. For this method to work the resource must be a text-resource.
        Parameters:
        path - the resource path.
        Returns:
        the text content of the resource as a String.
        Throws:
        Exception - if the operation failed.
      • updateTextContent

        boolean updateTextContent​(String path,
                                  String content)
                           throws Exception
        Method to update the text content of the given resource. For this method to work the resource must be a text-resource.
        Parameters:
        path - the resource path.
        content - the updated text content.
        Returns:
        whether the operation was successful or not.
        Throws:
        Exception - if the operation failed due to an unexpected error.
      • addTextContent

        boolean addTextContent​(String parentPath,
                               String resourceName,
                               String mediaType,
                               String description,
                               String content)
                        throws Exception
        Method to add a text resource to the repository.
        Parameters:
        parentPath - the parent path (or the path at which we are adding this resource).
        resourceName - the name of the resource.
        mediaType - the media type of the resource.
        description - the description for the newly added resource.
        content - the resource content as a String.
        Returns:
        whether the operation was successful or not.
        Throws:
        Exception - if the operation failed due to an unexpected error.