org.rhq.enterprise.server.content
Class ContentUIManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.content.ContentUIManagerBean
All Implemented Interfaces:
ContentUIManagerLocal

public class ContentUIManagerBean
extends java.lang.Object
implements ContentUIManagerLocal

Author:
Jason Dobies

Constructor Summary
ContentUIManagerBean()
           
 
Method Summary
 PageList<ContentServiceRequest> getContentRequestsWithNotStatus(Subject user, int resourceId, ContentRequestStatus status, PageControl pageControl)
          Returns a list of all content requests made against the specified resource that do not match the specified status.
 PageList<ContentServiceRequest> getContentRequestsWithStatus(Subject user, int resourceId, ContentRequestStatus status, PageControl pageControl)
          Returns a list of all content requests made against the specified resource that match the specified status.
 ContentServiceRequest getContentServiceRequest(int requestId)
          Retrieves a content request by its ID.
 InstalledPackage getInstalledPackage(int id)
          Loads the installed package identified by the ID from the database.
 InstalledPackageHistory getInstalledPackageHistory(int historyId)
          Retrieves a specific history entry by its ID.
 PageList<InstalledPackageHistory> getInstalledPackageHistory(int contentServiceRequestId, PageControl pc)
          Returns a list of installed package history entries that were created as a result of executing the indicated request.
 PageList<InstalledPackageHistory> getInstalledPackageHistory(Subject subject, int resourceId, int generalPackageId, PageControl pageControl)
           
 PageList<InstalledPackageHistory> getInstalledPackageHistoryForResource(int resourceId, PageControl pc)
          Returns a pagable list of all package events that have taken place on the given resource.
 PageList<PackageListItemComposite> getInstalledPackages(Subject user, int resourceId, java.lang.Integer packageTypeFilterId, java.lang.String packageVersionFilter, java.lang.String search, PageControl pageControl)
          Returns a list of all installed packages on the specified resource.
 java.util.List<IntegerOptionItem> getInstalledPackageTypes(Subject user, int resourceId)
           
 LoadedPackageBitsComposite getLoadedPackageBitsComposite(int packageVersionId)
          This will return a composite object that tells you if the actual content (the "bits") for a particular package version is loaded into inventory or not, and, if the content is loaded, whether or not that content is stored in the database.
 PackageInstallationStep getPackageInstallationStep(int stepId)
          Retrieves a specific step entry by its ID.
 java.util.List<PackageInstallationStep> getPackageInstallationSteps(int installedPackageHistoryId)
          Retrieves the individual steps executed during the specified package installation history.
 PackageType getPackageType(int id)
          Loads the package type identified by the ID from the database.
 java.util.List<PackageType> getPackageTypes(int resourceTypeId)
          Returns all package types that are available to the specified resource type.
 PageList<PackageType> getPackageTypes(int resourceTypeId, PageControl pageControl)
          Returns all package types that are available to the specified resource type in a page control.
 PackageVersion getPackageVersion(int packageVersionId)
          Retrieves a package version by its ID.
 java.util.List<PackageVersionComposite> getPackageVersionComposites(Subject user, int[] packageVersionIds)
          Used to retrieve information about multiple packages to display to the user.
 PageList<PackageVersionComposite> getPackageVersionComposites(Subject user, int[] packageVersionIds, PageControl pageControl)
          Used to retrieve information about multiple packages to display to the user.
 PageList<PackageVersionComposite> getPackageVersionCompositesByFilter(Subject user, int resourceId, java.lang.String filter, PageControl pc)
           
 PackageVersionComposite loadPackageVersionComposite(Subject user, int packageVersionId)
          Used to retrieve information about a package version to display to a user.
 PackageVersionComposite loadPackageVersionCompositeWithExtraProperties(Subject user, int packageVersionId)
          Used to retrieve information about a package version to display to a user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentUIManagerBean

public ContentUIManagerBean()
Method Detail

getLoadedPackageBitsComposite

public LoadedPackageBitsComposite getLoadedPackageBitsComposite(int packageVersionId)
Description copied from interface: ContentUIManagerLocal
This will return a composite object that tells you if the actual content (the "bits") for a particular package version is loaded into inventory or not, and, if the content is loaded, whether or not that content is stored in the database.

Specified by:
getLoadedPackageBitsComposite in interface ContentUIManagerLocal
Parameters:
packageVersionId - the PackageVersion identifier
Returns:
indicates if the package version content is loaded and available
See Also:
LoadedPackageBitsComposite

getInstalledPackage

