Class GroupBean
- java.lang.Object
-
- com.composum.sling.core.AbstractSlingBean
-
- com.composum.sling.nodes.console.ConsoleSlingBean
-
- com.composum.sling.core.pckgmgr.regpckg.view.GroupBean
-
- All Implemented Interfaces:
RestrictedBean
,SlingBean
public class GroupBean extends 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
AbstractSlingBean.NodeClosure
-
-
Field Summary
Fields Modifier and Type Field Description protected String
namespace
protected List<String>
packages
protected PackageRegistries.Registries
registries
-
Fields inherited from class com.composum.sling.core.AbstractSlingBean
context, queryManager, request, resolver, resource, response, session, sling
-
-
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(BeanContext context, org.apache.sling.api.resource.Resource resource)
This basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.protected void
load(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
-
-
-
-
Field Detail
-
registries
protected transient PackageRegistries.Registries registries
-
namespace
protected String namespace
-
-
Method Detail
-
initialize
public void initialize(BeanContext context, org.apache.sling.api.resource.Resource resource)
Description copied from class:AbstractSlingBean
This basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.- Specified by:
initialize
in interfaceSlingBean
- Overrides:
initialize
in classConsoleSlingBean
- Parameters:
context
- the scripting context (e.g. a JSP PageContext or a Groovy scripting context)resource
- the resource to use (normally the resource addressed by the request)- See Also:
BeanContext.withResource(Resource)
-
load
protected void load(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.
-
-