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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateContentPackage
(String name, Project project) Creates a new content package with the given name and the given project as master project.createPublishGroup
(String name, String description) Creates a new publish group with the given name and the given description.createTemplatePackage
(String name, Project project) Creates a new template package with the given name and the given project as master project.Deprecated.since 5.0.39 - no replacementReturns the default publish group.getLogfiles
(Subscription subscription) Returns a list of allimport logfiles
existing for the given subscription.getLogFiles
(PackageVersion version) Returns a list ofpackage version log files
created during package version create of thepackage version
specified by the givenpackage version
.
The list is sorted in descending order based on the logfilenumber
.
Normally the returned list will only contain one entry.@Nullable Package
getPackageByName
(String packageName) Returns thePackage
specified by the given name ornull
if no package exists with the given name.Returns a read-only list of allPackage
's existing on the server.getPackages
(int packageType) Returns a read-only list of all existingPackage
's of the given package type.getPackages
(Project masterProject) Returns a read-only list of all existingPackage
's for which the given project is master projectReturns a read-only list ofPublishGroup
's which are defined on this server.@Nullable Subscription
getSubscription
(Package pck, Project project) Returns the subscription instance for the given package and project, ornull
if there is no subscription of this package in the provided project.Returns a read-only list of allSubscription
's existing on this server.getSubscriptions
(Filter<Subscription> filter) Returns a read-only collection of allSubscription
's which matches the given filter.getSubscriptions
(Package pck) Returns a read-only list of allSubscription
's which subscribe the given package.void
refresh()
Refreshes this manager instance (e.g. reset caches).void
setDefaultPublishGroup
(PublishGroup publishGroup) Sets the default publish group.
-
Field Details
-
SERVICE_NAME
Name of this service. Use this field to request an instance of this service by its name.- Since:
- 3.1.158
- See Also:
-
-
Method Details
-
createContentPackage
Creates a new content package with the given name and the given project as master project.- Parameters:
name
- the name for the new packageproject
- the master project of the package- Returns:
- ContentPackage the new content package
- Since:
- 3.1.158
-
createTemplatePackage
Creates a new template package with the given name and the given project as master project.- Parameters:
name
- the name for the new packageproject
- the master project of the package- Returns:
- ContentPackage the new content package
- Since:
- 3.1.158
-
createPublishGroup
Creates a new publish group with the given name and the given description.- Parameters:
name
- the name for the new publish groupdescription
- 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 ofPublishGroup
'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
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 allPackage
's existing on the server.- Returns:
- read-only list of
Package
's - Since:
- 3.1.158
-
getPackages
Returns a read-only list of all existingPackage
'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
Returns a read-only list of all existingPackage
's for which the given project is master project- Parameters:
masterProject
-- Returns:
- read-only list of
Package
's - Since:
- 3.1.158
-
getPackageByName
Returns thePackage
specified by the given name ornull
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 allSubscription
's existing on this server.- Returns:
- read-only list of
Subscription
's - Since:
- 3.1.158
-
getSubscription
Returns the subscription instance for the given package and project, ornull
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
Returns a read-only list of allSubscription
'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
Returns a read-only collection of allSubscription
's which matches the given filter.- Parameters:
filter
- Filter to be passed. Ifnull
, accepts all elements.- Since:
- 4.1.10
-
getAvailableCustomScriptNames
Deprecated.since 5.0.39 - no replacement -
getLogfiles
Returns a list of allimport logfiles
existing for the given subscription.- Since:
- 4.2.34
-
getLogFiles
Returns a list ofpackage version log files
created during package version create of thepackage version
specified by the givenpackage version
.
The list is sorted in descending order based on the logfilenumber
.
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
- thepackage 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
-