public interface ContentManagerLocal extends ContentManagerRemote
| Modifier and Type | Field and Description |
|---|---|
static String |
UPLOAD_DISPLAY_VERSION |
static String |
UPLOAD_FILE_INSTALL_DATE |
static String |
UPLOAD_FILE_NAME |
static String |
UPLOAD_FILE_SIZE
This is currently ignored as the file size is computed
upon persist.
|
static String |
UPLOAD_MD5 |
static String |
UPLOAD_OWNER
This doesn't seem to serve any purpose.
|
static String |
UPLOAD_SHA256
This is currently ignored as the SHA is computed upon
persist.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkForTimedOutRequests(org.rhq.core.domain.auth.Subject subject)
For internal use only - Will check to see if any in progress content request jobs are taking too long to finish
and if so marks them as failed.
|
void |
completeDeletePackageRequest(org.rhq.core.domain.content.transfer.RemovePackagesResponse response)
|
void |
completeDeployPackageRequest(org.rhq.core.domain.content.transfer.DeployPackagesResponse response)
|
void |
completeRetrievePackageBitsRequest(ContentServiceResponse response,
InputStream bitStream)
|
org.rhq.core.domain.content.ContentServiceRequest |
createDeployRequest(int resourceId,
String username,
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
String requestNotes)
For internal use only - Adds a request entry to the database to track the deployment of a group of packages.
|
org.rhq.core.domain.content.PackageVersion |
createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
String displayVersion,
int architectureId,
InputStream packageBitStream)
Creates a new package version in the system.
|
org.rhq.core.domain.content.ContentServiceRequest |
createRemoveRequest(int resourceId,
String username,
int[] installedPackageIds,
String requestNotes)
For internal use only - Adds a request entry to the database to track the deleting of currently installed
packages from the resource.
|
org.rhq.core.domain.content.ContentServiceRequest |
createRetrieveBitsRequest(int resourceId,
String username,
int installedPackageId)
For internal use only - Adds a request entry to the database to track the request for a package's bits.
|
void |
deletePackages(org.rhq.core.domain.auth.Subject user,
int[] resourceIds,
int[] installedPackageIds)
Deletes the specified package from the resource.
|
void |
deployPackages(org.rhq.core.domain.auth.Subject user,
int resourceId,
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
String requestNotes)
Deploys a package on the specified resource.
|
void |
failRequest(int requestId,
Throwable error)
For internal use only - Updates a persisted
ContentServiceRequest in the case a failure is
encountered during one of the use case methods (i.e. |
List<String> |
findInstalledPackageVersions(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Returns list of version strings for installed packages on the resource.
|
org.rhq.core.domain.content.Architecture |
getNoArchitecture()
Returns the entity associated with no architecture.
|
org.rhq.core.domain.content.PackageType |
getResourceCreationPackageType(int resourceTypeId)
Returns the package type that backs resources of the specified type.
|
File |
getTemporaryContentFile(String temporaryContentHandle)
Get the file denoted by this
temporaryContentHandle. |
org.rhq.core.domain.content.PackageVersion |
getUploadedPackageVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
int architectureId,
InputStream packageBitStream,
Map<String,String> packageUploadDetails,
Integer repoId)
This method is essentially the same as
#createPackageVersion(Subject, String, int, String, int, InputStream)
but will update the package bits if a package version with the provided identification already exists. |
void |
handleDiscoveredPackage(org.rhq.core.domain.resource.Resource resource,
org.rhq.core.domain.content.transfer.ResourcePackageDetails discoveredPackage,
Set<org.rhq.core.domain.content.InstalledPackage> doomedPackages,
long timestamp) |
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> |
loadDependencies(int requestId,
Set<org.rhq.core.domain.content.PackageDetailsKey> keys)
For documentation, see
ContentServerService.loadDependencies(int, java.util.Set) |
void |
mergeDiscoveredPackages(ContentDiscoveryReport report)
|
org.rhq.core.domain.content.Package |
persistOrMergePackageSafely(org.rhq.core.domain.content.Package pkg)
Finds, and if it doesn't exist, persists the package.
|
org.rhq.core.domain.content.PackageVersion |
persistOrMergePackageVersionSafely(org.rhq.core.domain.content.PackageVersion pv)
Finds, and if it doesn't exist, persists the package version.
|
org.rhq.core.domain.content.Package |
persistPackage(org.rhq.core.domain.content.Package pkg)
Very simple method that pesists the given package within its own transaction.
|
org.rhq.core.domain.content.PackageVersion |
persistPackageVersion(org.rhq.core.domain.content.PackageVersion pv)
Very simple method that persists the given package version within its own transaction.
|
org.rhq.core.domain.content.PackageType |
persistServersidePackageType(org.rhq.core.domain.content.PackageType packageType)
This method is used to persist new package types that are defined on the server-side
by some kind of plugin.
|
void |
removeInstalledPackages(org.rhq.core.domain.resource.Resource resource,
Set<org.rhq.core.domain.content.InstalledPackage> doomedPackages,
long timestamp) |
void |
retrieveBitsFromResource(org.rhq.core.domain.auth.Subject user,
int resourceId,
int installedPackageId)
Requests the plugin load and send the actual bits for the specified package.
|
List<org.rhq.core.domain.content.transfer.DeployPackageStep> |
translateInstallationSteps(int resourceId,
org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
Requests the plugin translate the installation steps of the specified package.
|
void |
updateBlobStream(InputStream stream,
org.rhq.core.domain.content.PackageBits bits,
Map<String,String> contentDetails) |
void |
writeBlobOutToStream(OutputStream stream,
org.rhq.core.domain.content.PackageBits bits,
boolean closeStreams) |
createPackageVersion, createPackageVersionWithDisplayVersion, createPackageVersionWithDisplayVersion, createTemporaryContentHandle, deletePackages, deletePackageVersion, deployPackages, deployPackagesWithNote, findArchitectures, findInstalledPackagesByCriteria, findPackagesByCriteria, findPackagesWithLatestVersion, findPackageType, findPackageTypes, findPackageTypeWithVersionFormat, findPackageVersionsByCriteria, getBackingPackageForResource, getPackageBytes, uploadContentFragmentstatic final String UPLOAD_FILE_SIZE
static final String UPLOAD_FILE_INSTALL_DATE
static final String UPLOAD_OWNER
static final String UPLOAD_FILE_NAME
static final String UPLOAD_MD5
static final String UPLOAD_DISPLAY_VERSION
static final String UPLOAD_SHA256
void deployPackages(org.rhq.core.domain.auth.Subject user,
int resourceId,
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
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.user - the user who is requesting the creationresourceId - identifies the resource against which the package will be deployedpackages - packages (with their deployment time configuration values) to deployrequestNotes - user-specified notes on what is contained in this requestvoid deletePackages(org.rhq.core.domain.auth.Subject user,
int[] resourceIds,
int[] installedPackageIds)
user - the user who is requesting the deleteresourceIds - identifies the resources from which the packages should be deletedinstalledPackageIds - identifies all of the packages to be deletedvoid retrieveBitsFromResource(org.rhq.core.domain.auth.Subject user,
int resourceId,
int installedPackageId)
user - the user who is requesting the updateresourceId - identifies the resource against which the package existsinstalledPackageId - id of the installed package to retrieve bitsList<org.rhq.core.domain.content.transfer.DeployPackageStep> translateInstallationSteps(int resourceId, org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails) throws Exception
resourceId - resource against which the package is being installedpackageDetails - package being installednull if they cannot be determined
for this packageException - if there is an error either contacting the agent or in the plugin's generation of the stepsvoid mergeDiscoveredPackages(ContentDiscoveryReport report)
void completeDeployPackageRequest(org.rhq.core.domain.content.transfer.DeployPackagesResponse response)
void completeDeletePackageRequest(org.rhq.core.domain.content.transfer.RemovePackagesResponse response)
void completeRetrievePackageBitsRequest(ContentServiceResponse response, InputStream bitStream)
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> loadDependencies(int requestId, Set<org.rhq.core.domain.content.PackageDetailsKey> keys)
ContentServerService.loadDependencies(int, java.util.Set)org.rhq.core.domain.content.ContentServiceRequest createDeployRequest(int resourceId,
String username,
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
String requestNotes)
resourceId - resource against which the package request was executedusername - user who made the requestpackages - packages being deployed in the requestrequestNotes - user-specified notes on what the request entailsorg.rhq.core.domain.content.ContentServiceRequest createRemoveRequest(int resourceId,
String username,
int[] installedPackageIds,
String requestNotes)
resourceId - resource against which the package request was executedusername - user who made the requestinstalledPackageIds - identifies the installed packages that are to be deleted; ids in this list must be of
valid InstalledPackage objects on the resourcerequestNotes - user-specified notes on what the request entailsorg.rhq.core.domain.content.ContentServiceRequest createRetrieveBitsRequest(int resourceId,
String username,
int installedPackageId)
resourceId - resource against which the package request was executedusername - user who made the requestinstalledPackageId - package whose bits are being retrieved by the request; this must be the ID of a valid
InstalledPackage on the resource.void failRequest(int requestId,
Throwable error)
ContentServiceRequest in the case a failure is
encountered during one of the use case methods (i.e. create, delete).requestId - identifies the previously persisted requesterror - error encountered to cause the failurevoid checkForTimedOutRequests(org.rhq.core.domain.auth.Subject subject)
subject - only the overlord may execute this system operationorg.rhq.core.domain.content.PackageVersion createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
String displayVersion,
int architectureId,
InputStream packageBitStream)
subject - the user requesting the package creationpackageName - 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 - package display versionarchitectureId - architecture of the newly created package versionorg.rhq.core.domain.content.PackageVersion getUploadedPackageVersion(org.rhq.core.domain.auth.Subject subject,
String packageName,
int packageTypeId,
String version,
int architectureId,
InputStream packageBitStream,
Map<String,String> packageUploadDetails,
Integer repoId)
#createPackageVersion(Subject, String, int, String, int, InputStream)
but will update the package bits if a package version with the provided identification already exists.subject - the current userpackageName - the name of the package (the general package will be created if none exists)packageTypeId - the id of the package type. This is ignored if the newResourceTypeId is not nullversion - the version of the package version being createdarchitectureId - the architecture of the package versionpackageBitStream - the input stream with the package bitspackageUploadDetails - additional details about the package. See the constants defined in this interfacerepoId - an optional id of the repo to insert the package version inorg.rhq.core.domain.content.PackageVersion persistPackageVersion(org.rhq.core.domain.content.PackageVersion pv)
This method is here to support persistOrMergePackageVersionSafely(PackageVersion),
it is not meant for general consumption.
pv - the package version to persistorg.rhq.core.domain.content.PackageVersion persistOrMergePackageVersionSafely(org.rhq.core.domain.content.PackageVersion pv)
This method is for a very specific use case - that is, when creating a package version in a place where, concurrently, someone else might try to create the same package version. It is not for general persisting/merging of package versions.
pv - the package version to find and possibly persist to the databaseorg.rhq.core.domain.content.Package persistPackage(org.rhq.core.domain.content.Package pkg)
This method is here to support persistOrMergePackageSafely(Package),
it is not meant for general consumption.
pkg - the package to persistorg.rhq.core.domain.content.Package persistOrMergePackageSafely(org.rhq.core.domain.content.Package pkg)
This method is for a very specific use case - that is, when creating a package in a place where, concurrently, someone else might try to create the same package. It is not for general persisting/merging of packages.
pkg - the package to find and possibly persist to the databaseorg.rhq.core.domain.content.Architecture getNoArchitecture()
List<String> findInstalledPackageVersions(org.rhq.core.domain.auth.Subject subject, int resourceId)
subject - resourceId - org.rhq.core.domain.content.PackageType getResourceCreationPackageType(int resourceTypeId)
resourceTypeId - identifies the resource type.null otherwiseorg.rhq.core.domain.content.PackageType persistServersidePackageType(org.rhq.core.domain.content.PackageType packageType)
Server-side package types are used to identify data stored in the content subsystem
which don't have any agent-side counter-part. Such package types are required to have
the resource type set to null.
packageType - the package type to persistIllegalArgumentException - if the supplied package type has non-null resource typevoid writeBlobOutToStream(OutputStream stream, org.rhq.core.domain.content.PackageBits bits, boolean closeStreams)
void updateBlobStream(InputStream stream, org.rhq.core.domain.content.PackageBits bits, Map<String,String> contentDetails)
File getTemporaryContentFile(String temporaryContentHandle)
temporaryContentHandle.temporaryContentHandle - temporaryContentHandleContentManagerRemote.createTemporaryContentHandle()void handleDiscoveredPackage(org.rhq.core.domain.resource.Resource resource,
org.rhq.core.domain.content.transfer.ResourcePackageDetails discoveredPackage,
Set<org.rhq.core.domain.content.InstalledPackage> doomedPackages,
long timestamp)
void removeInstalledPackages(org.rhq.core.domain.resource.Resource resource,
Set<org.rhq.core.domain.content.InstalledPackage> doomedPackages,
long timestamp)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.