Interface ContentTypeServiceInternal

All Known Implementing Classes:
ContentTypeServiceInternalImpl

public interface ContentTypeServiceInternal
  • Method Details

    • getQuickCreatableContentTypes

      List<QuickCreateItem> getQuickCreatableContentTypes(String siteId)
      Get list of content types marked as quick creatable for given site
      Parameters:
      siteId - site identifier
      Returns:
      List of quick creatable content types
    • getContentTypeUsage

      ContentTypeUsage getContentTypeUsage(String siteId, String contentType) throws ServiceLayerException
      Finds all items related to a given content-type
      Parameters:
      siteId - the id of the site
      contentType - the id of the content-type
      Returns:
      the usage
      Throws:
      ServiceLayerException - if there is any error finding the items
    • getContentTypePreviewImage

      org.apache.commons.lang3.tuple.ImmutablePair<String,org.springframework.core.io.Resource> getContentTypePreviewImage(String siteId, String contentTypeId) throws ServiceLayerException
      Finds the preview image for a given content-type
      Parameters:
      siteId - the id of the site
      contentTypeId - the id of the content-type
      Returns:
      the preview image file as a pair of path and resource
      Throws:
      ServiceLayerException - if there is any error finding the items
    • deleteContentType

      void deleteContentType(String siteId, String contentType, boolean deleteDependencies) throws ServiceLayerException, AuthenticationException, DeploymentException, UserNotFoundException
      Deletes all files related to a given content-type
      Parameters:
      siteId - the id of the site
      contentType - the id of the content-type
      deleteDependencies - indicates if all dependencies should be deleted
      Throws:
      ServiceLayerException - if there is any error deleting the files
      AuthenticationException - if there is any error authenticating the user
      DeploymentException - if there is any error publishing the changes
      UserNotFoundException
    • getContentTypeControllerPath

      String getContentTypeControllerPath(String contentTypeId)
      Builds the path of the Groovy controller for a given content type id
      Parameters:
      contentTypeId - the id of the content type
      Returns:
      the path of the controller or null
    • getContentTypeTemplatePath

      String getContentTypeTemplatePath(String siteId, String contentTypeId) throws ServiceLayerException
      Extracts the path of the Freemarker template for a given content type id
      Parameters:
      siteId - the id of the site
      contentTypeId - the id of the content type
      Returns:
      the path of the template or null
      Throws:
      ServiceLayerException - if there is any error reading the content type definition
    • getAllModelDefinitions

      Collection<String> getAllModelDefinitions(String site) throws ServiceLayerException
      Get all content types for the given site.
      Parameters:
      site - the id of the site
      Returns:
      a collection of content types including their config files (config.xml, form-definition.xml)
      Throws:
      ServiceLayerException - if there is any error getting the content types