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 VersionBean
currentVersion
static String
RESOURCE_TYPE
protected 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 void
close()
int
compareTo(PackageBean other)
Collection<VersionBean>
getAllVersions()
All versions of the package that are currently in the registry.String
getCssClasses()
VersionBean
getCurrentVersion()
String
getDownloadUrl()
String
getGroup()
String
getName()
String
getNamespace()
Collection<VersionBean>
getObsoleteVersions()
A list of package versions that are obsolete because older than the current version.org.apache.jackrabbit.vault.packaging.PackageId
getPackageId()
String
getUrl()
String
getVersion()
void
initialize(com.composum.sling.core.BeanContext context)
boolean
isClosed()
boolean
isHasAlternativeVersions()
True iff there is more than one version of the package present.boolean
isInstalled()
boolean
isValid()
void
load(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:
initialize
in interfacecom.composum.sling.core.SlingBean
- Overrides:
initialize
in classcom.composum.sling.core.AbstractSlingBean
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interfacePackageView
-
getPackageId
public org.apache.jackrabbit.vault.packaging.PackageId getPackageId()
- Specified by:
getPackageId
in interfacePackageView
-
getGroup
public String getGroup()
- Specified by:
getGroup
in interfacePackageView
-
getName
public String getName()
- Specified by:
getName
in interfacePackageView
- Specified by:
getName
in interfacecom.composum.sling.core.SlingBean
- Overrides:
getName
in classcom.composum.sling.core.AbstractSlingBean
-
getVersion
public String getVersion()
- Specified by:
getVersion
in interfacePackageView
-
getCurrentVersion
public VersionBean getCurrentVersion()
-
isValid
public boolean isValid()
- Specified by:
isValid
in interfacePackageView
-
isInstalled
public boolean isInstalled()
- Specified by:
isInstalled
in interfacePackageView
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfacePackageView
-
load
public void load(com.composum.sling.core.BeanContext context) throws IOException
- Throws:
IOException
-
compareTo
public int compareTo(PackageBean other)
- Specified by:
compareTo
in interfaceComparable<PackageBean>
-
getCssClasses
public String getCssClasses()
-
getDownloadUrl
public String getDownloadUrl()
-
getUrl
public String getUrl()
- Overrides:
getUrl
in 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.
-
-