Interface PackageManager


public interface PackageManager
The PackageManager interface is the main interface of the corporate content (package pool) service.

To get an instance of this package manager service use:
PackageManager packageManager = ServicesBroker.getService(PackageManager.class);

Since:
3.1.158
  • Field Details

  • Method Details

    • createContentPackage

      ContentPackage createContentPackage(String name, Project project)
      Creates a new content package with the given name and the given project as master project.
      Parameters:
      name - the name for the new package
      project - the master project of the package
      Returns:
      ContentPackage the new content package
      Since:
      3.1.158
    • createTemplatePackage

      TemplatePackage createTemplatePackage(String name, Project project)
      Creates a new template package with the given name and the given project as master project.
      Parameters:
      name - the name for the new package
      project - the master project of the package
      Returns:
      ContentPackage the new content package
      Since:
      3.1.158
    • createPublishGroup

      PublishGroup createPublishGroup(String name, String description)
      Creates a new publish group with the given name and the given description.
      Parameters:
      name - the name for the new publish group
      description - the description for the new publish group
      Returns:
      PublishGroup the new publish group
      Since:
      3.1.158
    • getPublishGroups

      Collection<PublishGroup> getPublishGroups()
      Returns a read-only list of PublishGroup's which are defined on this server.
      Returns:
      read-only list of PublishGroup's
      Since:
      3.1.158
    • getDefaultPublishGroup

      PublishGroup getDefaultPublishGroup()
      Returns the default publish group. This group is set by default as publish group for a new subscription.
      Returns:
      PublishGroup the default publish group
      Since:
      3.1.158
    • setDefaultPublishGroup

      void setDefaultPublishGroup(PublishGroup publishGroup)
      Sets the default publish group. There could be only one publish group on the server. This is managed automatically by the server.
      Parameters:
      publishGroup - the publish group to set as default
      Since:
      3.1.158
    • getPackages

      Collection<Package> getPackages()
      Returns a read-only list of all Package's existing on the server.
      Returns:
      read-only list of Package's
      Since:
      3.1.158
    • getPackages

      Collection<Package> getPackages(int packageType)
      Returns a read-only list of all existing Package's of the given package type.
      Parameters:
      packageType - Package.CONTENT_PACKAGE, Package.TEMPLATE_PACKAGE
      Returns:
      read-only list of Package's
      Since:
      3.1.158
    • getPackages

      Collection<Package> getPackages(Project masterProject)
      Returns a read-only list of all existing Package's for which the given project is master project
      Parameters:
      masterProject -
      Returns:
      read-only list of Package's
      Since:
      3.1.158
    • getPackageByName

      @Nullable @Nullable Package getPackageByName(String packageName)
      Returns the Package specified by the given name or null if no package exists with the given name.
      Parameters:
      packageName - the name of the package
      Returns:
      Package the package specified by the given name or null
      Since:
      3.1.158
    • getSubscriptions

      Collection<Subscription> getSubscriptions()
      Returns a read-only list of all Subscription's existing on this server.
      Returns:
      read-only list of Subscription's
      Since:
      3.1.158
    • getSubscription

      @Nullable @Nullable Subscription getSubscription(Package pck, Project project)
      Returns the subscription instance for the given package and project, or null if there is no subscription of this package in the provided project.
      Returns:
      subscription instance for the given package and project, or null if there is no subscription of this package in the provided project.
      Since:
      5.2.13
    • getSubscriptions

      Collection<Subscription> getSubscriptions(Package pck)
      Returns a read-only list of all Subscription's which subscribe the given package.
      Parameters:
      pck - the package to get subscriptions for
      Returns:
      read-only list of Subscription's
      Since:
      3.1.158
    • getSubscriptions

      Collection<Subscription> getSubscriptions(Filter<Subscription> filter)
      Returns a read-only collection of all Subscription's which matches the given filter.
      Parameters:
      filter - Filter to be passed. If null, accepts all elements.
      Since:
      4.1.10
    • getAvailableCustomScriptNames

      @Deprecated Collection<String> getAvailableCustomScriptNames()
      Deprecated.
      since 5.0.39 - no replacement
    • getLogfiles

      List<PackageImportLogfile> getLogfiles(Subscription subscription)
      Returns a list of all import logfiles existing for the given subscription.
      Since:
      4.2.34
    • getLogFiles

      List<PackageVersionLogfile> getLogFiles(PackageVersion version)
      Returns a list of package version log files created during package version create of the package version specified by the given package version.
      The list is sorted in descending order based on the logfile number.
      Normally the returned list will only contain one entry. Only in case of errors during package version creation multiple log files were created.
      Parameters:
      version - the package version to get the log files for
      Since:
      4.2.34
    • refresh

      void refresh()
      Refreshes this manager instance (e.g. reset caches).
      Since:
      5.0.36