public InstalledPackage getInstalledPackage(int id)
Description copied from interface: ContentUIManagerLocal
Loads the installed package identified by the ID from the database.

Specified by:
getInstalledPackage in interface ContentUIManagerLocal
Parameters:
id - identifies the installed package
Returns:
installed package if one exists; null otherwise

getPackageType

public PackageType getPackageType(int id)
Description copied from interface: ContentUIManagerLocal
Loads the package type identified by the ID from the database.

Specified by:
getPackageType in interface ContentUIManagerLocal
Parameters:
id - package type to load
Returns:
package type if one exists for the ID; null otherwise

getPackageTypes

public java.util.List<PackageType> getPackageTypes(int resourceTypeId)
Description copied from interface: ContentUIManagerLocal
Returns all package types that are available to the specified resource type.

Specified by:
getPackageTypes in interface ContentUIManagerLocal
Parameters:
resourceTypeId - identifies the resource type
Returns:
set of package types

getPackageTypes

public PageList<PackageType> getPackageTypes(int resourceTypeId,
                                             PageControl pageControl)
Description copied from interface: ContentUIManagerLocal
Returns all package types that are available to the specified resource type in a page control.

Specified by:
getPackageTypes in interface ContentUIManagerLocal
Parameters:
resourceTypeId - identifies the resource type
pageControl - paging control
Returns:
pagable list of package types

getContentRequestsWithStatus

public PageList<ContentServiceRequest> getContentRequestsWithStatus(Subject user,
                                                                    int resourceId,
                                                                    ContentRequestStatus status,
                                                                    PageControl pageControl)
Description copied from interface: ContentUIManagerLocal
Returns a list of all content requests made against the specified resource that match the specified status.

Specified by:
getContentRequestsWithStatus in interface ContentUIManagerLocal
Parameters:
user - the user who is requesting the retrieval
resourceId - identifies the resource whose requests to retrieve
status - request status being matched
pageControl - pagination controller
Returns:
list of artifact requests for the specified resource

getContentRequestsWithNotStatus

public PageList<ContentServiceRequest> getContentRequestsWithNotStatus(Subject user,
                                                                       int resourceId,
                                                                       ContentRequestStatus status,
                                                                       PageControl pageControl)
Description copied from interface: ContentUIManagerLocal
Returns a list of all content requests made against the specified resource that do not match the specified status.

Specified by:
getContentRequestsWithNotStatus in interface ContentUIManagerLocal
Parameters:
user - the user who is requesting the retrieval
resourceId - identifies the resource whose requests to retrieve
status - request status to not match
pageControl - pagination controller
Returns:
list of content requests for the specified resource

getInstalledPackages

public PageList<PackageListItemComposite> getInstalledPackages(Subject user,
                                                               int resourceId,
                                                               java.lang.Integer packageTypeFilterId,
                                                               java.lang.String packageVersionFilter,
                                                               java.lang.String search,
                                                               PageControl pageControl)
Description copied from interface: ContentUIManagerLocal
Returns a list of all installed packages on the specified resource.

Specified by:
getInstalledPackages in interface ContentUIManagerLocal
Parameters:
user - the user who is requesting the retrieval
resourceId - identifies the resource whose requests to retrieve
search - string to search against filtering by name or description
pageControl - pagination controller
Returns:
pagable list of packages installed on the resource

getInstalledPackageTypes

public java.util.List<IntegerOptionItem> getInstalledPackageTypes(Subject user,
                                                                  int resourceId)
Specified by:
getInstalledPackageTypes in interface ContentUIManagerLocal

getInstalledPackageHistory

public PageList<InstalledPackageHistory> getInstalledPackageHistory(Subject subject,
                                                                    int resourceId,
                                                                    int generalPackageId,
                                                                    PageControl pageControl)
Specified by:
getInstalledPackageHistory in interface ContentUIManagerLocal

getPackageVersionCompositesByFilter

public PageList<PackageVersionComposite> getPackageVersionCompositesByFilter(Subject user,
                                                                             int resourceId,
                                                                             java.lang.String filter,
                                                                             PageControl pc)
Specified by:
getPackageVersionCompositesByFilter in interface ContentUIManagerLocal

loadPackageVersionComposite

public PackageVersionComposite loadPackageVersionComposite(Subject user,
                                                           int packageVersionId)
Description copied from interface: ContentUIManagerLocal
Used to retrieve information about a package version to display to a user.

Specified by:
loadPackageVersionComposite in interface ContentUIManagerLocal
Parameters:
user - user who wants to see the information
packageVersionId - identifies what package version to return info on
Returns:
the information on the package version

