Class PackageBean
- java.lang.Object
-
- com.composum.sling.core.AbstractSlingBean
-
- com.composum.sling.nodes.console.ConsoleSlingBean
-
- com.composum.sling.core.pckgmgr.regpckg.view.PackageBean
-
- All Implemented Interfaces:
com.composum.sling.core.bean.RestrictedBean,PackageView,com.composum.sling.core.SlingBean,AutoCloseable,Comparable<PackageBean>
public class PackageBean extends com.composum.sling.nodes.console.ConsoleSlingBean implements PackageView, Comparable<PackageBean>, AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description protected VersionBeancurrentVersionstatic StringRESOURCE_TYPEprotected Map<String,VersionBean>versionSet
-
Constructor Summary
Constructors Constructor Description PackageBean()PackageBean(com.composum.sling.core.BeanContext context, String path)PackageBean(com.composum.sling.core.BeanContext context, String namespace, org.apache.jackrabbit.vault.packaging.PackageId packageId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intcompareTo(PackageBean other)Collection<VersionBean>getAllVersions()All versions of the package that are currently in the registry.StringgetCssClasses()VersionBeangetCurrentVersion()StringgetDownloadUrl()StringgetGroup()StringgetName()StringgetNamespace()Collection<VersionBean>getObsoleteVersions()A list of package versions that are obsolete because older than the current version.org.apache.jackrabbit.vault.packaging.PackageIdgetPackageId()StringgetUrl()StringgetVersion()voidinitialize(com.composum.sling.core.BeanContext context)booleanisClosed()booleanisHasAlternativeVersions()True iff there is more than one version of the package present.booleanisInstalled()booleanisValid()voidload(com.composum.sling.core.BeanContext context)-
Methods inherited from class com.composum.sling.core.AbstractSlingBean
executeQuery, findBeans, findNodes, findNodes, findPathList, getContentResource, getDomId, getHasTitle, getId, getInherited, getInherited, getNode, getParent, getParent, getPath, getPermissible, getProperty, getProperty, getQueryManager, getRequest, getResolver, getResource, getResponse, getServiceKey, getSession, getSling, getStringId, getTitle, getType, getUsername, isPermissible, isReadAllowed, isWriteAllowed, toString, toString
-
-
-
-
Field Detail
-
RESOURCE_TYPE
public static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
currentVersion
protected VersionBean currentVersion
-
versionSet
protected final Map<String,VersionBean> versionSet
-
-
Method Detail
-
initialize
public void initialize(com.composum.sling.core.BeanContext context)
- Specified by:
initializein interfacecom.composum.sling.core.SlingBean- Overrides:
initializein classcom.composum.sling.core.AbstractSlingBean
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getNamespace
public String getNamespace()
- Specified by:
getNamespacein interfacePackageView
-
getPackageId
public org.apache.jackrabbit.vault.packaging.PackageId getPackageId()
- Specified by:
getPackageIdin interfacePackageView
-
getGroup
public String getGroup()
- Specified by:
getGroupin interfacePackageView
-
getName
public String getName()
- Specified by:
getNamein interfacePackageView- Specified by:
getNamein interfacecom.composum.sling.core.SlingBean- Overrides:
getNamein classcom.composum.sling.core.AbstractSlingBean
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfacePackageView
-
getCurrentVersion
public VersionBean getCurrentVersion()
-
isValid
public boolean isValid()
- Specified by:
isValidin interfacePackageView
-
isInstalled
public boolean isInstalled()
- Specified by:
isInstalledin interfacePackageView
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfacePackageView
-
load
public void load(com.composum.sling.core.BeanContext context) throws IOException- Throws:
IOException
-
compareTo
public int compareTo(PackageBean other)
- Specified by:
compareToin interfaceComparable<PackageBean>
-
getCssClasses
public String getCssClasses()
-
getDownloadUrl
public String getDownloadUrl()
-
getUrl
public String getUrl()
- Overrides:
getUrlin classcom.composum.sling.core.AbstractSlingBean
-
getAllVersions
public Collection<VersionBean> getAllVersions()
All versions of the package that are currently in the registry.
-
getObsoleteVersions
public Collection<VersionBean> getObsoleteVersions()
A list of package versions that are obsolete because older than the current version.
-
isHasAlternativeVersions
public boolean isHasAlternativeVersions()
True iff there is more than one version of the package present.
-
-