public interface RepoManagerLocal
| 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) |
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) |
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[] packageVersionId) |
void |
deleteRepo(org.rhq.core.domain.auth.Subject subject,
int repoId) |
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) |
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) |
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) |
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) |
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.
|
org.rhq.core.domain.content.PackageVersion |
getLatestPackageVersion(org.rhq.core.domain.auth.Subject subject,
int packageId,
int repoId) |
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 user,
int repoId,
int packageVersionId) |
long |
getPackageVersionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId) |
org.rhq.core.domain.content.Repo |
getRepo(org.rhq.core.domain.auth.Subject subject,
int repoId) |
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) |
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) |
org.rhq.core.domain.content.Repo |
updateRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo) |
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)
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.composite.RepoComposite> findResourceSubscriptions(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
subject - resourceId - pc - 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)
subject - resourceId - pc - List<org.rhq.core.domain.content.composite.RepoComposite> findResourceSubscriptions(int resourceId)
resourceId - List<org.rhq.core.domain.content.composite.RepoComposite> findAvailableResourceSubscriptions(int resourceId)
resourceId - 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)
subject - user asking to perform thisrepoId - identifies the repopc - pagination controlsorg.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)
boolean deletePackageVersionsFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] packageVersionId)
RepoManagerRemote#deletePackageVersionsFromRepo(Subject, int, int)org.rhq.core.domain.content.PackageVersion getLatestPackageVersion(org.rhq.core.domain.auth.Subject subject,
int packageId,
int repoId)
String calculateSyncStatus(org.rhq.core.domain.auth.Subject subject, int repoId)
subject - callerrepoId - to calc status forvoid addContentSourcesToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
throws Exception
Exceptionvoid simpleAddContentSourcesToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
throws Exception
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.subject - may not be nullrepoId - must refer to a valid repo in the systemcontentSourceIds - may not be nullException - if there is an error making the associationvoid removeContentSourcesFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] contentSourceIds)
throws RepoException
RepoExceptionlong getPackageVersionCountFromRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
void addRepoRelationship(org.rhq.core.domain.auth.Subject subject,
int repoId,
int relatedRepoId,
String relationshipTypeName)
repoId as being the source
of the relationship and relatedRepoId as being the destination or target of it.subject - 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 databasevoid deleteCandidatesWithOnlyContentSource(org.rhq.core.domain.auth.Subject subject,
int contentSourceId)
subject - user performing the deletecontentSourceId - identifies the content sourcevoid processRepoImportReport(org.rhq.core.domain.auth.Subject subject,
RepoImportReport report,
int contentSourceId,
StringBuilder result)
subject - user triggering the report processingreport - cannot be nullcontentSourceId - identifies the content source thatresult - buffer used to store the results of dealing with the reportvoid importCandidateRepo(org.rhq.core.domain.auth.Subject subject,
List<Integer> repoIds)
throws RepoException
subject - 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 candidatevoid removeOwnershipOfSubject(int subjectId)
This method therefore sets the owner of all repos owned by provided subject to null.
subjectId - void addPackageVersionsToRepo(org.rhq.core.domain.auth.Subject subject,
int repoId,
int[] packageVersionIds)
org.rhq.core.domain.content.Repo createRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
throws RepoException
RepoExceptionRepoManagerRemote.createRepo(Subject, Repo)void deleteRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
org.rhq.core.domain.content.RepoGroup createRepoGroup(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.RepoGroup repoGroup)
throws RepoException
RepoGroup in the server.subject - represents the user creating the grouprepoGroup - group data to createRepoException - if a repo group already exists with this namevoid deleteRepoGroup(org.rhq.core.domain.auth.Subject subject,
int repoGroupId)
subject - user deleting the grouprepoGroupId - identifies the group being deletedorg.rhq.core.domain.content.Repo getRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
org.rhq.core.domain.content.RepoGroup getRepoGroup(org.rhq.core.domain.auth.Subject subject,
int repoGroupId)
subject - user whose permissions will be checked for access to the reporepoGroupId - identifies the repo group to be retrievedorg.rhq.core.domain.content.RepoGroupType getRepoGroupTypeByName(org.rhq.core.domain.auth.Subject subject,
String name)
subject - user whose permissions will be checked for access to the group typename - identifies the repo group typenull if no group is found with the nameList<org.rhq.core.domain.content.Repo> getRepoByName(String name)
name - name of the repo to matchorg.rhq.core.domain.content.RepoGroup getRepoGroupByName(String name)
name - name of the repo group to matchnull if one does notorg.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)
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)
void subscribeResourceToRepos(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] repoIds)
void unsubscribeResourceFromRepos(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] repoIds)
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)
org.rhq.core.domain.content.Repo updateRepo(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
throws RepoException
RepoExceptionRepoManagerRemote.updateRepo(Subject, Repo)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)
RepoManagerRemote#findAssociatedDistributions(Subject, int, PageControl)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)
RepoManagerRemote#findAssociatedAdvisory(Subject, int, PageControl)int synchronizeRepos(org.rhq.core.domain.auth.Subject subject,
int[] repoIds)
throws Exception
repoIds - to synchronize; may not be nullException - if there is an error connecting with the plugin containerint internalSynchronizeRepos(org.rhq.core.domain.auth.Subject subject,
Integer[] repoIds)
throws InterruptedException
subject - user performing the syncrepoIds - identifies all repos to be synccedException - if any errors occurInterruptedExceptionvoid cancelSync(org.rhq.core.domain.auth.Subject subject,
int repoId)
throws ContentException
repoId - you want to cancel the sync forContentExceptionorg.rhq.core.domain.content.RepoSyncResults persistRepoSyncResults(org.rhq.core.domain.content.RepoSyncResults 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.RepoSyncResults mergeRepoSyncResults(org.rhq.core.domain.content.RepoSyncResults results)
#persistContentRepoSyncResults(RepoSyncResults) for that.results - the existing results that should be or mergedorg.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)
subject - user asking to perform thiscontentSourceId - The id of a content source.pc - pagination controlsorg.rhq.core.domain.content.RepoSyncResults getRepoSyncResults(int resultsId)
resultsId - the ID of the object to returnorg.rhq.core.domain.content.RepoSyncResults getMostRecentSyncResults(org.rhq.core.domain.auth.Subject subject,
int repoId)
subject - callerrepoId - to fetch most recent sync results forList<org.rhq.core.domain.content.transfer.SubscribedRepo> findSubscriptions(org.rhq.core.domain.auth.Subject subject, int resourceId)
subject - resourceId - byte[] getPackageVersionBytes(org.rhq.core.domain.auth.Subject user,
int repoId,
int packageVersionId)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.