loadPackageVersionCompositeWithExtraProperties

public PackageVersionComposite loadPackageVersionCompositeWithExtraProperties(Subject user,
                                                                              int packageVersionId)
Description copied from interface: ContentUIManagerLocal
Used to retrieve information about a package version to display to a user. This call will also load the extra properties configuration object on the package version.

Specified by:
loadPackageVersionCompositeWithExtraProperties in interface ContentUIManagerLocal
Parameters:
user - user who wants to see the information
packageVersionId - identifies what package version to return info on
Returns:
the information on the package version

getPackageVersionComposites

public java.util.List<PackageVersionComposite> getPackageVersionComposites(Subject user,
                                                                           int[] packageVersionIds)
Description copied from interface: ContentUIManagerLocal
Used to retrieve information about multiple packages to display to the user.

Specified by:
getPackageVersionComposites in interface ContentUIManagerLocal
Parameters:
user - user who wants to see the information
packageVersionIds - identifies what package versions to return info on
Returns:
package version information for each package identified

getPackageVersionComposites

public PageList<PackageVersionComposite> getPackageVersionComposites(Subject user,
                                                                     int[] packageVersionIds,
                                                                     PageControl pageControl)
Description copied from interface: ContentUIManagerLocal
Used to retrieve information about multiple packages to display to the user.

Specified by:
getPackageVersionComposites in interface ContentUIManagerLocal
Parameters:
user - user who wants to see the information
packageVersionIds - identifies what package versions to return info on
pageControl - pagination controller
Returns:
package version information for each package identified

getPackageVersion

public PackageVersion getPackageVersion(int packageVersionId)
Description copied from interface: ContentUIManagerLocal
Retrieves a package version by its ID. One and only one package version must exist for the ID; an error will be thrown if exactly one package version is not found.

Specified by:
getPackageVersion in interface ContentUIManagerLocal
Parameters:
packageVersionId - identifies the package version
Returns:
package version entity

getContentServiceRequest

public ContentServiceRequest getContentServiceRequest(int requestId)
Description copied from interface: ContentUIManagerLocal
Retrieves a content request by its ID. One and only one content request must exist for the ID; an error will be thrown if exactly one content request is not found.

Specified by:
getContentServiceRequest in interface ContentUIManagerLocal
Parameters:
requestId - identifies the request
Returns:
content request entity

getInstalledPackageHistory

public PageList<InstalledPackageHistory> getInstalledPackageHistory(int contentServiceRequestId,
                                                                    PageControl pc)
Description copied from interface: ContentUIManagerLocal
Returns a list of installed package history entries that were created as a result of executing the indicated request.

Specified by:
getInstalledPackageHistory in interface ContentUIManagerLocal
Parameters:
contentServiceRequestId - identifies the request that caused the history entries
pc - pagination controller
Returns:
list of history entries

getInstalledPackageHistory

public InstalledPackageHistory getInstalledPackageHistory(int historyId)
Description copied from interface: ContentUIManagerLocal
Retrieves a specific history entry by its ID. One and only one history entry must exist for the ID; an error will be thrown if exactly one history entry is not found.

Specified by:
getInstalledPackageHistory in interface ContentUIManagerLocal
Parameters:
historyId - identifies the history entry
Returns:
history entry

getPackageInstallationSteps

public java.util.List<PackageInstallationStep> getPackageInstallationSteps(int installedPackageHistoryId)
Description copied from interface: ContentUIManagerLocal
Retrieves the individual steps executed during the specified package installation history.

Specified by:
getPackageInstallationSteps in interface ContentUIManagerLocal
Parameters:
installedPackageHistoryId - identifies the history entry
Returns:
list of steps; empty list if there were no steps reported

getPackageInstallationStep

public PackageInstallationStep getPackageInstallationStep(int stepId)
Description copied from interface: ContentUIManagerLocal
Retrieves a specific step entry by its ID.

Specified by:
getPackageInstallationStep in interface ContentUIManagerLocal
Parameters:
stepId - identifies the step to retrieve
Returns:
step entry

getInstalledPackageHistoryForResource

public PageList<InstalledPackageHistory> getInstalledPackageHistoryForResource(int resourceId,
                                                                               PageControl pc)
Description copied from interface: ContentUIManagerLocal
Returns a pagable list of all package events that have taken place on the given resource.

Specified by:
getInstalledPackageHistoryForResource in interface ContentUIManagerLocal
Parameters:
resourceId - must refer to a valid resource in the database
pc - pagination controller
Returns:
pagable list of package change items; will not be null


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.