Interface JcrPackageDefinition


  • @ProviderType
    public interface JcrPackageDefinition
    Specifies the interface of a package definition stored in the repository.
    • Method Detail

      • getNode

        @Nonnull
        Node getNode()
        Returns the underlying node
        Returns:
        the node
      • setId

        void setId​(@Nonnull
                   PackageId id,
                   boolean autoSave)
        Writes the properties derived from the package id to the content
        Parameters:
        id - the package id
        autoSave - if true the changes are saved automatically.
        Since:
        2.2
      • isUnwrapped

        boolean isUnwrapped()
        Checks if this definition is unwrapped, i.e. if the definition structured was extracted from a VaultPackage.
        Returns:
        true if unwrapped.
      • isModified

        boolean isModified()
        Checks if the definition was modified since it was last wrapped. new packages are considered modified.
        Returns:
        true if modified
      • getDependencies

        @Nonnull
        Dependency[] getDependencies()
        Returns the dependencies stored in this definition
        Returns:
        the dependencies
      • setDependencies

        void setDependencies​(@Nonnull
                             Dependency[] dependencies,
                             boolean autoSave)
        Sets the dependencies to this definition and stores it in a node representation.
        Parameters:
        dependencies - the package dependencies
        autoSave - if true the modifications are saved automatically.
        Since:
        3.1.32
      • get

        @CheckForNull
        String get​(@Nonnull
                   String name)
        Generic method to retrieve a string property of this definition.
        Parameters:
        name - the name of the property.
        Returns:
        the property value or null if it does not exist.
      • getBoolean

        boolean getBoolean​(@Nonnull
                           String name)
        Generic method to retrieve a boolean property of this definition.
        Parameters:
        name - the name of the property.
        Returns:
        the property value or null if it does not exist.
      • getCalendar

        @CheckForNull
        Calendar getCalendar​(@Nonnull
                             String name)
        Generic method to retrieve a date property of this definition.
        Parameters:
        name - the name of the property.
        Returns:
        the property value or null if it does not exist.
      • set

        void set​(@Nonnull
                 String name,
                 @Nullable
                 String value,
                 boolean autoSave)
        Generic method to set a string property to this definition.
        Parameters:
        name - the name of the property
        value - the value or null to clear the property
        autoSave - if true the modifications are saved automatically.
      • set

        void set​(@Nonnull
                 String name,
                 @Nullable
                 Calendar value,
                 boolean autoSave)
        Generic method to set a date property to this definition.
        Parameters:
        name - the name of the property
        value - the value or null to clear the property
        autoSave - if true the modifications are saved automatically.
      • set

        void set​(@Nonnull
                 String name,
                 boolean value,
                 boolean autoSave)
        Generic method to set a boolean property to this definition.
        Parameters:
        name - the name of the property
        value - the value
        autoSave - if true the modifications are saved automatically.
      • touch

        void touch​(@Nullable
                   Calendar now,
                   boolean autoSave)
        Touches the last modified and last modified by property.
        Parameters:
        now - calendar or null
        autoSave - if true the modifications are saved automatically.
      • setFilter

        void setFilter​(@Nullable
                       WorkspaceFilter filter,
                       boolean autoSave)
        Sets the filter to this definition and stores it in a node representation.
        Parameters:
        filter - the filter to set
        autoSave - if true the modifications are saved automatically.
      • getLastModified

        @CheckForNull
        Calendar getLastModified()
        Returns the last modified date
        Returns:
        the last modified date
      • getLastModifiedBy

        @CheckForNull
        String getLastModifiedBy()
        Returns the last modified user id
        Returns:
        the last modified user id
      • getCreatedBy

        @CheckForNull
        String getCreatedBy()
        Returns the creator user id
        Returns:
        the creator
      • getLastWrapped

        @CheckForNull
        Calendar getLastWrapped()
        Returns the last wrapped date
        Returns:
        the last wrapped date
        Since:
        2.2.22
      • getLastWrappedBy

        @CheckForNull
        String getLastWrappedBy()
        Returns the wrapper user id
        Returns:
        the wrapper
        Since:
        2.2.22
      • getLastUnwrapped

        @CheckForNull
        Calendar getLastUnwrapped()
        Returns the last unwrapped date
        Returns:
        the last unwrapped date
      • getLastUnwrappedBy

        @CheckForNull
        String getLastUnwrappedBy()
        Returns the last unwrapped user id
        Returns:
        the last unwrapped user id
      • getLastUnpacked

        @CheckForNull
        Calendar getLastUnpacked()
        Returns the date when the package was unpacked
        Returns:
        the unpacked date
      • getLastUnpackedBy

        @CheckForNull
        String getLastUnpackedBy()
        Returns the user id who unpacked the package
        Returns:
        the unpacked user id
      • requiresRoot

        @Deprecated
        boolean requiresRoot()
        Deprecated.
        Returns true if this package needs a admin user to install it.
        Returns:
        the "requires root" flag
      • requiresRestart

        boolean requiresRestart()
        Returns true if this package needs restart after installation.
        Returns:
        the "requires restart" flag.
      • getAccessControlHandling

        @CheckForNull
        AccessControlHandling getAccessControlHandling()
        Returns the access control handling defined in the definition, or null if not defined.
        Returns:
        the access control handling or null
        Since:
        2.3.2
      • getDescription

        @CheckForNull
        String getDescription()
        Returns the description of this package
        Returns:
        the description
      • getBuildCount

        long getBuildCount()
        Returns the build count of this package
        Returns:
        the build count.