public interface ContentSourceManagerLocal
ContentSource objects deployed in the server, allowing the callers to
access data about and from remote content repositories.| Modifier and Type | Method and Description |
|---|---|
org.rhq.core.domain.content.RepoSyncResults |
_mergeAdvisorySyncReportADD(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress) |
org.rhq.core.domain.content.RepoSyncResults |
_mergeAdvisorySyncReportREMOVE(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress) |
org.rhq.core.domain.content.RepoSyncResults |
_mergeDistributionSyncReportADD(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress) |
org.rhq.core.domain.content.RepoSyncResults |
_mergeDistributionSyncReportREMOVE(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress) |
org.rhq.core.domain.content.RepoSyncResults |
_mergePackageSyncReportADD(org.rhq.core.domain.content.ContentSource contentSource,
org.rhq.core.domain.content.Repo repo,
Collection<ContentProviderPackageDetails> newPackages,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress,
int addCount) |
org.rhq.core.domain.content.RepoSyncResults |
_mergePackageSyncReportREMOVE(org.rhq.core.domain.content.ContentSource contentSource,
org.rhq.core.domain.content.Repo repo,
PackageSyncReport report,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress) |
org.rhq.core.domain.content.RepoSyncResults |
_mergePackageSyncReportUPDATE(org.rhq.core.domain.content.ContentSource contentSource,
PackageSyncReport report,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress) |
void |
_mergePackageSyncReportUpdateRepo(int contentSourceId) |
org.rhq.core.domain.content.ContentSource |
createContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
Create the specified content source.
|
void |
deleteContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
Deletes the identified content source.
|
void |
deleteContentSourceSyncResults(org.rhq.core.domain.auth.Subject subject,
int[] ids)
Allow a user to purge content source sync results.
|
void |
downloadDistributionBits(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
This will download all the distribution bits associated with a specific content source.
|
boolean |
downloadPackageBits(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
This will download the actual package bits for that package version from that content source's remote repository.
|
org.rhq.core.domain.content.PackageBits |
downloadPackageBits(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.PackageVersionContentSource pvcs)
Given a
PackageVersionContentSource which contains the ID of a content source, an ID of a package
version, and the location of that package version on the remote content source repo, this will download the
actual package bits for that package version from that content source's remote repository. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSource> |
getAllContentSources(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
Returns all
ContentSource objects that are configured in the system. |
Set<org.rhq.core.domain.content.ContentSourceType> |
getAllContentSourceTypes()
Returns all
ContentSourceType objects that are configured in the system. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> |
getAssociatedRepos(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
Gets the list of imported repos that are associated with a given content source.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSource> |
getAvailableContentSourcesForRepo(org.rhq.core.domain.auth.Subject subject,
Integer repoId,
org.rhq.core.domain.util.PageControl pc)
Returns all
ContentSource objects that are configured in the system but not presently
associated with the repo identified by repoId |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> |
getCandidateRepos(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
Gets the list of candidate repos that are associated with a given content source.
|
org.rhq.core.domain.content.ContentSource |
getContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
Returns the
ContentSource from its ID. |
org.rhq.core.domain.content.ContentSource |
getContentSourceByNameAndType(org.rhq.core.domain.auth.Subject subject,
String name,
String typeName)
Get a
ContentSource by name and ContentSourceType name. |
org.rhq.core.domain.content.ContentSourceSyncResults |
getContentSourceSyncResults(int resultsId)
Returns the full sync results object.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSourceSyncResults> |
getContentSourceSyncResults(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
Allows the caller to page through a list of historical sync results for a content source.
|
org.rhq.core.domain.content.ContentSourceType |
getContentSourceType(String name)
Get a
ContentSourceType by name. |
long |
getPackageBitsLength(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
Returns the length of the package version identified by its
PackageDetailsKey. |
long |
getPackageVersionCountFromContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
Returns count of PackageVersions associated with the given content source.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> |
getPackageVersionMetadata(int resourceId,
org.rhq.core.domain.util.PageControl pc)
Requests all
metadata for all package versions that the given resource
component is subscribed to (see Repo.getResources(). |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersionContentSource> |
getPackageVersionsFromContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
Returns all the package versions that are served by the content source identified by the given ID.
|
List<org.rhq.core.domain.content.PackageVersionContentSource> |
getPackageVersionsFromContentSourceForRepo(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
int repoId)
Returns all packages from the given repo.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersionContentSource> |
getPackageVersionsFromContentSources(org.rhq.core.domain.auth.Subject subject,
int[] contentSourceIds,
org.rhq.core.domain.util.PageControl pc)
Returns all the package versions that are served by all the content sources identified by the given IDs.
|
String |
getResourceSubscriptionMD5(int resourceId)
Gets the MD5 hash which identifies a resource "content subscription".
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersionContentSource> |
getUnloadedPackageVersionsFromContentSourceInRepo(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
int repoId,
org.rhq.core.domain.util.PageControl pc)
Returns all the package versions that are served by the content source identified by the given ID but whose
package bits have not been loaded yet. |
boolean |
internalSynchronizeContentSource(int contentSourceId)
Requests that the identified content source be synchronized.
|
org.rhq.core.domain.content.RepoSyncResults |
mergeAdvisorySyncReport(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults)
After a sync has happened, this is responsible for persisting the results.
|
org.rhq.core.domain.content.ContentSourceSyncResults |
mergeContentSourceSyncResults(org.rhq.core.domain.content.ContentSourceSyncResults results)
Updates an existing sync results object.
|
org.rhq.core.domain.content.RepoSyncResults |
mergeDistributionSyncReport(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults)
After a sync has happened, this is responsible for persisting the results.
|
org.rhq.core.domain.content.RepoSyncResults |
mergePackageSyncReport(org.rhq.core.domain.content.ContentSource contentSource,
org.rhq.core.domain.content.Repo repo,
PackageSyncReport report,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults)
After a sync has happened, this is responsible for persisting the results.
|
void |
mergeRepoImportResults(List<RepoDetails> repos)
Updates the server with the results of a repo import from a content source.
|
long |
outputDistributionFileBits(org.rhq.core.domain.content.DistributionFile distFile,
OutputStream outputStream)
Requests the bits of a distribution file be streamed down to the caller over the given output stream.
|
long |
outputPackageBitsForChildResource(int parentResourceId,
String resourceTypeName,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
Requests the bits of a package being used to create a child resource be stream down to the caller over
the given output stream.
|
long |
outputPackageVersionBits(org.rhq.core.domain.content.PackageVersion packageVersion,
OutputStream outputStream)
Requests the bits of a package be streamed down to the caller over the given output stream.
|
long |
outputPackageVersionBits(org.rhq.core.domain.content.PackageVersion packageVersion,
OutputStream outputStream,
long startByte,
long endByte)
Requests a range of bits from a package.
|
long |
outputPackageVersionBitsGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
Requests that the actual content data (the "bits") of the identified package version be streamed down to the
caller over the given output stream that the caller provides.
|
long |
outputPackageVersionBitsRangeGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream,
long startByte,
long endByte)
Requests that the actual content data (the "bits") of the identified package version be streamed down to the
caller over the given output stream that the caller provides.
|
org.rhq.core.domain.content.ContentSourceSyncResults |
persistContentSourceSyncResults(org.rhq.core.domain.content.ContentSourceSyncResults results)
Creates a new sync results object.
|
void |
purgeOrphanedPackageVersions(org.rhq.core.domain.auth.Subject subject)
This will look for any
PackageVersions that are "orphaned" (that is, is not related to any existing
content source or repo and is not installed anywhere) and will remove any orphans that it finds. |
org.rhq.core.domain.content.ContentSource |
simpleCreateContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
Adds the specified content source to the database but does not attempt to create or start
the server-side plugin provider implementation associated with it.
|
void |
synchronizeAndLoadContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
Requests that the identified content source be synchronized and if not lazy-loading to also download its
packages' bits.
|
void |
testContentSourceConnection(int contentSourceId)
Given a content source ID, this will test that the adapter responsible for pulling data from the content source's
remote repository can actually connect to that repository, and if not, throw an Exception.
|
org.rhq.core.domain.content.ContentSource |
updateContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource,
boolean syncNow)
Update an existing
ContentSource object and restarts its underlying adapter. |
void purgeOrphanedPackageVersions(org.rhq.core.domain.auth.Subject subject)
PackageVersions that are "orphaned" (that is, is not related to any existing
content source or repo and is not installed anywhere) and will remove any orphans that it finds. This means it
will delete orphaned PackageVersion definitions and (if loaded) their PackageBits.subject - user requesting the purgevoid deleteContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
subject - An authenticated user making the request.contentSourceId - The id of the content source to be deleted.Set<org.rhq.core.domain.content.ContentSourceType> getAllContentSourceTypes()
ContentSourceType objects that are configured in the system.org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSource> getAvailableContentSourcesForRepo(org.rhq.core.domain.auth.Subject subject,
Integer repoId,
org.rhq.core.domain.util.PageControl pc)
ContentSource objects that are configured in the system but not presently
associated with the repo identified by repoIdsubject - user asking to perform thisrepoId - the identifier for the repopc - pagination controlsorg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSource> getAllContentSources(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
ContentSource objects that are configured in the system.subject - user asking to perform thispc - pagination controlsorg.rhq.core.domain.content.ContentSourceType getContentSourceType(String name)
ContentSourceType by name. null will be returned if there is no content source type by
that name.name - the name of the ContentSourceType to be returnedContentSourceType found. null if none foundorg.rhq.core.domain.content.ContentSource getContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
ContentSource from its ID.subject - user asking to perform thiscontentSourceId - identifies the content source to returnnull if the ID is invalidorg.rhq.core.domain.content.ContentSource getContentSourceByNameAndType(org.rhq.core.domain.auth.Subject subject,
String name,
String typeName)
ContentSource by name and ContentSourceType name. null will be returned if
there is no content source with the given criteria.subject - user asking to perform thisname - the name of the ContentSource to be returnedtypeName - the name of the ContentSourceTypeContentSource found. null if none foundorg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> getAssociatedRepos(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
subject - user asking to perform thiscontentSourceId - the id of a content source.pc - pagination controlsorg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> getCandidateRepos(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
subject - user asking to perform thiscontentSourceId - the id of a content source.pc - pagination controlsorg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSourceSyncResults> getContentSourceSyncResults(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
subject - user asking to perform thiscontentSourceId - The id of a content source.pc - pagination controlsvoid deleteContentSourceSyncResults(org.rhq.core.domain.auth.Subject subject,
int[] ids)
subject - user asking to perform thisids - the IDs of the ContentSourceSyncResults to deleteorg.rhq.core.domain.content.ContentSource createContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
throws ContentSourceException
subject - The user making the request.contentSource - A content source to be created.ContentSourceExceptionorg.rhq.core.domain.content.ContentSource updateContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource,
boolean syncNow)
throws ContentSourceException
ContentSource object and restarts its underlying adapter. This also forces the adapter
to immediately sync with the remote repository. Note that this will only update the content source's basic fields
like name, description, etc. as well as its configuration. Specifically, it will not update the other
relationships like its repos. Use #addContentSourcesToRepo(Subject, int, int[]) for things like
that.subject - wanting to update the ContentSourcecontentSource - to be updatedsyncNow - if you wish to resync the ContentSource after updatingContentSourceExceptionvoid testContentSourceConnection(int contentSourceId)
throws Exception
contentSourceId - the id of the content source on which to test the connectionException - if the test failedvoid synchronizeAndLoadContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
subject - the user asking to perform thiscontentSourceId - identifies the content source to synchronizeException - if failed to kick off the synchronize joborg.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersionContentSource> getPackageVersionsFromContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
org.rhq.core.domain.util.PageControl pc)
subject - the user asking to perform thiscontentSourceId - The id of a content source.pc - pagination controlsList<org.rhq.core.domain.content.PackageVersionContentSource> getPackageVersionsFromContentSourceForRepo(org.rhq.core.domain.auth.Subject subject, int contentSourceId, int repoId)
subject - user retrieving the datacontentSourceId - content source from which the packages are retrievedrepoId - repo from which the packages are retrievedlong getPackageVersionCountFromContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
subject - caller requesting countcontentSourceId - to lookuplong getPackageBitsLength(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
PackageDetailsKey. This method ensures that
the given resource is subscribed to a repo that contains the package version.resourceId - packageDetailsKey - org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersionContentSource> getPackageVersionsFromContentSources(org.rhq.core.domain.auth.Subject subject,
int[] contentSourceIds,
org.rhq.core.domain.util.PageControl pc)
subject - the user asking to perform thiscontentSourceIds - pc - org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersionContentSource> getUnloadedPackageVersionsFromContentSourceInRepo(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
int repoId,
org.rhq.core.domain.util.PageControl pc)
package bits have not been loaded yet.subject - the user asking to perform thiscontentSourceId - pc - void downloadDistributionBits(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
subject - contentSource - boolean downloadPackageBits(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
resourceId - packageDetailsKey - packageVersionId - org.rhq.core.domain.content.PackageBits downloadPackageBits(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.PackageVersionContentSource pvcs)
PackageVersionContentSource which contains the ID of a content source, an ID of a package
version, and the location of that package version on the remote content source repo, this will download the
actual package bits for that package version from that content source's remote repository.
An exception will be thrown if the package bits could not be loaded.
This method is potentially a long running operation. Its transaction timeout should be extended appropriately.
If the content source where the package version is found is flagged to NEVER
download package bits, this will immediately return null.
subject - the user asking to perform thispvcs -
null if the content source is configured to never actually download package bits.boolean internalSynchronizeContentSource(int contentSourceId)
throws Exception
Do not call this method unless you know what you are doing. It is potentially a long running process
and will block the calling thread. In addition, this method must never be called from inside a
transaction, because it can be long running. You probably want to call
#synchronizeAndLoadContentSource(int).
contentSourceId - identifies the content source to synchronizetrue if the synchronization is complete; false if there is already a
synchronization already in progress and this call did nothing and aborted.Exception - if failed to synchronizeorg.rhq.core.domain.content.ContentSourceSyncResults persistContentSourceSyncResults(org.rhq.core.domain.content.ContentSourceSyncResults results)
null if the given results object has a
status of INPROGRESS but there is already a sync results object that is still INPROGRESS and has been in that
state for less than 24 hours. Use this to prohibit the system from synchronizing on the same content source
concurrently.results - the results that should be persistednull if another sync is currently inprogress.org.rhq.core.domain.content.ContentSourceSyncResults mergeContentSourceSyncResults(org.rhq.core.domain.content.ContentSourceSyncResults results)
persistContentSourceSyncResults(ContentSourceSyncResults) for that.results - the existing results that should be or mergedorg.rhq.core.domain.content.ContentSourceSyncResults getContentSourceSyncResults(int resultsId)
resultsId - the ID of the object to returnvoid mergeRepoImportResults(List<RepoDetails> repos)
repos - list of repo data received from the content source; should not be nullorg.rhq.core.domain.content.RepoSyncResults mergePackageSyncReport(org.rhq.core.domain.content.ContentSource contentSource,
org.rhq.core.domain.content.Repo repo,
PackageSyncReport report,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults)
contentSource - content source that was just sync'edreport - information on what the current inventory should look likeprevious - information from the previous inventory, before the sync happenedsyncResults - sync results object that should be updated to track this method's progressorg.rhq.core.domain.content.RepoSyncResults mergeDistributionSyncReport(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults)
contentSource - content source that was just sync'edreport - information on what the current inventory should look likesyncResults - sync results object that should be updated to track this method's progressorg.rhq.core.domain.content.RepoSyncResults mergeAdvisorySyncReport(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults)
contentSource - content source that was just sync'edreport - information on what the current inventory should look likesyncResults - sync results object that should be updated to track this method's progressvoid _mergePackageSyncReportUpdateRepo(int contentSourceId)
org.rhq.core.domain.content.RepoSyncResults _mergePackageSyncReportREMOVE(org.rhq.core.domain.content.ContentSource contentSource,
org.rhq.core.domain.content.Repo repo,
PackageSyncReport report,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress)
org.rhq.core.domain.content.RepoSyncResults _mergePackageSyncReportADD(org.rhq.core.domain.content.ContentSource contentSource,
org.rhq.core.domain.content.Repo repo,
Collection<ContentProviderPackageDetails> newPackages,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress,
int addCount)
org.rhq.core.domain.content.RepoSyncResults _mergePackageSyncReportUPDATE(org.rhq.core.domain.content.ContentSource contentSource,
PackageSyncReport report,
Map<ContentProviderPackageDetailsKey,org.rhq.core.domain.content.PackageVersionContentSource> previous,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress)
org.rhq.core.domain.content.RepoSyncResults _mergeDistributionSyncReportREMOVE(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress)
org.rhq.core.domain.content.RepoSyncResults _mergeDistributionSyncReportADD(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress)
org.rhq.core.domain.content.RepoSyncResults _mergeAdvisorySyncReportADD(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress)
org.rhq.core.domain.content.RepoSyncResults _mergeAdvisorySyncReportREMOVE(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults,
StringBuilder progress)
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> getPackageVersionMetadata(int resourceId,
org.rhq.core.domain.util.PageControl pc)
metadata for all package versions that the given resource
component is subscribed to (see Repo.getResources(). The returned object has the metadata bytes that
are meaningful to the calling plugin component.
Note that the returned object has the package version IDs that can be used to retrieve the actual content bits
of the package versions via a call to #retrievePackageVersionBits(int, int).
Callers should consider caching the returned metadata. Use getResourceSubscriptionMD5(int) to get the
MD5 hashcode of the metadata for the resource to aid in determining when a cache of metadata is stale.
resourceId - identifies the resource requesting the data; all package versions in all the resource's
subscribed repos will be represented in the returned mappc - this method can potentially return a large set; this page control object allows the caller to
page through that large set, as opposed to requesting the entire set in one large chunkgetResourceSubscriptionMD5(int)String getResourceSubscriptionMD5(int resourceId)
resourceId - identifies the resource requesting the MD5; any change to any package version in any of the
resource's subscribed repos will determine the MD5getPackageVersionMetadata(int, PageControl)long outputPackageVersionBitsGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
is lazy loading then this may be the time when it is downloaded from the
remote repository.
This is the same as calling
outputPackageVersionBitsRangeGivenResource(int, PackageDetailsKey, OutputStream, long, long) with the start/end bytes
of 0 and -1 respectively.
resourceId - identifies the resource making the request; if this resource is not allowed to see the
package version (due to the fact that it is not subscribed to a repo that is serving
that package version), an exception is thrownpackageDetailsKey - identifies the PackageVersion whose PackageBits are to be streamedoutputStream - a stream that the caller prepared where this method will write the actual contentlong outputPackageVersionBitsRangeGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream,
long startByte,
long endByte)
is lazy loading then this may be the time when it is downloaded from the
remote repository.resourceId - identifies the resource making the request; if this resource is not allowed to see the
package version (due to the fact that it is not subscribed to a repo that is serving
that package version), an exception is thrownpackageDetailsKey - identifies the PackageVersion whose PackageBits are to be streamedoutputStream - a stream that the caller prepared where this method will write the actual contentstartByte - the first byte (inclusive) of the byte range to retrieve and output (bytes start at
index 0)endByte - the last byte (inclusive) of the byte range to retrieve and output (-1 means up to EOF)
(bytes start at index 0)long outputPackageBitsForChildResource(int parentResourceId,
String resourceTypeName,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
is lazy loading then this may be the time when it is downloaded from the
remote repository.parentResourceId - identifies the parent resource under which the new resource is being createdresourceTypeName - type of child resource being createdpackageDetailsKey - package being used to create the child resourceoutputStream - an output stream where the server should write the package contents. It is up to the
caller to prepare this output stream in order to write the package content to an
appropriate location.long outputPackageVersionBits(org.rhq.core.domain.content.PackageVersion packageVersion,
OutputStream outputStream)
is lazy loading then this may be the time when it is downloaded from the
remote repository.packageVersion - packageVersion to fetchoutputStream - an output stream where the server should write the package contents. It is up to the
caller to prepare this output stream in order to write the package content to an
appropriate location.long outputPackageVersionBits(org.rhq.core.domain.content.PackageVersion packageVersion,
OutputStream outputStream,
long startByte,
long endByte)
is lazy loading then this may be the time when it is downloaded from the
remote repository.packageVersion - packageVersion to fetchoutputStream - an output stream where the server should write the package contents. It is up to the
caller to prepare this output stream in order to write the package content to an
appropriate location.startByte - start indexendByte - end indexlong outputDistributionFileBits(org.rhq.core.domain.content.DistributionFile distFile,
OutputStream outputStream)
distFile - distribution file to fetchoutputStream - an output stream where the server should write the package contents. It is up to the
caller to prepare this output stream in order to write the package content to an
appropriate location.org.rhq.core.domain.content.ContentSource simpleCreateContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
throws ContentSourceException
subject - may not be nullcontentSource - may not be nullContentSourceException - if the content source cannot be created, such as if the data in
the given object are not validCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.