|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.content.ContentSourceManagerBean
public class ContentSourceManagerBean
A SLSB wrapper around our server-side content source plugin container. This bean provides access to the
ContentSource objects deployed in the server, thus allows the callers to access data about and from remote
content repositories.
| Field Summary | |
|---|---|
static String |
FILESYSTEM_PROPERTY
The location we store the bits and distro files |
| Constructor Summary | |
|---|---|
ContentSourceManagerBean()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FILESYSTEM_PROPERTY
| Constructor Detail |
|---|
public ContentSourceManagerBean()
| Method Detail |
|---|
public void purgeOrphanedPackageVersions(org.rhq.core.domain.auth.Subject subject)
ContentSourceManagerLocalPackageVersions 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.
purgeOrphanedPackageVersions in interface ContentSourceManagerLocalsubject - user requesting the purge
public void deleteContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
ContentSourceManagerLocal
deleteContentSource in interface ContentSourceManagerLocalsubject - An authenticated user making the request.contentSourceId - The id of the content source to be deleted.public Set<org.rhq.core.domain.content.ContentSourceType> getAllContentSourceTypes()
ContentSourceManagerLocalContentSourceType objects that are configured in the system.
getAllContentSourceTypes in interface ContentSourceManagerLocal
public 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)
ContentSourceManagerLocalContentSource objects that are configured in the system.
getAllContentSources in interface ContentSourceManagerLocalsubject - user asking to perform thispc - pagination controls
public 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)
ContentSourceManagerLocalContentSource objects that are configured in the system but not presently
associated with the repo identified by repoId
getAvailableContentSourcesForRepo in interface ContentSourceManagerLocalsubject - user asking to perform thisrepoId - the identifier for the repopc - pagination controls
public org.rhq.core.domain.content.ContentSourceType getContentSourceType(String name)
ContentSourceManagerLocalContentSourceType by name. null will be returned if there is no content source type by
that name.
getContentSourceType in interface ContentSourceManagerLocalname - the name of the ContentSourceType to be returned
ContentSourceType found. null if none found
public org.rhq.core.domain.content.ContentSource getContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
ContentSourceManagerLocalContentSource from its ID.
getContentSource in interface ContentSourceManagerLocalsubject - user asking to perform thiscontentSourceId - identifies the content source to return
null if the ID is invalid
public org.rhq.core.domain.content.ContentSource getContentSourceByNameAndType(org.rhq.core.domain.auth.Subject subject,
String name,
String typeName)
ContentSourceManagerLocalContentSource by name and ContentSourceType name. null will be returned if
there is no content source with the given criteria.
getContentSourceByNameAndType in interface ContentSourceManagerLocalsubject - user asking to perform thisname - the name of the ContentSource to be returnedtypeName - the name of the ContentSourceType
ContentSource found. null if none found
public 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)
ContentSourceManagerLocal
getAssociatedRepos in interface ContentSourceManagerLocalsubject - user asking to perform thiscontentSourceId - the id of a content source.pc - pagination controls
public 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)
ContentSourceManagerLocal
getCandidateRepos in interface ContentSourceManagerLocalsubject - user asking to perform thiscontentSourceId - the id of a content source.pc - pagination controls
public 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)
ContentSourceManagerLocal
getContentSourceSyncResults in interface ContentSourceManagerLocalsubject - user asking to perform thiscontentSourceId - The id of a content source.pc - pagination controls
public void mergeRepoImportResults(List<RepoDetails> repos)
ContentSourceManagerLocal
mergeRepoImportResults in interface ContentSourceManagerLocalrepos - list of repo data received from the content source; should not be null
public void deleteContentSourceSyncResults(org.rhq.core.domain.auth.Subject subject,
int[] ids)
ContentSourceManagerLocal
deleteContentSourceSyncResults in interface ContentSourceManagerLocalsubject - user asking to perform thisids - the IDs of the ContentSourceSyncResults to delete
public org.rhq.core.domain.content.ContentSource createContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
throws ContentSourceException
ContentSourceManagerLocal
createContentSource in interface ContentSourceManagerLocalsubject - The user making the request.contentSource - A content source to be created.
ContentSourceException
public org.rhq.core.domain.content.ContentSource simpleCreateContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
throws ContentSourceException
ContentSourceManagerLocal
simpleCreateContentSource in interface ContentSourceManagerLocalsubject - may not be nullcontentSource - may not be null
ContentSourceException - if the content source cannot be created, such as if the data in
the given object are not valid
public org.rhq.core.domain.content.ContentSource updateContentSource(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource,
boolean syncNow)
throws ContentSourceException
ContentSourceManagerLocalContentSource 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.
updateContentSource in interface ContentSourceManagerLocalsubject - wanting to update the ContentSourcecontentSource - to be updatedsyncNow - if you wish to resync the ContentSource after updating
ContentSourceException
public void testContentSourceConnection(int contentSourceId)
throws Exception
ContentSourceManagerLocal
testContentSourceConnection in interface ContentSourceManagerLocalcontentSourceId - the id of the content source on which to test the connection
Exception - if the test failed
public void synchronizeAndLoadContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
ContentSourceManagerLocal
synchronizeAndLoadContentSource in interface ContentSourceManagerLocalsubject - the user asking to perform thiscontentSourceId - identifies the content source to synchronize
public 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)
ContentSourceManagerLocal
getPackageVersionsFromContentSource in interface ContentSourceManagerLocalsubject - the user asking to perform thiscontentSourceId - The id of a content source.pc - pagination controls
public List<org.rhq.core.domain.content.PackageVersionContentSource> getPackageVersionsFromContentSourceForRepo(org.rhq.core.domain.auth.Subject subject,
int contentSourceId,
int repoId)
ContentSourceManagerLocal
getPackageVersionsFromContentSourceForRepo in interface ContentSourceManagerLocalsubject - user retrieving the datacontentSourceId - content source from which the packages are retrievedrepoId - repo from which the packages are retrieved
public long getPackageVersionCountFromContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
ContentSourceManagerLocal
getPackageVersionCountFromContentSource in interface ContentSourceManagerLocalsubject - caller requesting countcontentSourceId - to lookup
public long getPackageBitsLength(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
ContentSourceManagerLocalPackageDetailsKey. This method ensures that
the given resource is subscribed to a repo that contains the package version.
getPackageBitsLength in interface ContentSourceManagerLocal
public 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)
ContentSourceManagerLocal
getPackageVersionsFromContentSources in interface ContentSourceManagerLocalsubject - the user asking to perform this
public 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)
ContentSourceManagerLocalpackage bits have not been loaded yet.
getUnloadedPackageVersionsFromContentSourceInRepo in interface ContentSourceManagerLocalsubject - the user asking to perform this
public void downloadDistributionBits(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.ContentSource contentSource)
ContentSourceManagerLocal
downloadDistributionBits in interface ContentSourceManagerLocal
public org.rhq.core.domain.content.PackageBits downloadPackageBits(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.PackageVersionContentSource pvcs)
ContentSourceManagerLocalPackageVersionContentSource 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.
downloadPackageBits in interface ContentSourceManagerLocalsubject - the user asking to perform this
null if the content source is configured to never actually download package bits.
public boolean internalSynchronizeContentSource(int contentSourceId)
throws Exception
ContentSourceManagerLocalDo 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).
internalSynchronizeContentSource in interface ContentSourceManagerLocalcontentSourceId - identifies the content source to synchronize
true 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 synchronizepublic org.rhq.core.domain.content.ContentSourceSyncResults persistContentSourceSyncResults(org.rhq.core.domain.content.ContentSourceSyncResults results)
ContentSourceManagerLocalnull 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.
persistContentSourceSyncResults in interface ContentSourceManagerLocalresults - the results that should be persisted
null if another sync is currently inprogress.public org.rhq.core.domain.content.ContentSourceSyncResults mergeContentSourceSyncResults(org.rhq.core.domain.content.ContentSourceSyncResults results)
ContentSourceManagerLocalContentSourceManagerLocal.persistContentSourceSyncResults(ContentSourceSyncResults) for that.
mergeContentSourceSyncResults in interface ContentSourceManagerLocalresults - the existing results that should be or merged
public org.rhq.core.domain.content.ContentSourceSyncResults getContentSourceSyncResults(int resultsId)
ContentSourceManagerLocal
getContentSourceSyncResults in interface ContentSourceManagerLocalresultsId - the ID of the object to return
public org.rhq.core.domain.content.RepoSyncResults mergeDistributionSyncReport(org.rhq.core.domain.content.ContentSource contentSource,
DistributionSyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults)
ContentSourceManagerLocal
mergeDistributionSyncReport in interface ContentSourceManagerLocalcontentSource - 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 progress
public 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)
ContentSourceManagerLocal
mergePackageSyncReport in interface ContentSourceManagerLocalcontentSource - 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 progress
public org.rhq.core.domain.content.RepoSyncResults mergeAdvisorySyncReport(org.rhq.core.domain.content.ContentSource contentSource,
AdvisorySyncReport report,
org.rhq.core.domain.content.RepoSyncResults syncResults)
ContentSourceManagerLocal
mergeAdvisorySyncReport in interface ContentSourceManagerLocalcontentSource - 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 progress
public 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)
_mergeAdvisorySyncReportADD in interface ContentSourceManagerLocal
public 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)
_mergeAdvisorySyncReportREMOVE in interface ContentSourceManagerLocalpublic void _mergePackageSyncReportUpdateRepo(int contentSourceId)
_mergePackageSyncReportUpdateRepo in interface ContentSourceManagerLocal
public 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)
_mergePackageSyncReportREMOVE in interface ContentSourceManagerLocal
public 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)
_mergePackageSyncReportADD in interface ContentSourceManagerLocal
public 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)
_mergePackageSyncReportUPDATE in interface ContentSourceManagerLocal
public 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)
_mergeDistributionSyncReportREMOVE in interface ContentSourceManagerLocal
public 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)
_mergeDistributionSyncReportADD in interface ContentSourceManagerLocal
public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> getPackageVersionMetadata(int resourceId,
org.rhq.core.domain.util.PageControl pc)
ContentSourceManagerLocalmetadata 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 ContentSourceManagerLocal.getResourceSubscriptionMD5(int) to get the
MD5 hashcode of the metadata for the resource to aid in determining when a cache of metadata is stale.
getPackageVersionMetadata in interface ContentSourceManagerLocalresourceId - 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 chunk
ContentSourceManagerLocal.getResourceSubscriptionMD5(int)public String getResourceSubscriptionMD5(int resourceId)
ContentSourceManagerLocal
getResourceSubscriptionMD5 in interface ContentSourceManagerLocalresourceId - identifies the resource requesting the MD5; any change to any package version in any of the
resource's subscribed repos will determine the MD5
ContentSourceManagerLocal.getPackageVersionMetadata(int, PageControl)
public long outputPackageVersionBitsGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
ContentSourceManagerLocalis lazy loading then this may be the time when it is downloaded from the
remote repository.
This is the same as calling
ContentSourceManagerLocal.outputPackageVersionBitsRangeGivenResource(int, PackageDetailsKey, OutputStream, long, long) with the start/end bytes
of 0 and -1 respectively.
outputPackageVersionBitsGivenResource in interface ContentSourceManagerLocalresourceId - 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 content
public long outputPackageBitsForChildResource(int parentResourceId,
String resourceTypeName,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
ContentSourceManagerLocalis lazy loading then this may be the time when it is downloaded from the
remote repository.
outputPackageBitsForChildResource in interface ContentSourceManagerLocalparentResourceId - 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.
public long outputPackageVersionBitsRangeGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream,
long startByte,
long endByte)
ContentSourceManagerLocalis lazy loading then this may be the time when it is downloaded from the
remote repository.
outputPackageVersionBitsRangeGivenResource in interface ContentSourceManagerLocalresourceId - 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)
public long outputPackageVersionBits(org.rhq.core.domain.content.PackageVersion packageVersion,
OutputStream outputStream)
ContentSourceManagerLocalis lazy loading then this may be the time when it is downloaded from the
remote repository.
outputPackageVersionBits in interface ContentSourceManagerLocalpackageVersion - 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.
public long outputPackageVersionBits(org.rhq.core.domain.content.PackageVersion packageVersion,
OutputStream outputStream,
long startByte,
long endByte)
ContentSourceManagerLocalis lazy loading then this may be the time when it is downloaded from the
remote repository.
outputPackageVersionBits in interface ContentSourceManagerLocalpackageVersion - 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 index
public boolean downloadPackageBits(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
ContentSourceManagerLocal
downloadPackageBits in interface ContentSourceManagerLocal
public long outputDistributionFileBits(org.rhq.core.domain.content.DistributionFile distFile,
OutputStream outputStream)
ContentSourceManagerLocal
outputDistributionFileBits in interface ContentSourceManagerLocaldistFile - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||