Class CmsPublish


  • public class CmsPublish
    extends java.lang.Object
    ADE publishing features.

    Since:
    8.0.0
    • Constructor Detail

      • CmsPublish

        public CmsPublish​(CmsObject cms)
        Creates a new instance.

        Parameters:
        cms - the CMS context to use
      • CmsPublish

        public CmsPublish​(CmsObject cms,
                          java.util.Map<java.lang.String,​java.lang.String> params)
        Constructor with default options.

        Parameters:
        cms - the current cms context
        params - the additional publish parameters
    • Method Detail

      • getOuAwareName

        protected static java.lang.String getOuAwareName​(CmsObject cms,
                                                         java.lang.String name)
        Returns the simple name if the ou is the same as the current user's ou.

        Parameters:
        cms - the CMS context
        name - the fully qualified name to check
        Returns:
        the simple name if the ou is the same as the current user's ou
      • getBrokenResources

        public java.util.List<CmsPublishResourcegetBrokenResources​(java.util.List<CmsResource> pubResources)
        Checks for possible broken links when the given list of resources would be published.

        Parameters:
        pubResources - list of resources to be published
        Returns:
        a list of resources that would produce broken links when published
      • relationToBean

        public CmsPublishResource relationToBean​(CmsRelation relation)
        Creates a publish resource bean from the target information of a relation object.

        Parameters:
        relation - the relation to use
        Returns:
        the publish resource bean for the relation target
      • removeResourcesFromPublishList

        public void removeResourcesFromPublishList​(java.util.Collection<CmsUUID> idsToRemove)
                                            throws CmsException
        Removes the given resources from the user's publish list.

        Parameters:
        idsToRemove - list of structure ids identifying the resources to be removed
        Throws:
        CmsException - if something goes wrong