Class VersionBean

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

    public class VersionBean
    extends com.composum.sling.nodes.console.ConsoleSlingBean
    implements PackageView, AutoCloseable
    • Field Detail

      • BY_GROUP_AND_NAME_COMPARATOR

        protected static final Comparator<org.apache.jackrabbit.vault.packaging.PackageId> BY_GROUP_AND_NAME_COMPARATOR
      • PACKAGE_ID_COMPARATOR

        protected static final Comparator<org.apache.jackrabbit.vault.packaging.PackageId> PACKAGE_ID_COMPARATOR
      • namespace

        protected String namespace
      • packageId

        protected org.apache.jackrabbit.vault.packaging.PackageId packageId
      • loaded

        protected boolean loaded
      • regPckg

        protected transient org.apache.jackrabbit.vault.packaging.registry.RegisteredPackage regPckg
      • vltPckg

        protected transient org.apache.jackrabbit.vault.packaging.VaultPackage vltPckg
      • packageProps

        protected transient org.apache.jackrabbit.vault.packaging.PackageProperties packageProps
      • invalid

        protected transient boolean invalid
      • registryNamespace

        protected transient String registryNamespace
      • satisfiedDependencies

        protected String[] satisfiedDependencies
      • notInstalledDependencies

        protected String[] notInstalledDependencies
      • unresolvedDependencies

        protected String[] unresolvedDependencies
    • Constructor Detail

      • VersionBean

        public VersionBean()
      • VersionBean

        public VersionBean​(com.composum.sling.core.BeanContext context,
                           String path)
      • VersionBean

        public VersionBean​(com.composum.sling.core.BeanContext context,
                           String namespace,
                           org.apache.jackrabbit.vault.packaging.PackageId packageId)
    • 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

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

        protected void loadPackage()
        Performs the expensive parts of the loading process (that need actually opening the package) if needed.
      • getPathWithRegistry

        public String getPathWithRegistry()
        Returns a path containing the registry namespace even in merged mode.
      • getRegistryNamespace

        public String getRegistryNamespace()
        Namespace of the registry, if the package was really found.
      • getPackageId

        public org.apache.jackrabbit.vault.packaging.PackageId getPackageId()
        Specified by:
        getPackageId in interface PackageView
      • getName

        public String getName()
        Specified by:
        getName in interface PackageView
        Specified by:
        getName in interface com.composum.sling.core.SlingBean
        Overrides:
        getName in class com.composum.sling.core.AbstractSlingBean
      • getDescription

        public String getDescription()
      • getCssClasses

        public String getCssClasses()
      • getFilename

        public String getFilename()
      • getDownloadUrl

        public String getDownloadUrl()
      • getFilterList

        public List<org.apache.jackrabbit.vault.fs.api.PathFilterSet> getFilterList()
      • getAuditLogUrl

        public String getAuditLogUrl()
      • getInstallationTime

        public String getInstallationTime()
      • getCreated

        public String getCreated()
      • getCreatedBy

        public String getCreatedBy()
      • getLastModified

        public String getLastModified()
      • getLastModifiedBy

        public String getLastModifiedBy()
      • getLastWrapped

        public String getLastWrapped()
      • getLastWrappedBy

        public String getLastWrappedBy()
      • getAcHandling

        public String getAcHandling()
      • getAcHandlingLabel

        public String getAcHandlingLabel()
      • getRequiresRestart

        public boolean getRequiresRestart()
      • getRequiresRoot

        public boolean getRequiresRoot()
      • getProviderName

        public String getProviderName()
      • getProviderUrl

        public String getProviderUrl()
      • getProviderLink

        public String getProviderLink()
      • getDependencies

        public String[] getDependencies()
      • calculateDependencies

        protected void calculateDependencies()
      • getSatisfiedDependencies

        public String[] getSatisfiedDependencies()
      • getNotInstalledDependencies

        public String[] getNotInstalledDependencies()
      • getUnresolvedDependencies

        public String[] getUnresolvedDependencies()
      • getReplaces

        public String[] getReplaces()
      • getUsages

        public String[] getUsages()
      • format

        protected String format​(Calendar rawDate,
                                String dateRep)
        Formats a date, including a workaround for
        • getUrl

          public String getUrl()
          Overrides:
          getUrl in class com.composum.sling.core.AbstractSlingBean
        • obsoletes

          public boolean obsoletes​(VersionBean other)
          True if this obsoletes the other version - that is, it has same group and name but a newer version.