Class GroupBean

  • All Implemented Interfaces:
    com.composum.sling.core.bean.RestrictedBean, com.composum.sling.core.SlingBean

    public class GroupBean
    extends com.composum.sling.nodes.console.ConsoleSlingBean
    Model for a group of packages - packages below a path.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.composum.sling.core.AbstractSlingBean

        com.composum.sling.core.AbstractSlingBean.NodeClosure
    • Constructor Summary

      Constructors 
      Constructor Description
      GroupBean()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      List<String> getMultiVersionPackagePaths()
      Sorted collection of paths to the highest version of packages contained below this path which have several versions.
      protected String getPackagePathIfVersion​(String path, List<org.apache.jackrabbit.vault.packaging.PackageId> registeredpackage, org.apache.jackrabbit.vault.packaging.registry.PackageRegistry singleRegistry)
      If a version is selected for cleanup, we want to find the versions of it's package.
      List<String> getPackagePaths()
      Sorted collection of paths to the highest version of packages contained below this path.
      void initialize​(com.composum.sling.core.BeanContext context, org.apache.sling.api.resource.Resource resource)  
      protected void load​(com.composum.sling.core.BeanContext context)  
      protected List<String> pathsToHighestVersion​(String path, org.apache.jackrabbit.vault.packaging.registry.PackageRegistry singleRegistry, Comparator<org.apache.jackrabbit.vault.packaging.PackageId> comparator, Stream<Map.Entry<org.apache.commons.lang3.tuple.Pair<String,​String>,​List<org.apache.jackrabbit.vault.packaging.PackageId>>> versionsPackageGrouped)  
      • Methods inherited from class com.composum.sling.core.AbstractSlingBean

        executeQuery, findBeans, findNodes, findNodes, findPathList, getContentResource, getDomId, getHasTitle, getId, getInherited, getInherited, getName, getNode, getParent, getParent, getPath, getPermissible, getProperty, getProperty, getQueryManager, getRequest, getResolver, getResource, getResponse, getServiceKey, getSession, getSling, getStringId, getTitle, getType, getUrl, getUsername, initialize, isPermissible, isReadAllowed, isWriteAllowed, toString, toString
    • Constructor Detail

      • GroupBean

        public GroupBean()
    • Method Detail

      • initialize

        public void initialize​(com.composum.sling.core.BeanContext context,
                               org.apache.sling.api.resource.Resource resource)
        Specified by:
        initialize in interface com.composum.sling.core.SlingBean
        Overrides:
        initialize in class com.composum.sling.nodes.console.ConsoleSlingBean
      • load

        protected void load​(com.composum.sling.core.BeanContext context)
                     throws IOException
        Throws:
        IOException
      • getPackagePathIfVersion

        protected String getPackagePathIfVersion​(String path,
                                                 List<org.apache.jackrabbit.vault.packaging.PackageId> registeredpackage,
                                                 org.apache.jackrabbit.vault.packaging.registry.PackageRegistry singleRegistry)
        If a version is selected for cleanup, we want to find the versions of it's package.
      • pathsToHighestVersion

        protected List<String> pathsToHighestVersion​(String path,
                                                     org.apache.jackrabbit.vault.packaging.registry.PackageRegistry singleRegistry,
                                                     Comparator<org.apache.jackrabbit.vault.packaging.PackageId> comparator,
                                                     Stream<Map.Entry<org.apache.commons.lang3.tuple.Pair<String,​String>,​List<org.apache.jackrabbit.vault.packaging.PackageId>>> versionsPackageGrouped)
      • getPackagePaths

        public List<String> getPackagePaths()
        Sorted collection of paths to the highest version of packages contained below this path.
      • getMultiVersionPackagePaths

        public List<String> getMultiVersionPackagePaths()
        Sorted collection of paths to the highest version of packages contained below this path which have several versions.