|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.content.RepoManagerBean
public class RepoManagerBean
| Constructor Summary | |
|---|---|
RepoManagerBean()
|
|
| Method Summary | |
|---|---|
void |
addContentSourcesToRepo(Subject subject,
int repoId,
int[] contentSourceIds)
|
void |
addPackageVersionsToRepo(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(Subject subject,
int repoId,
int relatedRepoId,
java.lang.String relationshipTypeName)
Creates a relationship between two repos. |
java.lang.String |
calculateSyncStatus(Subject subject,
int repoId)
Get the overall sync status of this Repository. |
Repo |
createCandidateRepo(Subject subject,
Repo repo)
Functions similar to RepoManagerRemote.createRepo(Subject, Repo) except that it will ensure
the candidate bit on the repo parameter is correctly set. |
Repo |
createRepo(Subject subject,
Repo repo)
Creates a new Repo. |
RepoGroup |
createRepoGroup(Subject subject,
RepoGroup repoGroup)
Creates a new RepoGroup in the server. |
void |
deleteCandidatesWithOnlyContentSource(Subject subject,
int contentSourceId)
Removes candidate repos whose only content source is the indicated content source. |
void |
deleteRepo(Subject subject,
int repoId)
Deletes the indicated repo. |
void |
deleteRepoGroup(Subject subject,
int repoGroupId)
Deletes the indicated repo group. |
PageList<ContentSource> |
findAssociatedContentSources(Subject subject,
int repoId,
PageControl pc)
|
PageList<Distribution> |
findAssociatedDistributions(Subject subject,
int repoid,
PageControl pc)
gets a list of all associated distributions |
java.util.List<RepoComposite> |
findAvailableResourceSubscriptions(int resourceId)
Gets all repos that aren't subscribed to for the given resource. |
PageList<RepoComposite> |
findAvailableResourceSubscriptions(Subject subject,
int resourceId,
PageControl pc)
Gets all repos that aren't subscribed to for the given resource. |
PageList<PackageVersion> |
findPackageVersionsInRepo(Subject subject,
int repoId,
PageControl pc)
Returns the set of package versions that can currently be accessed via the given repo. |
PageList<PackageVersion> |
findPackageVersionsInRepo(Subject subject,
int repoId,
java.lang.String filter,
PageControl pc)
Returns the set of package versions that can currently be accessed via the given repo. |
PageList<PackageVersion> |
findPackageVersionsInRepoByCriteria(Subject subject,
PackageVersionCriteria criteria)
|
PageList<Repo> |
findRepos(Subject subject,
PageControl pc)
Returns all imported repos in the server. |
PageList<Repo> |
findReposByCriteria(Subject subject,
RepoCriteria criteria)
Returns all repos that match the given criteria. |
java.util.List<RepoComposite> |
findResourceSubscriptions(int resourceId)
Gets all repos that are subscribed to by the given resource. |
PageList<RepoComposite> |
findResourceSubscriptions(Subject subject,
int resourceId,
PageControl pc)
Gets all repos that are subscribed to by the given resource. |
PageList<Resource> |
findSubscribedResources(Subject subject,
int repoId,
PageControl pc)
Gets all resources that are subscribed to the given repo. |
long |
getDistributionCountFromRepo(Subject subject,
int repoId)
|
long |
getPackageVersionCountFromRepo(Subject subject,
int repoId)
|
long |
getPackageVersionCountFromRepo(Subject subject,
java.lang.String filter,
int repoId)
|
Repo |
getRepo(Subject subject,
int repoId)
Returns the repo with the given id; throws an error if one does not exist at that id. |
java.util.List<Repo> |
getRepoByName(java.lang.String name)
Returns all repos that match the given name. |
RepoGroup |
getRepoGroup(Subject subject,
int repoGroupId)
Returns the repo group with the given id; throws an error if one does not exist at that id. |
RepoGroup |
getRepoGroupByName(java.lang.String name)
Returns the repo group with the given name if it exists. |
RepoGroupType |
getRepoGroupTypeByName(Subject subject,
java.lang.String name)
Returns the repo group type with the given name. |
void |
importCandidateRepo(Subject subject,
java.util.List<java.lang.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. |
void |
processRepoImportReport(Subject subject,
RepoImportReport report,
int contentSourceId,
java.lang.StringBuilder result)
Handles a repo report from a content provider, adding and removing candidate repos as necessary into the database. |
void |
removeContentSourcesFromRepo(Subject subject,
int repoId,
int[] contentSourceIds)
|
void |
subscribeResourceToRepos(Subject subject,
int resourceId,
int[] repoIds)
Subscribes the identified resource to the set of identified repos. |
int |
synchronizeRepos(Subject subject,
java.lang.Integer[] repoIds)
Syncronize the content associated with the repoIds passed in. |
void |
unsubscribeResourceFromRepos(Subject subject,
int resourceId,
int[] repoIds)
Unsubscribes the identified resource from the set of identified repos. |
Repo |
updateRepo(Subject subject,
Repo repo)
Update an existing Repo object's basic fields, like name, description, etc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepoManagerBean()
| Method Detail |
|---|
public void deleteRepo(Subject subject,
int repoId)
RepoManagerRemote
deleteRepo in interface RepoManagerLocaldeleteRepo in interface RepoManagerRemotesubject - The logged in user's subject.repoId - identifies the repo to deleteRepoManagerRemote.deleteRepo(Subject, int)
public void deleteRepoGroup(Subject subject,
int repoGroupId)
RepoManagerRemote
deleteRepoGroup in interface RepoManagerLocaldeleteRepoGroup in interface RepoManagerRemotesubject - user deleting the grouprepoGroupId - identifies the group being deletedRepoManagerRemote.deleteRepoGroup(Subject, int)
public PageList<Repo> findRepos(Subject subject,
PageControl pc)
RepoManagerRemote
findRepos in interface RepoManagerLocalfindRepos in interface RepoManagerRemotesubject - user making the requestpc - used for pagination
RepoManagerRemote.findRepos(Subject, PageControl)
public Repo getRepo(Subject subject,
int repoId)
RepoManagerRemote
getRepo in interface RepoManagerLocalgetRepo in interface RepoManagerRemotesubject - user whose permissions will be checked for access to the reporepoId - identifies the repo to be retrieved
RepoManagerRemote.getRepo(Subject, int)
public RepoGroup getRepoGroup(Subject subject,
int repoGroupId)
RepoManagerRemote
getRepoGroup in interface RepoManagerLocalgetRepoGroup in interface RepoManagerRemotesubject - user whose permissions will be checked for access to the reporepoGroupId - identifies the repo group to be retrieved
RepoManagerRemote.getRepoGroup(Subject, int)
public PageList<ContentSource> findAssociatedContentSources(Subject subject,
int repoId,
PageControl pc)
findAssociatedContentSources in interface RepoManagerLocal
public PageList<Resource> findSubscribedResources(Subject subject,
int repoId,
PageControl pc)
RepoManagerRemote
findSubscribedResources in interface RepoManagerLocalfindSubscribedResources in interface RepoManagerRemotesubject - The logged in user's subject.
RepoManagerRemote.findSubscribedResources(Subject, int, PageControl)
public PageList<RepoComposite> findResourceSubscriptions(Subject subject,
int resourceId,
PageControl pc)
RepoManagerLocal
findResourceSubscriptions in interface RepoManagerLocal
public PageList<RepoComposite> findAvailableResourceSubscriptions(Subject subject,
int resourceId,
PageControl pc)
RepoManagerLocal
findAvailableResourceSubscriptions in interface RepoManagerLocalpublic java.util.List<RepoComposite> findResourceSubscriptions(int resourceId)
RepoManagerLocal
findResourceSubscriptions in interface RepoManagerLocalpublic java.util.List<RepoComposite> findAvailableResourceSubscriptions(int resourceId)
RepoManagerLocal
findAvailableResourceSubscriptions in interface RepoManagerLocal
public PageList<PackageVersion> findPackageVersionsInRepo(Subject subject,
int repoId,
PageControl pc)
RepoManagerLocal
findPackageVersionsInRepo in interface RepoManagerLocalsubject - user asking to perform thisrepoId - identifies the repopc - pagination controls
public PageList<PackageVersion> findPackageVersionsInRepo(Subject subject,
int repoId,
java.lang.String filter,
PageControl pc)
RepoManagerRemote
findPackageVersionsInRepo in interface RepoManagerLocalfindPackageVersionsInRepo in interface RepoManagerRemotesubject - The logged in user's subject.repoId - identifies the repofilter - A repo filter.pc - pagination controls
RepoManagerRemote.findPackageVersionsInRepo(Subject, int, String, PageControl)
public Repo updateRepo(Subject subject,
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 updated
RepoExceptionRepoManagerRemote.updateRepo(Subject, Repo)
public Repo createRepo(Subject subject,
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 Repo createCandidateRepo(Subject subject,
Repo repo)
throws RepoException
RepoManagerLocalRepoManagerRemote.createRepo(Subject, Repo) except that it will ensure
the candidate bit on the repo parameter is correctly set.
createCandidateRepo in interface RepoManagerLocalsubject - user creating the reporepo - repo data to create
RepoException - if the repo contains invalid data
public void deleteCandidatesWithOnlyContentSource(Subject subject,
int contentSourceId)
RepoManagerLocal
deleteCandidatesWithOnlyContentSource in interface RepoManagerLocalsubject - user performing the deletecontentSourceId - identifies the content source
public void processRepoImportReport(Subject subject,
RepoImportReport report,
int contentSourceId,
java.lang.StringBuilder result)
RepoManagerLocal
processRepoImportReport 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 report
public void importCandidateRepo(Subject subject,
java.util.List<java.lang.Integer> repoIds)
throws RepoException
RepoManagerLocal
importCandidateRepo 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 candidate
public RepoGroup createRepoGroup(Subject subject,
RepoGroup repoGroup)
throws RepoException
RepoManagerRemoteRepoGroup in the server.
createRepoGroup in interface RepoManagerLocalcreateRepoGroup in interface RepoManagerRemotesubject - represents the user creating the grouprepoGroup - group data to create
RepoException - if a repo group already exists with this nameRepoManagerRemote.createRepoGroup(Subject, RepoGroup)public java.util.List<Repo> getRepoByName(java.lang.String name)
RepoManagerLocal
getRepoByName in interface RepoManagerLocalname - name of the repo to match
public RepoGroup getRepoGroupByName(java.lang.String name)
RepoManagerLocal
getRepoGroupByName in interface RepoManagerLocalname - name of the repo group to match
null if one does not
public RepoGroupType getRepoGroupTypeByName(Subject subject,
java.lang.String name)
RepoManagerRemote
getRepoGroupTypeByName in interface RepoManagerLocalgetRepoGroupTypeByName in interface RepoManagerRemotesubject - user whose permissions will be checked for access to the group typename - identifies the repo group type
null if no group is found with the nameRepoManagerRemote.getRepoGroupTypeByName(Subject, String)
public void addContentSourcesToRepo(Subject subject,
int repoId,
int[] contentSourceIds)
throws java.lang.Exception
addContentSourcesToRepo in interface RepoManagerLocaljava.lang.Exception
public void addPackageVersionsToRepo(Subject subject,
int repoId,
int[] packageVersionIds)
RepoManagerRemote
addPackageVersionsToRepo 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(Subject subject,
int repoId,
int[] contentSourceIds)
throws RepoException
removeContentSourcesFromRepo in interface RepoManagerLocalRepoException
public void subscribeResourceToRepos(Subject subject,
int resourceId,
int[] repoIds)
RepoManagerRemote
subscribeResourceToRepos 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(Subject subject,
int resourceId,
int[] repoIds)
RepoManagerRemote
unsubscribeResourceFromRepos 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(Subject subject,
java.lang.String filter,
int repoId)
public long getPackageVersionCountFromRepo(Subject subject,
int repoId)
getPackageVersionCountFromRepo in interface RepoManagerLocal
public PageList<Repo> findReposByCriteria(Subject subject,
RepoCriteria criteria)
RepoManagerRemote
findReposByCriteria in interface RepoManagerLocalfindReposByCriteria in interface RepoManagerRemotesubject - user making the querycriteria - describes how the query should function; may not be null
RepoManagerRemote.findPackageVersionsInRepoByCriteria(Subject, PackageVersionCriteria)
public PageList<PackageVersion> findPackageVersionsInRepoByCriteria(Subject subject,
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(Subject subject,
int repoId,
int relatedRepoId,
java.lang.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 database
public long getDistributionCountFromRepo(Subject subject,
int repoId)
public PageList<Distribution> findAssociatedDistributions(Subject subject,
int repoid,
PageControl pc)
RepoManagerRemote
findAssociatedDistributions in interface RepoManagerLocalfindAssociatedDistributions in interface RepoManagerRemoteRepoManagerRemote.findAssociatedDistributions(Subject, int, PageControl)
public java.lang.String calculateSyncStatus(Subject subject,
int repoId)
RepoManagerLocal
calculateSyncStatus in interface RepoManagerLocalsubject - callerrepoId - to calc status for
public int synchronizeRepos(Subject subject,
java.lang.Integer[] repoIds)
RepoManagerLocal
synchronizeRepos in interface RepoManagerLocalsynchronizeRepos in interface RepoManagerRemoterepoIds - to syncronize
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||