public class RepoManagerBean extends Object implements RepoManagerLocal, RepoManagerRemote
| Constructor and Description |
|---|
RepoManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
addContentSourcesToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds) |
void |
addPackageVersionsToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] packageVersionIds)
Associates the package versions (identified by their IDs) to the given repo (also identified by its ID).
|
void |
addRepoRelationship(org.rhq.core.domain.auth.Subject subject,
int repoId,
int relatedRepoId,
String relationshipTypeName)
Creates a relationship between two repos.
|
String |
calculateSyncStatus(org.rhq.core.domain.auth.Subject subject,
int repoId)
Get the overall sync status of this Repository.
|
void |
cancelSync(org.rhq.core.domain.auth.Subject subject,
int repoId)
Cancel any running sync job for the given repo
|
org.rhq.core.domain.content.Repo |
createRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
Creates a new
Repo. |
org.rhq.core.domain.content.RepoGroup |
createRepoGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.RepoGroup repoGroup)
Creates a new
RepoGroup in the server. |
void |
deleteCandidatesWithOnlyContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
Removes candidate repos whose only content source is the indicated content source.
|
boolean |
deletePackageVersionsFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] packageVersionIds)
Deletes package versions from a repo if they are not referenced by
a content source.
|
void |
deleteRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
Deletes the indicated repo.
|
void |
deleteRepoGroup(org.rhq.core.domain.auth.Subject subject,
int repoGroupId)
Deletes the indicated repo group.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Advisory> |
findAssociatedAdvisory(org.rhq.core.domain.auth.Subject subject,
int repoid,
org.rhq.core.domain.util.PageControl pc) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSource> |
findAssociatedContentSources(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Distribution> |
findAssociatedDistributions(org.rhq.core.domain.auth.Subject subject,
int repoid,
org.rhq.core.domain.util.PageControl pc) |
List<org.rhq.core.domain.content.composite.RepoComposite> |
findAvailableResourceSubscriptions(int resourceId)
Gets all repos that aren't subscribed to for the given resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.RepoComposite> |
findAvailableResourceSubscriptions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
Gets all repos that aren't subscribed to for the given resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> |
findPackageVersionsInRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
Returns the set of package versions that can currently be accessed via the given repo.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> |
findPackageVersionsInRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
String filter,
org.rhq.core.domain.util.PageControl pc)
Returns the set of package versions that can currently be accessed via the given repo.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> |
findPackageVersionsInRepoByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageVersionCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> |
findRepos(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
Returns all imported repos in the server.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> |
findReposByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.RepoCriteria criteria)
Returns all repos that match the given criteria.
|
List<org.rhq.core.domain.content.composite.RepoComposite> |
findResourceSubscriptions(int resourceId)
Gets all repos that are subscribed to by the given resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.RepoComposite> |
findResourceSubscriptions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
Gets all repos that are subscribed to by the given resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> |
findSubscribedResources(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
Gets all resources that are subscribed to the given repo.
|
List<org.rhq.core.domain.content.transfer.SubscribedRepo> |
findSubscriptions(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Gets all repos that are subscribed to by the given resource.
|
long |
getAdvisoryCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId) |
long |
getDistributionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId) |
org.rhq.core.domain.content.PackageVersion |
getLatestPackageVersion(org.rhq.core.domain.auth.Subject subject,
int packageId,
int repoId)
Returns the latest package version of the supplied package.
|
org.rhq.core.domain.content.RepoSyncResults |
getMostRecentSyncResults(org.rhq.core.domain.auth.Subject subject,
int repoId)
Get the most recent RepoSyncResults for this Repo
|
byte[] |
getPackageVersionBytes(org.rhq.core.domain.auth.Subject subject,
int repoId,
int packageVersionId)
This method allows for downloading the bytes of an arbitrary package version.
|
long |
getPackageVersionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId) |
long |
getPackageVersionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
String filter,
int repoId) |
org.rhq.core.domain.content.Repo |
getRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
Returns the repo with the given id; throws an error if one does not exist at that id.
|
List<org.rhq.core.domain.content.Repo> |
getRepoByName(String name)
Returns all repos that match the given name.
|
org.rhq.core.domain.content.RepoGroup |
getRepoGroup(org.rhq.core.domain.auth.Subject subject,
int repoGroupId)
Returns the repo group with the given id; throws an error if one does not exist at that id.
|
org.rhq.core.domain.content.RepoGroup |
getRepoGroupByName(String name)
Returns the repo group with the given name if it exists.
|
org.rhq.core.domain.content.RepoGroupType |
getRepoGroupTypeByName(org.rhq.core.domain.auth.Subject subject,
String name)
Returns the repo group type with the given name.
|
org.rhq.core.domain.content.RepoSyncResults |
getRepoSyncResults(int resultsId)
Returns the full sync results object.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.RepoSyncResults> |
getRepoSyncResults(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
Allows the caller to page through a list of historical sync results for a content source.
|
void |
importCandidateRepo(org.rhq.core.domain.auth.Subject subject,
List<Integer> repoIds)
Changes the specified repos from being candidates in the system into full blown repositories,
allowing their packages to be syncced and resources to subscribe to them.
|
int |
internalSynchronizeRepos(org.rhq.core.domain.auth.Subject subject,
Integer[] repoIds)
Performs the actual synchronization of the given repos.
|
org.rhq.core.domain.content.RepoSyncResults |
mergeRepoSyncResults(org.rhq.core.domain.content.RepoSyncResults results)
Updates an existing sync results object.
|
org.rhq.core.domain.content.RepoSyncResults |
persistRepoSyncResults(org.rhq.core.domain.content.RepoSyncResults results)
Creates a new sync results object.
|
void |
processRepoImportReport(org.rhq.core.domain.auth.Subject subject,
RepoImportReport report,
int contentSourceId,
StringBuilder result)
Handles a repo report from a content source, adding and removing candidate repos as necessary into the
database.
|
void |
removeContentSourcesFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds) |
void |
removeOwnershipOfSubject(int subjectId)
When a user gets deleted, all of his/her repos remain intact but become
unassigned to any user.
|
void |
simpleAddContentSourcesToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
Associates content sources with the given repo.
|
void |
subscribeResourceToRepos(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] repoIds)
Subscribes the identified resource to the set of identified repos.
|
int |
synchronizeRepos(org.rhq.core.domain.auth.Subject subject,
int[] repoIds)
Schedules jobs to synchronize the content associated with the repoIds passed in.
|
void |
unsubscribeResourceFromRepos(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] repoIds)
Unsubscribes the identified resource from the set of identified repos.
|
org.rhq.core.domain.content.Repo |
updateRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
Update an existing
Repo object's basic fields, like name, description, etc. |
public void deleteRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
RepoManagerRemotedeleteRepo in interface RepoManagerLocaldeleteRepo in interface RepoManagerRemotesubject - The logged in user's subject.repoId - identifies the repo to deleteRepoManagerRemote.deleteRepo(Subject, int)public void deleteRepoGroup(org.rhq.core.domain.auth.Subject subject,
int repoGroupId)
RepoManagerLocaldeleteRepoGroup in interface RepoManagerLocalsubject - user deleting the grouprepoGroupId - identifies the group being deletedpublic boolean deletePackageVersionsFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] packageVersionIds)
RepoManagerRemoteThe package versions themselves are not deleted until some content source or repository is deleted at which point orphans detection is performed.
deletePackageVersionsFromRepo in interface RepoManagerLocaldeletePackageVersionsFromRepo in interface RepoManagerRemoteRepoManagerRemote#deletePackageVersionsFromRepo(Subject, int, int)public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> findRepos(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
RepoManagerRemotefindRepos in interface RepoManagerLocalfindRepos in interface RepoManagerRemotesubject - user making the requestpc - used for paginationRepoManagerRemote.findRepos(Subject, PageControl)public org.rhq.core.domain.content.Repo getRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
RepoManagerRemotegetRepo in interface RepoManagerLocalgetRepo in interface RepoManagerRemotesubject - user whose permissions will be checked for access to the reporepoId - identifies the repo to be retrievedRepoManagerRemote.getRepo(Subject, int)public org.rhq.core.domain.content.RepoGroup getRepoGroup(org.rhq.core.domain.auth.Subject subject,
int repoGroupId)
RepoManagerLocalgetRepoGroup in interface RepoManagerLocalsubject - user whose permissions will be checked for access to the reporepoGroupId - identifies the repo group to be retrievedpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.ContentSource> findAssociatedContentSources(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
findAssociatedContentSources in interface RepoManagerLocalpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findSubscribedResources(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
RepoManagerRemotefindSubscribedResources in interface RepoManagerLocalfindSubscribedResources in interface RepoManagerRemotesubject - The logged in user's subject.RepoManagerRemote.findSubscribedResources(Subject, int, PageControl)public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.RepoComposite> findResourceSubscriptions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
RepoManagerLocalfindResourceSubscriptions in interface RepoManagerLocalpublic List<org.rhq.core.domain.content.transfer.SubscribedRepo> findSubscriptions(org.rhq.core.domain.auth.Subject subject, int resourceId)
RepoManagerLocalfindSubscriptions in interface RepoManagerLocalfindSubscriptions in interface RepoManagerRemotesubject - The logged in user's subject.resourceId - The id of the resource.public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.RepoComposite> findAvailableResourceSubscriptions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
RepoManagerLocalfindAvailableResourceSubscriptions in interface RepoManagerLocalpublic List<org.rhq.core.domain.content.composite.RepoComposite> findResourceSubscriptions(int resourceId)
RepoManagerLocalfindResourceSubscriptions in interface RepoManagerLocalpublic List<org.rhq.core.domain.content.composite.RepoComposite> findAvailableResourceSubscriptions(int resourceId)
RepoManagerLocalfindAvailableResourceSubscriptions in interface RepoManagerLocalpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> findPackageVersionsInRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
RepoManagerLocalfindPackageVersionsInRepo in interface RepoManagerLocalsubject - user asking to perform thisrepoId - identifies the repopc - pagination controlspublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> findPackageVersionsInRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
String filter,
org.rhq.core.domain.util.PageControl pc)
RepoManagerRemotefindPackageVersionsInRepo in interface RepoManagerLocalfindPackageVersionsInRepo in interface RepoManagerRemotesubject - The logged in user's subject.repoId - identifies the repofilter - A repo filter.pc - pagination controlsRepoManagerRemote.findPackageVersionsInRepo(Subject, int, String, PageControl)public org.rhq.core.domain.content.PackageVersion getLatestPackageVersion(org.rhq.core.domain.auth.Subject subject,
int packageId,
int repoId)
RepoManagerRemotePackageVersion.DEFAULT_COMPARATOR
getLatestPackageVersion in interface RepoManagerLocalgetLatestPackageVersion in interface RepoManagerRemotesubject - the authenticated userpackageId - the id of the package to find the latest version for.repoId - the repo where to take the package versions of the package fromRepoManagerRemote.getLatestPackageVersion(Subject, int, int)public org.rhq.core.domain.content.Repo updateRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
throws RepoException
RepoManagerRemoteRepo object's basic fields, like name, description, etc. Note that the given
repo's relationships will be ignored and not merged with the existing repo (e.g. is subscribed
resources will not be changed, regardless of what the given repo's subscribed resources set it).updateRepo in interface RepoManagerLocalupdateRepo in interface RepoManagerRemotesubject - The logged in user's subject.repo - to be updatedRepoExceptionRepoManagerRemote.updateRepo(Subject, Repo)public org.rhq.core.domain.content.Repo createRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
throws RepoException
RepoManagerRemoteRepo. Note that the created repo will not have any content sources assigned and no
resources will be subscribed. It is a virgin repo.createRepo in interface RepoManagerLocalcreateRepo in interface RepoManagerRemotesubject - The logged in user's subject.repo - a new repo object.RepoException - if a repo already exists with the same nameRepoManagerRemote.createRepo(Subject, Repo)public void deleteCandidatesWithOnlyContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
RepoManagerLocaldeleteCandidatesWithOnlyContentSource in interface RepoManagerLocalsubject - user performing the deletecontentSourceId - identifies the content sourcepublic void processRepoImportReport(org.rhq.core.domain.auth.Subject subject,
RepoImportReport report,
int contentSourceId,
StringBuilder result)
RepoManagerLocalprocessRepoImportReport in interface RepoManagerLocalsubject - user triggering the report processingreport - cannot be nullcontentSourceId - identifies the content source thatresult - buffer used to store the results of dealing with the reportpublic void importCandidateRepo(org.rhq.core.domain.auth.Subject subject,
List<Integer> repoIds)
throws RepoException
RepoManagerLocalimportCandidateRepo in interface RepoManagerLocalsubject - user performing the importrepoIds - the repos being imported; they must refer to repos in the database and must be flagged
as candidates (i.e. an error will occur if an already imported repo is specified)RepoException - if one or more of the repo IDs does not exist in the DB or is not a candidatepublic void removeOwnershipOfSubject(int subjectId)
RepoManagerLocalThis method therefore sets the owner of all repos owned by provided subject to null.
removeOwnershipOfSubject in interface RepoManagerLocalpublic org.rhq.core.domain.content.RepoGroup createRepoGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.RepoGroup repoGroup)
throws RepoException
RepoManagerLocalRepoGroup in the server.createRepoGroup in interface RepoManagerLocalsubject - represents the user creating the grouprepoGroup - group data to createRepoException - if a repo group already exists with this namepublic List<org.rhq.core.domain.content.Repo> getRepoByName(String name)
RepoManagerLocalgetRepoByName in interface RepoManagerLocalname - name of the repo to matchpublic org.rhq.core.domain.content.RepoGroup getRepoGroupByName(String name)
RepoManagerLocalgetRepoGroupByName in interface RepoManagerLocalname - name of the repo group to matchnull if one does notpublic org.rhq.core.domain.content.RepoGroupType getRepoGroupTypeByName(org.rhq.core.domain.auth.Subject subject,
String name)
RepoManagerLocalgetRepoGroupTypeByName in interface RepoManagerLocalsubject - user whose permissions will be checked for access to the group typename - identifies the repo group typenull if no group is found with the namepublic void addContentSourcesToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
throws Exception
addContentSourcesToRepo in interface RepoManagerLocalExceptionpublic void simpleAddContentSourcesToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
throws Exception
RepoManagerLocalRepoManagerLocal.addContentSourcesToRepo(Subject, int, int[]),
no further operations will be performed, such as any initial synchronization or initialization.
This should only be used for test purposes.simpleAddContentSourcesToRepo in interface RepoManagerLocalsubject - may not be nullrepoId - must refer to a valid repo in the systemcontentSourceIds - may not be nullException - if there is an error making the associationpublic void addPackageVersionsToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] packageVersionIds)
RepoManagerRemoteaddPackageVersionsToRepo in interface RepoManagerLocaladdPackageVersionsToRepo in interface RepoManagerRemotesubject - The logged in user's subject.repoId - the ID of the repopackageVersionIds - the list of package version IDs to add to the repoRepoManagerRemote.addPackageVersionsToRepo(Subject, int, int[])public void removeContentSourcesFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
throws RepoException
removeContentSourcesFromRepo in interface RepoManagerLocalRepoExceptionpublic void subscribeResourceToRepos(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] repoIds)
RepoManagerRemotesubscribeResourceToRepos in interface RepoManagerLocalsubscribeResourceToRepos in interface RepoManagerRemotesubject - The logged in user's subject.resourceId - The id of the resource to be subscribed.repoIds - A list of repos to which the resource is subscribed.RepoManagerRemote.subscribeResourceToRepos(Subject, int, int[])public void unsubscribeResourceFromRepos(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] repoIds)
RepoManagerRemoteunsubscribeResourceFromRepos in interface RepoManagerLocalunsubscribeResourceFromRepos in interface RepoManagerRemotesubject - The logged in user's subject.resourceId - The id of the resource to be subscribed.repoIds - A list of repos to which the resource is subscribed.RepoManagerRemote.unsubscribeResourceFromRepos(Subject, int, int[])public long getPackageVersionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
String filter,
int repoId)
public long getPackageVersionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
getPackageVersionCountFromRepo in interface RepoManagerLocalpublic org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Repo> findReposByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.RepoCriteria criteria)
RepoManagerRemotefindReposByCriteria in interface RepoManagerLocalfindReposByCriteria in interface RepoManagerRemotesubject - user making the querycriteria - describes how the query should function; may not be nullRepoManagerRemote.findPackageVersionsInRepoByCriteria(Subject, PackageVersionCriteria)public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> findPackageVersionsInRepoByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.PackageVersionCriteria criteria)
findPackageVersionsInRepoByCriteria in interface RepoManagerLocalfindPackageVersionsInRepoByCriteria in interface RepoManagerRemotecriteria - Caller must add a valid repoId via PackageVersionCriteria.addFilterRepoId(Integer)}RepoManagerRemote.findPackageVersionsInRepo(Subject, int, String, PageControl)public void addRepoRelationship(org.rhq.core.domain.auth.Subject subject,
int repoId,
int relatedRepoId,
String relationshipTypeName)
RepoManagerLocalrepoId as being the source
of the relationship and relatedRepoId as being the destination or target of it.addRepoRelationship in interface RepoManagerLocalsubject - user making the relationshiprepoId - must reference a valid repo in the system the user has permissions to accessrelatedRepoId - must reference a valid repo in the system the user has permissions to accessrelationshipTypeName - must identify an existing relationship in the databasepublic byte[] getPackageVersionBytes(org.rhq.core.domain.auth.Subject subject,
int repoId,
int packageVersionId)
RepoManagerRemotegetPackageVersionBytes in interface RepoManagerLocalgetPackageVersionBytes in interface RepoManagerRemotepublic long getDistributionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Distribution> findAssociatedDistributions(org.rhq.core.domain.auth.Subject subject,
int repoid,
org.rhq.core.domain.util.PageControl pc)
findAssociatedDistributions in interface RepoManagerLocalRepoManagerRemote#findAssociatedDistributions(Subject, int, PageControl)public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Advisory> findAssociatedAdvisory(org.rhq.core.domain.auth.Subject subject,
int repoid,
org.rhq.core.domain.util.PageControl pc)
findAssociatedAdvisory in interface RepoManagerLocalRepoManagerRemote#findAssociatedAdvisory(Subject, int, PageControl)public long getAdvisoryCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
public String calculateSyncStatus(org.rhq.core.domain.auth.Subject subject, int repoId)
RepoManagerLocalcalculateSyncStatus in interface RepoManagerLocalsubject - callerrepoId - to calc status forpublic org.rhq.core.domain.content.RepoSyncResults getMostRecentSyncResults(org.rhq.core.domain.auth.Subject subject,
int repoId)
RepoManagerLocalgetMostRecentSyncResults in interface RepoManagerLocalsubject - callerrepoId - to fetch most recent sync results forpublic int synchronizeRepos(org.rhq.core.domain.auth.Subject subject,
int[] repoIds)
throws Exception
RepoManagerLocalsynchronizeRepos in interface RepoManagerLocalsynchronizeRepos in interface RepoManagerRemoterepoIds - to synchronize; may not be nullException - if there is an error connecting with the plugin containerpublic int internalSynchronizeRepos(org.rhq.core.domain.auth.Subject subject,
Integer[] repoIds)
throws InterruptedException
RepoManagerLocalinternalSynchronizeRepos in interface RepoManagerLocalsubject - user performing the syncrepoIds - identifies all repos to be synccedInterruptedExceptionpublic void cancelSync(org.rhq.core.domain.auth.Subject subject,
int repoId)
throws ContentException
RepoManagerLocalcancelSync in interface RepoManagerLocalrepoId - you want to cancel the sync forContentExceptionpublic org.rhq.core.domain.content.RepoSyncResults persistRepoSyncResults(org.rhq.core.domain.content.RepoSyncResults results)
RepoManagerLocalnull 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.persistRepoSyncResults in interface RepoManagerLocalresults - the results that should be persistednull if another sync is currently inprogress.public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.RepoSyncResults> getRepoSyncResults(org.rhq.core.domain.auth.Subject subject,
int repoId,
org.rhq.core.domain.util.PageControl pc)
RepoManagerLocalgetRepoSyncResults in interface RepoManagerLocalsubject - user asking to perform thispc - pagination controlspublic org.rhq.core.domain.content.RepoSyncResults mergeRepoSyncResults(org.rhq.core.domain.content.RepoSyncResults results)
RepoManagerLocal#persistContentRepoSyncResults(RepoSyncResults) for that.mergeRepoSyncResults in interface RepoManagerLocalresults - the existing results that should be or mergedpublic org.rhq.core.domain.content.RepoSyncResults getRepoSyncResults(int resultsId)
RepoManagerLocalgetRepoSyncResults in interface RepoManagerLocalresultsId - the ID of the object to returnCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.