public class BundleManagerBean extends Object implements BundleManagerLocal, BundleManagerRemote
| Constructor and Description |
|---|
BundleManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
_finalizePurge(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.bundle.BundleDeployment bundleDeployment,
Map<org.rhq.core.domain.bundle.BundleResourceDeployment,String> failedToPurge)
Internal use only
|
org.rhq.core.domain.bundle.BundleFile |
addBundleFile(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
InputStream fileStream)
Adds a BundleFile to the BundleVersion and implicitly creates the backing PackageVersion.
|
org.rhq.core.domain.bundle.BundleFile |
addBundleFileViaByteArray(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
byte[] fileBytes)
A convenience method taking a byte array as opposed to a stream for the file bits.
|
org.rhq.core.domain.bundle.BundleFile |
addBundleFileViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
int packageVersionId)
A convenience method taking an existing PackageVersion as opposed to a stream for the file bits.
|
org.rhq.core.domain.bundle.BundleFile |
addBundleFileViaURL(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.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.
|
org.rhq.core.domain.bundle.BundleFile |
addBundleFileViaURL(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
String bundleFileUrl,
String userName,
String password)
A variant of
BundleManagerRemote.addBundleFileViaURL(Subject, int, String, String, Architecture, String) supporting the
HTTP basic authentication. |
org.rhq.core.domain.bundle.BundleResourceDeploymentHistory |
addBundleResourceDeploymentHistoryInNewTrans(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleResourceDeploymentHistory history)
Internal use only
|
void |
assignBundlesToBundleGroups(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
int[] bundleIds)
Assign the specified bundles to the specified bundle groups.
|
org.rhq.core.domain.bundle.Bundle |
createBundle(org.rhq.core.domain.auth.Subject subject,
String name,
String description,
int bundleTypeId,
int[] bundleGroupIds)
Internal use only, and test entry point.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleAndBundleVersion(org.rhq.core.domain.auth.Subject subject,
String bundleName,
String bundleDescription,
int bundleTypeId,
int[] bundleGroupIds,
String bundleVersionName,
String bundleVersionDescription,
String version,
String recipe)
|
org.rhq.core.domain.bundle.BundleDeployment |
createBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
int bundleDestinationId,
String description,
org.rhq.core.domain.configuration.Configuration configuration)
Create a new bundle deployment.
|
org.rhq.core.domain.bundle.BundleDeployment |
createBundleDeploymentInNewTrans(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
int bundleDestinationId,
String name,
String description,
org.rhq.core.domain.configuration.Configuration configuration)
Similar to
BundleManagerRemote.createBundleDeployment(Subject, int, int, String, Configuration) but
supplies the internally generated deploymentName and has different transaction semantics. |
org.rhq.core.domain.bundle.BundleDestination |
createBundleDestination(org.rhq.core.domain.auth.Subject subject,
int bundleId,
String name,
String description,
String destinationSpecification,
String deployDir,
Integer groupId)
Creates a bundle destination that describes a target for the bundle deployments.
|
org.rhq.core.domain.bundle.BundleGroup |
createBundleGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.bundle.BundleGroup bundleGroup)
Create a new bundle group.
|
org.rhq.core.domain.bundle.BundleResourceDeployment |
createBundleResourceDeploymentInNewTrans(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
int resourceId)
This is typically not called directly, typically scheduleBundleResourceDeployment() is called externally.
|
org.rhq.core.domain.bundle.BundleType |
createBundleType(org.rhq.core.domain.auth.Subject subject,
String name,
int resourceTypeId)
Not generally called.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersion(org.rhq.core.domain.auth.Subject subject,
int bundleId,
String name,
String description,
String version,
String recipe)
Deprecated.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionInternal(org.rhq.core.domain.bundle.Bundle bundle,
String name,
String version,
String description,
String recipe,
org.rhq.core.domain.configuration.definition.ConfigurationDefinition configurationDefinition)
Used internally for transaction demarcation purposes.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaByteArray(org.rhq.core.domain.auth.Subject subject,
byte[] fileBytes)
Creates a bundle version based on the actual bytes of a Bundle Distribution file.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaContentHandle(org.rhq.core.domain.auth.Subject subject,
String temporaryContentHandle)
Like
BundleManagerRemote.createBundleVersionViaFile(org.rhq.core.domain.auth.Subject, java.io.File) except that this method
takes a temporaryContentHandle as parameter instead of a file. |
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
File distributionFile)
Creates a bundle version based on a Bundle Distribution file.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaRecipe(org.rhq.core.domain.auth.Subject subject,
String recipe)
Creates a bundle version based on single recipe string.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl)
Creates a bundle version based on a Bundle Distribution file.
|
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password)
A version of the
BundleManagerRemote.createBundleVersionViaURL(org.rhq.core.domain.auth.Subject, String) that accepts a
username and password for basic authentication on the HTTP URLs. |
org.rhq.core.domain.bundle.BundleVersion |
createBundleVersionViaURLImpl(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password,
boolean mustBeInitialVersion,
int[] initialBundleGroupIds) |
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaByteArray(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
byte[] fileBytes)
Like #createBundleVersionViaByteArray except this method will assume this is a new bundle and is responsible
for creating the bundle as well as the bundle version.
|
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaContentHandle(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String temporaryContentHandle)
Like
BundleManagerRemote.createInitialBundleVersionViaFile(org.rhq.core.domain.auth.Subject, int[], java.io.File), except
that this method takes a temporaryContentHandle as parameter instead of a file. |
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
File distributionFile)
Like #createBundleVersionViaFile except this method will assume this is a new bundle and is responsible
for creating the bundle as well as the bundle version.
|
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaRecipe(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String recipe)
Like #createBundleVersionViaRecipe except this method will assume this is a new bundle and is responsible
for creating the bundle as well as the bundle version.
|
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaToken(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String token)
This method exists solely to support the GUI's wizard workflow which always first tries to create a bundle
version for an existing bundle, because it does not know whether this is an initial bundle version (only
the server can figure that out after it cracks open the bundle distribution, parses the recipe, and
looks for the bundle).
|
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String distributionFileUrl)
Like #createBundleVersionViaURL except this method will assume this is a new bundle and is responsible
for creating the bundle as well as the bundle version.
|
org.rhq.core.domain.bundle.BundleVersion |
createInitialBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String distributionFileUrl,
String username,
String password)
Like #createBundleVersionViaURL except this method will assume this is a new bundle and is responsible
for creating the bundle as well as the bundle version.
|
org.rhq.core.domain.bundle.BundleVersion |
createOrStoreBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
File distributionFile)
Like
BundleManagerRemote.createBundleVersionViaFile(Subject, File) with one additional feature. |
org.rhq.core.domain.bundle.BundleVersion |
createOrStoreBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password)
Like
BundleManagerRemote.createBundleVersionViaURL(Subject, String, String, String) with one additional feature. |
void |
deleteBundle(org.rhq.core.domain.auth.Subject subject,
int bundleId)
Remove everything associated with the Bundle with the exception of files laid down by related deployments.
|
void |
deleteBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId)
Used by GUI.
|
void |
deleteBundleDestination(org.rhq.core.domain.auth.Subject subject,
int destinationId)
Used by GUI.
|
void |
deleteBundleGroups(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds)
Delete a bundle group.
|
void |
deleteBundles(org.rhq.core.domain.auth.Subject subject,
int[] bundleIds)
Remove everything associated with the Bundles with the exception of files laid down by related deployments.
|
void |
deleteBundleVersion(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
boolean deleteBundleIfEmpty)
Remove everything associated with the BundleVersion with the exception of files laid down by related deployments.
|
org.rhq.core.domain.bundle.BundleDeploymentStatus |
determineBundleDeploymentStatus(int bundleDeploymentId)
Determines (and updates) the deployment status of the provided bundle deployment based on the deployment statuses
of the underlying resource deployments.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDeployment> |
findBundleDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleDeploymentCriteria criteria)
Return the
BundleDeployments narrowed by the supplied Criteria. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDestination> |
findBundleDestinationsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleDestinationCriteria criteria)
Return the
BundleDestinations narrowed by the supplied Criteria. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleFile> |
findBundleFilesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleFileCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleGroup> |
findBundleGroupsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleGroupCriteria criteria)
Return the
BundleGroups narrowed by the supplied Criteria. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleResourceDeployment> |
findBundleResourceDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleResourceDeploymentCriteria criteria)
Note that this can involves permissions on bundles and resources.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.Bundle> |
findBundlesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleCriteria criteria)
Return the
Bundles narrowed by the supplied Criteria. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.composite.BundleWithLatestVersionComposite> |
findBundlesWithLatestVersionCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleVersion> |
findBundleVersionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleVersionCriteria criteria) |
List<org.rhq.core.domain.bundle.BundleType> |
getAllBundleTypes(org.rhq.core.domain.auth.Subject subject) |
HashMap<String,Boolean> |
getAllBundleVersionFilenames(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId)
Used by GUI
|
org.rhq.core.domain.bundle.composite.BundleGroupAssignmentComposite |
getAssignableBundleGroups(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject assigningSubject,
int bundleId)
For the calling subject determines which bundle groups to which the user can assign the bundle.
|
String |
getBundleDeploymentName(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId,
int bundleVersionId,
int prevDeploymentId)
Used by GUI.
|
List<org.rhq.core.domain.bundle.BundleResourceDeploymentHistory> |
getBundleResourceDeploymentHistories(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId)
Used by the UI.
|
org.rhq.core.domain.bundle.BundleType |
getBundleType(org.rhq.core.domain.auth.Subject subject,
String bundleTypeName) |
Set<String> |
getBundleVersionFilenames(org.rhq.core.domain.auth.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.
|
org.rhq.core.domain.bundle.ResourceTypeBundleConfiguration |
getResourceTypeBundleConfiguration(org.rhq.core.domain.auth.Subject subject,
int compatGroupId)
Given the ID for a compatible group, this will return the bundle configuration metadata for that group's resource type.
|
BundleScheduleRequest |
getScheduleRequest(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
boolean isCleanDeployment,
boolean isRevert)
Internal use only.
|
void |
purgeBundleDestination(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId)
Purges the destination's live deployment content from the remote platforms.
|
org.rhq.core.domain.bundle.BundleDeployment |
scheduleBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
boolean isCleanDeployment)
Deploy the bundle to the destination, as described in the provided deployment.
|
org.rhq.core.domain.bundle.BundleDeployment |
scheduleBundleDeploymentInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
boolean isCleanDeployment,
boolean isRevert,
Integer revertedDeploymentReplacedDeployment)
Internal use only.
|
org.rhq.core.domain.bundle.BundleDeployment |
scheduleRevertBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId,
String deploymentDescription,
boolean isCleanDeployment)
For the specified destination, revert from the current live deployment to the deployment it had replaced.
|
org.rhq.core.domain.bundle.BundleResourceDeployment |
setBundleResourceDeploymentStatusInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleDeploymentStatus status)
Internal use only.
|
void |
unassignBundlesFromBundleGroups(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
int[] bundleIds)
Unassign the specified bundles from the specified bundle groups.
|
org.rhq.core.domain.bundle.BundleGroup |
updateBundleGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.bundle.BundleGroup bundleGroup)
Updates an existing bundle group.
|
public org.rhq.core.domain.bundle.ResourceTypeBundleConfiguration getResourceTypeBundleConfiguration(org.rhq.core.domain.auth.Subject subject,
int compatGroupId)
throws Exception
BundleManagerRemotegetResourceTypeBundleConfiguration in interface BundleManagerRemotesubject - the user making the requestcompatGroupId - the ID for a compatible group whose type's bundle config is to be returnedExceptionpublic org.rhq.core.domain.bundle.BundleResourceDeploymentHistory addBundleResourceDeploymentHistoryInNewTrans(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleResourceDeploymentHistory history)
throws Exception
BundleManagerLocaladdBundleResourceDeploymentHistoryInNewTrans in interface BundleManagerLocalresourceDeploymentId - id of the deployment appending the history recordExceptionpublic List<org.rhq.core.domain.bundle.BundleResourceDeploymentHistory> getBundleResourceDeploymentHistories(org.rhq.core.domain.auth.Subject subject, int resourceDeploymentId)
BundleManagerLocalgetBundleResourceDeploymentHistories in interface BundleManagerLocalsubject - the callerresourceDeploymentId - id of the deploymentpublic org.rhq.core.domain.bundle.Bundle createBundle(org.rhq.core.domain.auth.Subject subject,
String name,
String description,
int bundleTypeId,
int[] bundleGroupIds)
throws Exception
BundleManagerLocalRequired Permissions (same as createInitialBundleVersionXxx): Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createBundle in interface BundleManagerLocalsubject - user that must have proper permissionsname - not null or emptydescription - optional long description of the bundlebundleTypeId - valid bundleTypebundleGroupIds - existing bundle groups for initial bundle assignment, null or 0 length for unassignedExceptionpublic org.rhq.core.domain.bundle.BundleDeployment createBundleDeploymentInNewTrans(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
int bundleDestinationId,
String name,
String description,
org.rhq.core.domain.configuration.Configuration configuration)
throws Exception
BundleManagerLocalBundleManagerRemote.createBundleDeployment(Subject, int, int, String, Configuration) but
supplies the internally generated deploymentName and has different transaction semantics. Useful when an
slsb method needs to both create a deployment and schedules it prior to returning to an external caller.
This method performs NO AUTHZ!
createBundleDeploymentInNewTrans in interface BundleManagerLocalExceptionpublic org.rhq.core.domain.bundle.BundleDeployment createBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
int bundleDestinationId,
String description,
org.rhq.core.domain.configuration.Configuration configuration)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
createBundleDeployment in interface BundleManagerRemotesubject - 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.
This is validated against the configuration definition provided by the
bundle version.Exceptionpublic org.rhq.core.domain.bundle.BundleDestination createBundleDestination(org.rhq.core.domain.auth.Subject subject,
int bundleId,
String name,
String description,
String destinationSpecification,
String deployDir,
Integer groupId)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
createBundleDestination in interface BundleManagerRemotesubject - 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 destinationdestinationSpecification - The name of the destination 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 type.deployDir - the root dir for deployments to this destination or null if the type of the bundle does not
require itgroupId - the target platforms for deployments to this destinationExceptionpublic String getBundleDeploymentName(org.rhq.core.domain.auth.Subject subject, int bundleDestinationId, int bundleVersionId, int prevDeploymentId)
BundleManagerLocalRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
getBundleDeploymentName in interface BundleManagerLocalbundleDestinationId - requiredbundleVersionId - required for progressive deployment, -1 for revertprevDeploymentId - required for revert deployment, -1 for progressivepublic org.rhq.core.domain.bundle.BundleType createBundleType(org.rhq.core.domain.auth.Subject subject,
String name,
int resourceTypeId)
throws Exception
BundleManagerLocalcreateBundleType in interface BundleManagerLocalname - not null or emptyresourceTypeId - id of the ResourceType that handles this BundleTypeException@Deprecated public org.rhq.core.domain.bundle.BundleVersion createBundleAndBundleVersion(org.rhq.core.domain.auth.Subject subject, String bundleName, String bundleDescription, int bundleTypeId, int[] bundleGroupIds, String bundleVersionName, String bundleVersionDescription, String version, String recipe) throws Exception
BundleManagerLocal.createBundleAndBundleVersion(org.rhq.core.domain.auth.Subject,
String, String, int, int[], String, String, String, String)BundleManagerLocal#createBundle(Subject, String, int) and #createBundleVersion(Subject, int, String, String, String).
This will first check to see if a bundle with the given type/name exists - if it doesn't, it will be created. If it does, it will be reused.
This will then create the bundle version that will be associated with the bundle that was created or found.
Required Permissions (same as createInitialBundleVersionXxx): Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createBundleAndBundleVersion in interface BundleManagerLocalsubject - user that must have proper permissionsbundleName - name of the bundle to use (if not found, it will be created)bundleDescription - optional long description of the bundlebundleTypeId - the bundle type for the new bundle (if it is created) for which this will be the first versionbundleGroupIds - the bundle groups for the new bundle (if it is created) for which this will be the first version. null to leave unassigned.bundleVersionName - name of the bundle versionbundleVersionDescription - optional long description of the bundle versionversion - optional. If not supplied set to 1.0 for first version, or incremented (as best as possible) for subsequent versionException@Deprecated public org.rhq.core.domain.bundle.BundleVersion createBundleVersion(org.rhq.core.domain.auth.Subject subject, int bundleId, String name, String description, String version, String recipe) throws Exception
BundleManagerLocal.createBundleVersion(org.rhq.core.domain.auth.Subject, int, String, String, String, String)BundleManagerLocalRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
createBundleVersion in interface BundleManagerLocalsubject - user that must have proper permissionsbundleId - the bundle for which this will be the next versionname - not null or emptydescription - optional long description of the bundle versionversion - optional. If not supplied set to 1.0 for first version, or incremented (as best as possible) for subsequent versionExceptionpublic org.rhq.core.domain.bundle.BundleVersion createBundleVersionInternal(org.rhq.core.domain.bundle.Bundle bundle,
String name,
String version,
String description,
String recipe,
org.rhq.core.domain.configuration.definition.ConfigurationDefinition configurationDefinition)
throws Exception
BundleManagerLocalcreateBundleVersionInternal in interface BundleManagerLocalbundle - the bundle to create version ofname - the name of the bundle versionversion - the version of the bundle versiondescription - the description of the bundle versionrecipe - the recipe of the bundle versionconfigurationDefinition - the configuration definition of the deployment propertiesException - on errorpublic org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaRecipe(org.rhq.core.domain.auth.Subject subject,
String recipe)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
createBundleVersionViaRecipe in interface BundleManagerRemotesubject - user that must have proper permissionsrecipe - the recipe that defines the bundle version to be createdExceptionpublic org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaRecipe(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String recipe)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createInitialBundleVersionViaRecipe in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.recipe - the recipe that defines the bundle version to be createdExceptionpublic org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
File distributionFile)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
createBundleVersionViaFile in interface BundleManagerRemotesubject - user that must have proper permissionsdistributionFile - a local Bundle Distribution file. It must be read accessible by the RHQ server process.Exceptionpublic org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaContentHandle(org.rhq.core.domain.auth.Subject subject,
String temporaryContentHandle)
throws Exception
BundleManagerRemoteBundleManagerRemote.createBundleVersionViaFile(org.rhq.core.domain.auth.Subject, java.io.File) except that this method
takes a temporaryContentHandle as parameter instead of a file.createBundleVersionViaContentHandle in interface BundleManagerRemotesubject - user that must have proper permissionsExceptionContentManagerRemote.createTemporaryContentHandle(),
ContentManagerRemote.uploadContentFragment(String, byte[], int, int),
BundleManagerRemote.createBundleVersionViaFile(org.rhq.core.domain.auth.Subject, java.io.File)public org.rhq.core.domain.bundle.BundleVersion createOrStoreBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
File distributionFile)
throws Exception
BundleManagerLocalBundleManagerRemote.createBundleVersionViaFile(Subject, File) with one additional feature.
This method exists solely to support the GUI's wizard workflow which always first tries to create a bundle
version for an existing bundle, because it does not know whether this is an initial bundle version (only
the server can figure that out after it cracks open the bundle distribution, parses the recipe, and
looks for the bundle). If this is an initialBundleVersion this method does two things. First, it stores the
distribution file as a temp file, this is done to avoid having to upload the file a second time. Second, it
throws IllegalStateException with special message text, a token that can be sent back to
BundleManagerLocal.createInitialBundleVersionViaToken(Subject, int[], String).createOrStoreBundleVersionViaFile in interface BundleManagerLocalExceptionpublic org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
File distributionFile)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createInitialBundleVersionViaFile in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.distributionFile - a local Bundle Distribution file. It must be read accessible by the RHQ server process.Exceptionpublic org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaContentHandle(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String temporaryContentHandle)
throws Exception
BundleManagerRemoteBundleManagerRemote.createInitialBundleVersionViaFile(org.rhq.core.domain.auth.Subject, int[], java.io.File), except
that this method takes a temporaryContentHandle as parameter instead of a file.createInitialBundleVersionViaContentHandle in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.ExceptionContentManagerRemote.createTemporaryContentHandle(),
ContentManagerRemote.uploadContentFragment(String, byte[], int, int),
BundleManagerRemote.createInitialBundleVersionViaFile(org.rhq.core.domain.auth.Subject, int[], java.io.File)public org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaByteArray(org.rhq.core.domain.auth.Subject subject,
byte[] fileBytes)
throws Exception
BundleManagerRemoteBundleManagerRemote.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.
If this bundle version is the initial version of a new bundle that needs to be created, the subject must
have Global.VIEW_BUNDLES because the new bundle will not be associated with any bundle group.
Required Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
createBundleVersionViaByteArray in interface BundleManagerRemotesubject - user that must have proper permissionsfileBytes - the file bits that make up the entire bundle distribution fileExceptionpublic org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaByteArray(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
byte[] fileBytes)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createInitialBundleVersionViaByteArray in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.fileBytes - the file bits that make up the entire bundle distribution fileExceptionpublic org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl)
throws Exception
BundleManagerRemoteBundleManagerRemote.createBundleVersionViaFile(Subject,File).
If this bundle version is the initial version of a new bundle that needs to be created, the subject must
have Global.VIEW_BUNDLES because the new bundle will not be associated with any bundle group.
Required Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
createBundleVersionViaURL in interface BundleManagerRemotesubject - user that must have proper permissionsdistributionFileUrl - a URL String to the Bundle Distribution file. It must be live, resolvable and read accessible
by the RHQ server process.Exceptionpublic org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password)
throws Exception
BundleManagerRemoteBundleManagerRemote.createBundleVersionViaURL(org.rhq.core.domain.auth.Subject, String) that accepts a
username and password for basic authentication on the HTTP URLs.
If this bundle version is the initial version of a new bundle that needs to be created, the subject must
have Global.VIEW_BUNDLES because the new bundle will not be associated with any bundle group.
Required Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
createBundleVersionViaURL in interface BundleManagerRemotesubject - user that must have proper permissionsExceptionBundleManagerRemote.createBundleVersionViaURL(org.rhq.core.domain.auth.Subject, String)public org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String distributionFileUrl)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createInitialBundleVersionViaURL in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.distributionFileUrl - a URL String to the Bundle Distribution file. It must be live, resolvable and read accessible
by the RHQ server process.Exceptionpublic org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String distributionFileUrl,
String username,
String password)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createInitialBundleVersionViaURL in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.ExceptionBundleManagerRemote.createBundleVersionViaURL(org.rhq.core.domain.auth.Subject, String)public org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaURLImpl(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password,
boolean mustBeInitialVersion,
int[] initialBundleGroupIds)
throws Exception
Exceptionpublic org.rhq.core.domain.bundle.BundleVersion createOrStoreBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password)
throws Exception
BundleManagerLocalBundleManagerRemote.createBundleVersionViaURL(Subject, String, String, String) with one additional feature.
This method exists solely to support the GUI's wizard workflow which always first tries to create a bundle
version for an existing bundle, because it does not know whether this is an initial bundle version (only
the server can figure that out after it cracks open the bundle distribution, parses the recipe, and
looks for the bundle). If this is an initialBundleVersion this method does two things. First, it stores the
distribution file as a temp file, this is done to avoid having to upload the file a second time. Second, it
throws IllegalStateException with special message text, a token that can be sent back to
BundleManagerLocal.createInitialBundleVersionViaToken(Subject, int[], String).createOrStoreBundleVersionViaURL in interface BundleManagerLocalExceptionpublic org.rhq.core.domain.bundle.BundleFile addBundleFile(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
InputStream fileStream)
throws Exception
BundleManagerRemoteBundleManagerRemote.addBundleFileViaPackageVersion(Subject, int, String, int)
Required Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
addBundleFile in interface BundleManagerRemotesubject - 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 bitsExceptionpublic org.rhq.core.domain.bundle.BundleFile addBundleFileViaByteArray(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
byte[] fileBytes)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
addBundleFileViaByteArray in interface BundleManagerRemotesubject - 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).Exception#addBundleFile(Subject, int, String, String, Architecture, InputStream)}public org.rhq.core.domain.bundle.BundleFile addBundleFileViaURL(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
String bundleFileUrl)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
addBundleFileViaURL in interface BundleManagerRemotesubject - 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).ExceptionBundleManagerRemote.addBundleFile(Subject, int, String, String, Architecture, InputStream)public org.rhq.core.domain.bundle.BundleFile addBundleFileViaURL(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
String version,
org.rhq.core.domain.content.Architecture architecture,
String bundleFileUrl,
String userName,
String password)
throws Exception
BundleManagerRemoteBundleManagerRemote.addBundleFileViaURL(Subject, int, String, String, Architecture, String) supporting the
HTTP basic authentication.
Required Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
addBundleFileViaURL in interface BundleManagerRemotesubject - 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).ExceptionBundleManagerRemote.addBundleFileViaURL(Subject, int, String, String, Architecture, String)public org.rhq.core.domain.bundle.BundleFile addBundleFileViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
String name,
int packageVersionId)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
addBundleFileViaPackageVersion in interface BundleManagerRemotesubject - user that must have proper permissionsbundleVersionId - id of the BundleVersion incorporating this BundleFilename - name of the BundleFile (and the resulting Package)Exception#addBundleFile(Subject, int, String, String, Architecture, InputStream)}public void purgeBundleDestination(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
purgeBundleDestination in interface BundleManagerRemotesubject - user that must have proper permissionsbundleDestinationId - the ID of the destination that is to be purged of bundle contentExceptionpublic void _finalizePurge(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.bundle.BundleDeployment bundleDeployment,
Map<org.rhq.core.domain.bundle.BundleResourceDeployment,String> failedToPurge)
throws Exception
BundleManagerLocalBundleManagerRemote.purgeBundleDestination(Subject, int) is done, it
calls this so the purge can be finalized. This is required because this method is called with
a transactional context, as opposed to the main purge method.
This method performs NO AUTHZ!
_finalizePurge in interface BundleManagerLocalExceptionpublic org.rhq.core.domain.bundle.BundleDeployment scheduleBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
boolean isCleanDeployment)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
scheduleBundleDeployment in interface BundleManagerRemotesubject - 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.Exceptionpublic org.rhq.core.domain.bundle.BundleDeployment scheduleRevertBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId,
String deploymentDescription,
boolean isCleanDeployment)
throws Exception
BundleManagerRemotescheduleRevertBundleDeployment in interface BundleManagerRemotesubject - user that must have proper permissionsbundleDestinationId - the destination on which the revert should be applieddeploymentDescription - 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.Exceptionpublic org.rhq.core.domain.bundle.BundleDeployment scheduleBundleDeploymentInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
boolean isCleanDeployment,
boolean isRevert,
Integer revertedDeploymentReplacedDeployment)
throws Exception
BundleManagerLocalscheduleBundleDeploymentInNewTransaction in interface BundleManagerLocalExceptionpublic BundleScheduleRequest getScheduleRequest(org.rhq.core.domain.auth.Subject subject, int resourceDeploymentId, boolean isCleanDeployment, boolean isRevert) throws Exception
BundleManagerLocalgetScheduleRequest in interface BundleManagerLocalExceptionpublic org.rhq.core.domain.bundle.BundleResourceDeployment createBundleResourceDeploymentInNewTrans(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
int resourceId)
throws Exception
BundleManagerLocalcreateBundleResourceDeploymentInNewTrans in interface BundleManagerLocalExceptionpublic org.rhq.core.domain.bundle.BundleResourceDeployment setBundleResourceDeploymentStatusInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleDeploymentStatus status)
throws Exception
BundleManagerLocalsetBundleResourceDeploymentStatusInNewTransaction in interface BundleManagerLocalresourceDeploymentId - id of the resource deployment appending the history recordBundleResourceDeploymentExceptionpublic org.rhq.core.domain.bundle.BundleDeploymentStatus determineBundleDeploymentStatus(int bundleDeploymentId)
BundleManagerLocaldetermineBundleDeploymentStatus in interface BundleManagerLocalbundleDeploymentId - the id of the bundle deployment to checkpublic Set<String> getBundleVersionFilenames(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, boolean withoutBundleFileOnly) throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG
getBundleVersionFilenames in interface BundleManagerRemotesubject - user that must have proper permissionsbundleVersionId - the BundleVersion being queriedwithoutBundleFileOnly - if true omit any filenames that already have a corresponding BundleFile for
the BundleVersion.Exceptionpublic HashMap<String,Boolean> getAllBundleVersionFilenames(org.rhq.core.domain.auth.Subject subject, int bundleVersionId) throws Exception
BundleManagerLocalgetAllBundleVersionFilenames in interface BundleManagerLocalExceptionpublic List<org.rhq.core.domain.bundle.BundleType> getAllBundleTypes(org.rhq.core.domain.auth.Subject subject)
getAllBundleTypes in interface BundleManagerRemotepublic org.rhq.core.domain.bundle.BundleType getBundleType(org.rhq.core.domain.auth.Subject subject,
String bundleTypeName)
getBundleType in interface BundleManagerRemotebundleTypeName - must existpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDeployment> findBundleDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleDeploymentCriteria criteria)
BundleManagerRemoteBundleDeployments narrowed by the supplied Criteria. The results are implicitly
narrowed to those for bundles and destination groups viewable by the subject.findBundleDeploymentsByCriteria in interface BundleManagerRemotepublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDestination> findBundleDestinationsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleDestinationCriteria criteria)
BundleManagerRemoteBundleDestinations narrowed by the supplied Criteria. The results are implicitly
narrowed to those with destination resource groups viewable by the subject.findBundleDestinationsByCriteria in interface BundleManagerRemotepublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleResourceDeployment> findBundleResourceDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleResourceDeploymentCriteria criteria)
BundleManagerRemotesubject. If optionally requesting the relevant Resources
via BundleResourceDeploymentCriteria.fetchResources(true) the results will be further narrowed to
the viewable resources.findBundleResourceDeploymentsByCriteria in interface BundleManagerRemotepublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleVersion> findBundleVersionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleVersionCriteria criteria)
findBundleVersionsByCriteria in interface BundleManagerRemotepublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleFile> findBundleFilesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleFileCriteria criteria)
findBundleFilesByCriteria in interface BundleManagerRemotepublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.Bundle> findBundlesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleCriteria criteria)
BundleManagerRemoteBundles narrowed by the supplied Criteria. The results are implicitly
narrowed to those bundles viewable by the subject.findBundlesByCriteria in interface BundleManagerRemotepublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.composite.BundleWithLatestVersionComposite> findBundlesWithLatestVersionCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleCriteria criteria)
findBundlesWithLatestVersionCompositesByCriteria in interface BundleManagerRemotepublic void deleteBundles(org.rhq.core.domain.auth.Subject subject,
int[] bundleIds)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DELETE_BUNDLES and Global.VIEW_BUNDLES - Global.DELETE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.DELETE_BUNDLES_FROM_GROUP for bundle group BG and the relevant bundle is assigned to BG
deleteBundles in interface BundleManagerRemotesubject - user that must have proper permissionsbundleIds - IDs of all bundles to be deletedException - if any part of the removal fails.public void deleteBundle(org.rhq.core.domain.auth.Subject subject,
int bundleId)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DELETE_BUNDLES and Global.VIEW_BUNDLES - Global.DELETE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.DELETE_BUNDLES_FROM_GROUP for bundle group BG and the relevant bundle is assigned to BG
deleteBundle in interface BundleManagerRemotesubject - user that must have proper permissionsbundleId - the id of the bundle to removeException - if any part of the removal fails.public void deleteBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId)
throws Exception
BundleManagerLocalRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
deleteBundleDeployment in interface BundleManagerLocalException - if any part of the removal fails.public void deleteBundleDestination(org.rhq.core.domain.auth.Subject subject,
int destinationId)
throws Exception
BundleManagerLocalRequired Permissions: Either: - Global.DEPLOY_BUNDLES and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles) - Resource.DEPLOY_BUNDLES_TO_GROUP and a view of the relevant bundle and a view of the relevant resource group (may involve multiple roles)
deleteBundleDestination in interface BundleManagerLocalException - if any part of the removal fails.public void deleteBundleVersion(org.rhq.core.domain.auth.Subject subject,
int bundleVersionId,
boolean deleteBundleIfEmpty)
throws Exception
BundleManagerRemoteRequired Permissions: Either: - Global.DELETE_BUNDLES and Global.VIEW_BUNDLES - Global.DELETE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG and the relevant bundle is assigned to BG - BundleGroup.DELETE_BUNDLES_FROM_GROUP for bundle group BG and the relevant bundle is assigned to BG
deleteBundleVersion in interface BundleManagerRemotesubject - user that must have proper permissionsbundleVersionId - the id of the bundle version to removedeleteBundleIfEmpty - if true and if this method deletes the last bundle version for its
bundle, then that bundle entity itself will be completely purgedException - if any part of the removal fails.public void assignBundlesToBundleGroups(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
int[] bundleIds)
BundleManagerRemoteRequires VIEW permission for the relevant bundle and one of: - Global.MANAGE_BUNDLE_GROUPS - Global.CREATE_BUNDLE - BundleGroup.ASSIGN_BUNDLES_TO_GROUP for the relevant bundle group - BundleGroup.CREATE_BUNDLES_IN_GROUP for the relevant bundle group
assignBundlesToBundleGroups in interface BundleManagerRemotepublic org.rhq.core.domain.bundle.BundleGroup createBundleGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.bundle.BundleGroup bundleGroup)
throws Exception
BundleManagerRemoteRequire Permissions: - Global.MANAGE_BUNDLE_GROUPS
createBundleGroup in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroup - the new bundle group name the unique bundle group nameExceptionpublic void deleteBundleGroups(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds)
throws Exception
BundleManagerRemoteRequired Permissions: - Global.MANAGE_BUNDLE_GROUPS
deleteBundleGroups in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroupIds - the bundle group idExceptionpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleGroup> findBundleGroupsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.BundleGroupCriteria criteria)
BundleManagerRemoteBundleGroups narrowed by the supplied Criteria. The results are implicitly
narrowed to those bundle groups viewable by the subject.findBundleGroupsByCriteria in interface BundleManagerRemotepublic void unassignBundlesFromBundleGroups(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
int[] bundleIds)
BundleManagerRemoteRequires VIEW permission for the relevant bundles and one of: - Global.MANAGE_BUNDLE_GROUPS - Global.DELETE_BUNDLE - BundleGroup.UNASSIGN_BUNDLES_FROM_GROUP for the relevant bundle group - BundleGroup.DELETE_BUNDLES_FROM_GROUP for the relevant bundle group
unassignBundlesFromBundleGroups in interface BundleManagerRemotepublic org.rhq.core.domain.bundle.BundleGroup updateBundleGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.bundle.BundleGroup bundleGroup)
throws Exception
BundleManagerRemoteRequire Permissions: - Global.MANAGE_BUNDLE_GROUPS
updateBundleGroup in interface BundleManagerRemotesubject - user that must have proper permissionsbundleGroup - the updated bundle groupExceptionpublic org.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaToken(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String token)
throws Exception
BundleManagerLocalBundleManagerLocal.createOrStoreBundleVersionViaFile(Subject, File) or
BundleManagerLocal.createOrStoreBundleVersionViaURL(Subject, String, String, String).
This method will use the supplied token to access the distribution file. It assumes this is a new bundle and
is responsible for creating the bundle as well as the bundle version. The caller can indicate which bundle
groups the new bundle should be assigned to. If bundleGroupId is null, then the new bundle will not be
associated with any bundle group - this is only allowed if the caller has the permission Global.VIEW_BUNDLES.
Required Permissions: Either: - Global.CREATE_BUNDLES and Global.VIEW_BUNDLES - Global.CREATE_BUNDLES and BundleGroup.VIEW_BUNDLES_IN_GROUP for bundle group BG - BundleGroup.CREATE_BUNDLES_IN_GROUP for bundle group BG
createInitialBundleVersionViaToken in interface BundleManagerLocalsubject - user that must have proper permissionsbundleGroupIds - identifies the bundle groups that the new bundle will be associated with; null or zero
length to leave unassigned.token - the token used to identify the distribution file stashed as a temp file.Exceptionpublic org.rhq.core.domain.bundle.composite.BundleGroupAssignmentComposite getAssignableBundleGroups(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject assigningSubject,
int bundleId)
throws Exception
BundleManagerLocalMap indicating the assignable BundleGroups and which are
currently assigned. It also indicates whether the bundle can be left unassigned. When querying for
new bundles the bundleId should be set to 0.getAssignableBundleGroups in interface BundleManagerLocalExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.