|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BundleManagerRemote
Remote interface to the manager responsible for creating and managing bundles.
Method Summary | |
---|---|
BundleFile |
addBundleFile(Subject subject,
int bundleVersionId,
String name,
String version,
Architecture architecture,
InputStream fileStream)
Adds a BundleFile to the BundleVersion and implicitly creates the backing PackageVersion. |
BundleFile |
addBundleFileViaByteArray(Subject subject,
int bundleVersionId,
String name,
String version,
Architecture architecture,
byte[] fileBytes)
A convenience method taking a byte array as opposed to a stream for the file bits. |
BundleFile |
addBundleFileViaPackageVersion(Subject subject,
int bundleVersionId,
String name,
int packageVersionId)
A convenience method taking an existing PackageVersion as opposed to a stream for the file bits. |
BundleFile |
addBundleFileViaURL(Subject subject,
int bundleVersionId,
String name,
String version,
Architecture architecture,
String bundleFileUrl)
A convenience method taking a URL String whose content will be streamed to the server and used for the file bits. |
BundleDeployment |
createBundleDeployment(Subject subject,
int bundleVersionId,
int bundleDestinationId,
String description,
Configuration configuration)
Create a new bundle deployment. |
BundleDestination |
createBundleDestination(Subject subject,
int bundleId,
String name,
String description,
String destBaseDirName,
String deployDir,
Integer groupId)
Creates a bundle destination that describes a target for the bundle deployments. |
BundleVersion |
createBundleVersionViaByteArray(Subject subject,
byte[] fileBytes)
Creates a bundle version based on the actual bytes of a Bundle Distribution file. |
BundleVersion |
createBundleVersionViaFile(Subject subject,
File distributionFile)
Creates a bundle version based on a Bundle Distribution file. |
BundleVersion |
createBundleVersionViaRecipe(Subject subject,
String recipe)
Creates a bundle version based on single recipe string. |
BundleVersion |
createBundleVersionViaURL(Subject subject,
String distributionFileUrl)
Creates a bundle version based on a Bundle Distribution file. |
void |
deleteBundle(Subject subject,
int bundleId)
Remove everything associated with the Bundle with the exception of files laid down by related deployments. |
void |
deleteBundles(Subject subject,
int[] bundleIds)
Remove everything associated with the Bundles with the exception of files laid down by related deployments. |
void |
deleteBundleVersion(Subject subject,
int bundleVersionId,
boolean deleteBundleIfEmpty)
Remove everything associated with the BundleVersion with the exception of files laid down by related deployments. |
PageList<BundleDeployment> |
findBundleDeploymentsByCriteria(Subject subject,
BundleDeploymentCriteria criteria)
|
PageList<BundleDestination> |
findBundleDestinationsByCriteria(Subject subject,
BundleDestinationCriteria criteria)
|
PageList<BundleFile> |
findBundleFilesByCriteria(Subject subject,
BundleFileCriteria criteria)
|
PageList<BundleResourceDeployment> |
findBundleResourceDeploymentsByCriteria(Subject subject,
BundleResourceDeploymentCriteria criteria)
|
PageList<Bundle> |
findBundlesByCriteria(Subject subject,
BundleCriteria criteria)
|
PageList<BundleWithLatestVersionComposite> |
findBundlesWithLatestVersionCompositesByCriteria(Subject subject,
BundleCriteria criteria)
|
PageList<BundleVersion> |
findBundleVersionsByCriteria(Subject subject,
BundleVersionCriteria criteria)
|
List<BundleType> |
getAllBundleTypes(Subject subject)
|
BundleType |
getBundleType(Subject subject,
String bundleTypeName)
|
Set<String> |
getBundleVersionFilenames(Subject subject,
int bundleVersionId,
boolean withoutBundleFileOnly)
Determine the files required for a BundleVersion and return all of the filenames or optionally, just those that lack BundleFiles for the BundleVersion. |
ResourceTypeBundleConfiguration |
getResourceTypeBundleConfiguration(Subject subject,
int compatGroupId)
Given the ID for a compatible group, this will return the bundle configuration metadata for that group's resource type. |
void |
purgeBundleDestination(Subject subject,
int bundleDestinationId)
Purges the destination's live deployment content from the remote platforms. |
BundleDeployment |
scheduleBundleDeployment(Subject subject,
int bundleDeploymentId,
boolean isCleanDeployment)
Deploy the bundle to the destination, as described in the provided deployment. |
BundleDeployment |
scheduleRevertBundleDeployment(Subject subject,
int bundleDestinationId,
String deploymentDescription,
boolean isCleanDeployment)
For the specified destination, revert from the current live deployment to the deployment it had replaced. |
Method Detail |
---|
ResourceTypeBundleConfiguration getResourceTypeBundleConfiguration(Subject subject, int compatGroupId) throws Exception
subject
- the user making the requestcompatGroupId
- the ID for a compatible group whose type's bundle config is to be returned
Exception
BundleFile addBundleFile(Subject subject, int bundleVersionId, String name, String version, Architecture architecture, InputStream fileStream) throws Exception
addBundleFile(Subject, int, String, int, boolean)
subject
- user that must have proper permissionsbundleVersionId
- id of the BundleVersion incorporating this BundleFilename
- name of the BundleFile (and the resulting Package)version
- version of the backing packagearchitecture
- architecture appropriate for the backing package. Defaults to noarch (i.e. any architecture).fileStream
- the file bits
Exception
BundleFile addBundleFileViaByteArray(Subject subject, int bundleVersionId, String name, String version, Architecture architecture, byte[] fileBytes) throws Exception
Exception
addBundleFile(Subject, int, String, String, Architecture, InputStream, boolean)}
BundleFile addBundleFileViaURL(Subject subject, int bundleVersionId, String name, String version, Architecture architecture, String bundleFileUrl) throws Exception
Exception
addBundleFile(Subject, int, String, String, Architecture, InputStream, boolean)}
BundleFile addBundleFileViaPackageVersion(Subject subject, int bundleVersionId, String name, int packageVersionId) throws Exception
Exception
addBundleFile(Subject, int, String, String, Architecture, InputStream, boolean)}
BundleDeployment createBundleDeployment(Subject subject, int bundleVersionId, int bundleDestinationId, String description, Configuration configuration) throws Exception
subject
- user that must have proper permissionsbundleVersionId
- the BundleVersion being deployed by this deploymentbundleDestinationId
- the BundleDestination for the deploymentdescription
- an optional longer description describing this deploymentconfiguration
- a Configuration (pojo) to be associated with this deployment. Although
it is not enforceable must be that of the associated BundleVersion.
Exception
BundleDestination createBundleDestination(Subject subject, int bundleId, String name, String description, String destBaseDirName, String deployDir, Integer groupId) throws Exception
subject
- user must have MANAGE_INVENTORY permissionbundleId
- the Bundle to be deployed to this Destinationname
- a name for this destination. not null or emptydescription
- an optional longer description describing this destinationdestBaseDirName
- The name of the base directory location where the bundle will be deployed.
deployDir
is relative to the directory that this name refers to.
This name isn't the directory itself, it refers to the named location as
defined in the agent plugin's descriptor for the resource's typedeployDir
- the root dir for deployments to this destinationgroupId
- the target platforms for deployments to this destination
Exception
BundleVersion createBundleVersionViaRecipe(Subject subject, String recipe) throws Exception
subject
- recipe
- the recipe that defines the bundle version to be created
Exception
BundleVersion createBundleVersionViaFile(Subject subject, File distributionFile) throws Exception
subject
- distributionFile
- a local Bundle Distribution file. It must be read accessible by the RHQ server process.
Exception
BundleVersion createBundleVersionViaByteArray(Subject subject, byte[] fileBytes) throws Exception
createBundleVersionViaFile(Subject, File)
but the caller is providing the actual
bytes of the file as opposed to the file itself.
WARNING: obviously, this requires the entire distribution file to have been loaded fully in memory.
For very large distribution files, this could cause OutOfMemoryErrors.
subject
- fileBytes
- the file bits that make up the entire bundle distribution file
Exception
BundleVersion createBundleVersionViaURL(Subject subject, String distributionFileUrl) throws Exception
createBundleVersionViaFile(Subject,File)
.
subject
- distributionFileUrl
- a URL String to the Bundle Distribution file. It must be live, resolvable and read accessible
by the RHQ server process.
Exception
void deleteBundles(Subject subject, int[] bundleIds) throws Exception
subject
- bundleIds
- IDs of all bundles to be deleted
Exception
- if any part of the removal fails.void deleteBundle(Subject subject, int bundleId) throws Exception
subject
- bundleId
-
Exception
- if any part of the removal fails.void deleteBundleVersion(Subject subject, int bundleVersionId, boolean deleteBundleIfEmpty) throws Exception
subject
- bundleVersionId
- deleteBundleIfEmpty
- if true
and if this method deletes the last bundle version for its
bundle, then that bundle entity itself will be completely purged
Exception
- if any part of the removal fails.PageList<Bundle> findBundlesByCriteria(Subject subject, BundleCriteria criteria)
PageList<BundleDeployment> findBundleDeploymentsByCriteria(Subject subject, BundleDeploymentCriteria criteria)
PageList<BundleDestination> findBundleDestinationsByCriteria(Subject subject, BundleDestinationCriteria criteria)
PageList<BundleResourceDeployment> findBundleResourceDeploymentsByCriteria(Subject subject, BundleResourceDeploymentCriteria criteria)
PageList<BundleFile> findBundleFilesByCriteria(Subject subject, BundleFileCriteria criteria)
PageList<BundleVersion> findBundleVersionsByCriteria(Subject subject, BundleVersionCriteria criteria)
PageList<BundleWithLatestVersionComposite> findBundlesWithLatestVersionCompositesByCriteria(Subject subject, BundleCriteria criteria)
List<BundleType> getAllBundleTypes(Subject subject)
BundleType getBundleType(Subject subject, String bundleTypeName)
Set<String> getBundleVersionFilenames(Subject subject, int bundleVersionId, boolean withoutBundleFileOnly) throws Exception
subject
- user that must have proper permissionsbundleVersionId
- the BundleVersion being queriedwithoutBundleFileOnly
- if true omit any filenames that already have a corresponding BundleFile for
the BundleVersion.
Exception
void purgeBundleDestination(Subject subject, int bundleDestinationId) throws Exception
subject
- user that must have proper permissionsbundleDestinationId
- the ID of the destination that is to be purged of bundle content
Exception
BundleDeployment scheduleBundleDeployment(Subject subject, int bundleDeploymentId, boolean isCleanDeployment) throws Exception
subject
- user that must have proper permissionsbundleDeploymentId
- the BundleDeployment being used to guide the deploymentsisCleanDeployment
- if true perform a wipe of the deploy directory prior to the deployment. If false
perform as an upgrade to the existing deployment, if any.
Exception
BundleDeployment scheduleRevertBundleDeployment(Subject subject, int bundleDestinationId, String deploymentDescription, boolean isCleanDeployment) throws Exception
subject
- user that must have proper permissionsdeploymentDescription
- an optional longer description describing this deployment. If null defaults
to the description of the previous deployment.isCleanDeployment
- if true perform a wipe of the deploy directory prior to the revert deployment. Backed up
files will still be applied. If false perform as an upgrade to the existing deployment.
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |