public interface BundleManagerLocal extends BundleManagerRemote
| 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.BundleResourceDeploymentHistory |
addBundleResourceDeploymentHistoryInNewTrans(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleResourceDeploymentHistory history)
Internal use only
|
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)
Deprecated.
since 4.13 this is only used in tests - no need to have this in the API
|
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.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.
since 4.13, use one of the create(Initial)BundleVersionVia* methods
|
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 |
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 |
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 |
deleteBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId)
Used by GUI.
|
void |
deleteBundleDestination(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId)
Used by GUI.
|
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.
|
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.
|
BundleScheduleRequest |
getScheduleRequest(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
boolean isCleanDeployment,
boolean isRevert)
Internal use only.
|
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.BundleResourceDeployment |
setBundleResourceDeploymentStatusInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleDeploymentStatus status)
Internal use only.
|
addBundleFile, addBundleFileViaByteArray, addBundleFileViaPackageVersion, addBundleFileViaURL, addBundleFileViaURL, assignBundlesToBundleGroups, createBundleDeployment, createBundleDestination, createBundleGroup, createBundleVersionViaByteArray, createBundleVersionViaContentHandle, createBundleVersionViaFile, createBundleVersionViaRecipe, createBundleVersionViaURL, createBundleVersionViaURL, createInitialBundleVersionViaByteArray, createInitialBundleVersionViaContentHandle, createInitialBundleVersionViaFile, createInitialBundleVersionViaRecipe, createInitialBundleVersionViaURL, createInitialBundleVersionViaURL, deleteBundle, deleteBundleGroups, deleteBundles, deleteBundleVersion, findBundleDeploymentsByCriteria, findBundleDestinationsByCriteria, findBundleFilesByCriteria, findBundleGroupsByCriteria, findBundleResourceDeploymentsByCriteria, findBundlesByCriteria, findBundlesWithLatestVersionCompositesByCriteria, findBundleVersionsByCriteria, getAllBundleTypes, getBundleType, getBundleVersionFilenames, getResourceTypeBundleConfiguration, purgeBundleDestination, scheduleBundleDeployment, scheduleRevertBundleDeployment, unassignBundlesFromBundleGroups, updateBundleGrouporg.rhq.core.domain.bundle.BundleResourceDeploymentHistory addBundleResourceDeploymentHistoryInNewTrans(org.rhq.core.domain.auth.Subject subject,
int resourceDeploymentId,
org.rhq.core.domain.bundle.BundleResourceDeploymentHistory history)
throws Exception
subject - resourceDeploymentId - id of the deployment appending the history recordhistory - ExceptionList<org.rhq.core.domain.bundle.BundleResourceDeploymentHistory> getBundleResourceDeploymentHistories(org.rhq.core.domain.auth.Subject subject, int resourceDeploymentId)
subject - the callerresourceDeploymentId - id of the deploymentorg.rhq.core.domain.bundle.Bundle createBundle(org.rhq.core.domain.auth.Subject subject,
String name,
String description,
int bundleTypeId,
int[] bundleGroupIds)
throws Exception
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
subject - 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 unassignedException@Deprecated 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
#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
subject - 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 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
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
subject - 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 versionExceptionorg.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
bundle - 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 errororg.rhq.core.domain.bundle.BundleType createBundleType(org.rhq.core.domain.auth.Subject subject,
String name,
int resourceTypeId)
throws Exception
subject - name - not null or emptyresourceTypeId - id of the ResourceType that handles this BundleTypeExceptionorg.rhq.core.domain.bundle.BundleResourceDeployment createBundleResourceDeploymentInNewTrans(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
int resourceId)
throws Exception
Exceptionorg.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
BundleManagerRemote.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!
ExceptionHashMap<String,Boolean> getAllBundleVersionFilenames(org.rhq.core.domain.auth.Subject subject, int bundleVersionId) throws Exception
subject - bundleVersionId - ExceptionString getBundleDeploymentName(org.rhq.core.domain.auth.Subject subject, int bundleDestinationId, int bundleVersionId, int prevDeploymentId)
Required 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)
subject - bundleDestinationId - requiredbundleVersionId - required for progressive deployment, -1 for revertprevDeploymentId - required for revert deployment, -1 for progressiveBundleScheduleRequest getScheduleRequest(org.rhq.core.domain.auth.Subject subject, int resourceDeploymentId, boolean isCleanDeployment, boolean isRevert) throws Exception
Exceptionvoid deleteBundleDeployment(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId)
throws Exception
Required 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)
subject - bundleDeploymentId - Exception - if any part of the removal fails.void deleteBundleDestination(org.rhq.core.domain.auth.Subject subject,
int bundleDestinationId)
throws Exception
Required 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)
subject - bundleDestinationId - Exception - if any part of the removal fails.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
subject - resourceDeploymentId - id of the resource deployment appending the history recordstatus - BundleResourceDeploymentExceptionvoid _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
BundleManagerRemote.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!
subject - bundleDeployment - failedToPurge - Exceptionorg.rhq.core.domain.bundle.BundleVersion createOrStoreBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
File distributionFile)
throws Exception
BundleManagerRemote.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
createInitialBundleVersionViaToken(Subject, int[], String).Exceptionorg.rhq.core.domain.bundle.BundleVersion createOrStoreBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
String distributionFileUrl,
String username,
String password)
throws Exception
BundleManagerRemote.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
createInitialBundleVersionViaToken(Subject, int[], String).Exceptionorg.rhq.core.domain.bundle.BundleVersion createInitialBundleVersionViaToken(org.rhq.core.domain.auth.Subject subject,
int[] bundleGroupIds,
String token)
throws Exception
createOrStoreBundleVersionViaFile(Subject, File) or
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
subject - 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.Exceptionorg.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
Map 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.subject, - the calling subjectassigningSubject, - the subject relevant to the bundle group assignmentbundleId, - the bundle relevant to the bundle group assignment, or 0 for a new bundleExceptionorg.rhq.core.domain.bundle.BundleDeploymentStatus determineBundleDeploymentStatus(int bundleDeploymentId)
bundleDeploymentId - the id of the bundle deployment to checkorg.rhq.core.domain.bundle.BundleDeployment scheduleBundleDeploymentInNewTransaction(org.rhq.core.domain.auth.Subject subject,
int bundleDeploymentId,
boolean isCleanDeployment,
boolean isRevert,
Integer revertedDeploymentReplacedDeployment)
throws Exception
ExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.