public interface ContentManagerRemote
| Modifier and Type | Method and Description |
|---|---|
org.rhq.core.domain.content.PackageVersion |
createPackageVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
Integer architectureId,
byte[] packageBytes)
Creates a new package version in the system.
|
org.rhq.core.domain.content.PackageVersion |
createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
String displayVersion,
Integer architectureId,
byte[] packageBytes)
Creates a new package version in the system.
|
org.rhq.core.domain.content.PackageVersion |
createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
String displayVersion,
Integer architectureId,
String temporaryContentHandle)
Creates a new package version in the system with content denoted by the
temporaryContentHandle. |
String |
createTemporaryContentHandle()
Creates a temporary file for fragmented content upload.
|
void |
deletePackages(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] installedPackageIds,
String requestNotes)
Deletes the specified package from the resource.
|
void |
deletePackageVersion(org.rhq.core.domain.auth.Subject subject,
int packageVersionId)
Deletes the specified PackageVersion from the system.
|
void |
deployPackages(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
int[] packageVersionIds)
Deprecated.
|
void |
deployPackagesWithNote(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
int[] packageVersionIds,
String requestNotes)
Deploys packages on the specified resources.
|
List<org.rhq.core.domain.content.Architecture> |
findArchitectures(org.rhq.core.domain.auth.Subject subject)
Returns all architectures known to the system.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.InstalledPackage> |
findInstalledPackagesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.InstalledPackageCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Package> |
findPackagesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageCriteria criteria)
If the criteria object filters on repo id, the subject needs to be able to
access that repo.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageAndLatestVersionComposite> |
findPackagesWithLatestVersion(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageCriteria criteria)
Akin to
findPackagesByCriteria(Subject, PackageCriteria) but also
determines the latest version of the returned packages. |
org.rhq.core.domain.content.PackageType |
findPackageType(org.rhq.core.domain.auth.Subject subject,
Integer resourceTypeId,
String packageTypeName)
This re tries to find a package type of given name defined by the resource type provided.
|
List<org.rhq.core.domain.content.PackageType> |
findPackageTypes(org.rhq.core.domain.auth.Subject subject,
String resourceTypeName,
String pluginName)
This gets the package types that can be deployed to the given resource.
|
org.rhq.core.domain.content.composite.PackageTypeAndVersionFormatComposite |
findPackageTypeWithVersionFormat(org.rhq.core.domain.auth.Subject subject,
Integer resourceTypeId,
String packageTypeName)
Similar to
findPackageType(Subject, Integer, String) but
returns the package type along with the version format specification. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> |
findPackageVersionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageVersionCriteria criteria)
If a resourceId filter is not set via
PackageVersionCriteria.addFilterResourceId(Integer) then
this method requires InventoryManager permissions. |
org.rhq.core.domain.content.InstalledPackage |
getBackingPackageForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
For a resource that is content-backed (aka package-backed), this call will return InstalledPackage information
for the backing content (package).
|
byte[] |
getPackageBytes(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int installedPackageId)
This can be a dangerous call for large packages as the entire package will attempt to be loaded.
|
void |
uploadContentFragment(String temporaryContentHandle,
byte[] fragment,
int off,
int len)
Saves the fragment in the temporary file denoted by
temporaryContentHandle. |
org.rhq.core.domain.content.PackageVersion createPackageVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
Integer architectureId,
byte[] packageBytes)
subject - The logged in subjectpackageName - parent package name; uniquely identifies the package under which this version goespackageTypeId - identifies the type of package in case the general package needs to be createdversion - identifies the version to be createarchitectureId - architecture of the newly created package version. If null then no architecture restriction.packageBytes - org.rhq.core.domain.content.PackageVersion createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
String displayVersion,
Integer architectureId,
byte[] packageBytes)
createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject, String, int, String, String, Integer, String)
instead.subject - The logged in subjectpackageName - parent package name; uniquely identifies the package under which this version goespackageTypeId - identifies the type of package in case the general package needs to be createdversion - identifies the version to be createdisplayVersion - architectureId - architecture of the newly created package version. If null then no architecture restriction.packageBytes - void deletePackages(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] installedPackageIds,
String requestNotes)
subject - The logged in subjectresourceId - identifies the resource from which the packages should be deletedinstalledPackageIds - identifies all of the packages to be deletedrequestNotes - void deletePackageVersion(org.rhq.core.domain.auth.Subject subject,
int packageVersionId)
subject - The logged in subjectpackageVersionId - The package version to delete@Deprecated void deployPackages(org.rhq.core.domain.auth.Subject subject, int[] resourceIds, int[] packageVersionIds)
PackageVersion being installed, along with the deployment configuration values if any. This method will
take care of populating the rest of the values in each installed package object.subject - The logged in subjectresourceIds - identifies the resources against which the package will be deployedpackageVersionIds - packageVersions we want to installvoid deployPackagesWithNote(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
int[] packageVersionIds,
String requestNotes)
PackageVersion being installed, along with the deployment configuration values if any. This method will
take care of populating the rest of the values in each installed package object.subject - The logged in subjectresourceIds - identifies the resources against which the package will be deployedpackageVersionIds - packageVersions we want to installrequestNotes - request notesList<org.rhq.core.domain.content.Architecture> findArchitectures(org.rhq.core.domain.auth.Subject subject)
subject - The logged in subjectList<org.rhq.core.domain.content.PackageType> findPackageTypes(org.rhq.core.domain.auth.Subject subject, String resourceTypeName, String pluginName) throws ResourceTypeNotFoundException
subject - The logged in subjectresourceTypeName - The resource type in questionpluginName - ResourceTypeNotFoundExceptionorg.rhq.core.domain.content.PackageType findPackageType(org.rhq.core.domain.auth.Subject subject,
Integer resourceTypeId,
String packageTypeName)
The resource type id can be null, in which case only the server-side defined package types are searched for.
subject - the authenticated userresourceTypeId - the id of the resource type associated with the package type or null if only server-side package types should be searched forpackageTypeName - the name of the package type to findorg.rhq.core.domain.content.composite.PackageTypeAndVersionFormatComposite findPackageTypeWithVersionFormat(org.rhq.core.domain.auth.Subject subject,
Integer resourceTypeId,
String packageTypeName)
findPackageType(Subject, Integer, String) but
returns the package type along with the version format specification.subject - resourceTypeId - packageTypeName - org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.InstalledPackage> findInstalledPackagesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.InstalledPackageCriteria criteria)
subject - criteria - InstalledPackageCriteriaorg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> findPackageVersionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageVersionCriteria criteria)
PackageVersionCriteria.addFilterResourceId(Integer) then
this method requires InventoryManager permissions. When set the user must have permission to view
the resource.subject - criteria - IllegalArgumentException - for invalid resourceId filterorg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Package> findPackagesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageCriteria criteria)
subject - criteria - org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageAndLatestVersionComposite> findPackagesWithLatestVersion(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageCriteria criteria)
findPackagesByCriteria(Subject, PackageCriteria) but also
determines the latest version of the returned packages.
The provided criteria has to be limited to a specific repo using PackageCriteria.addFilterRepoId(Integer).
subject - criteria - IllegalArgumentException - if the criteria doesn't define a repo filterorg.rhq.core.domain.content.InstalledPackage getBackingPackageForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
subject - resourceId - a valid resourcebyte[] getPackageBytes(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int installedPackageId)
subject - resourceId - installedPackageId - String createTemporaryContentHandle()
void uploadContentFragment(String temporaryContentHandle, byte[] fragment, int off, int len)
temporaryContentHandle.
The fragment bytes will be copied starting from the off index up to the minimum of
off+len and fragment.length.temporaryContentHandle - temporary file handlefragment - fragment bytesoff - the offsetlen - org.rhq.core.domain.content.PackageVersion createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
String displayVersion,
Integer architectureId,
String temporaryContentHandle)
temporaryContentHandle.
Use this method instead of createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject, String, int, String, String, Integer, byte[])
to avoid passing content files as byte array parameters.
String temporaryContentHandle = contentManager.createTemporaryContentHandle();
while (... more bytes to send) {
contentManager.uploadContentFragment(temporaryContentHandle, ...);
}
PackageVersion pv = contentManager.createPackageVersionWithDisplayVersion(..., temporaryContentHandle);
subject - packageName - packageTypeId - version - displayVersion - architectureId - temporaryContentHandle - createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject, String, int, String, String, Integer, byte[])Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.