org.rhq.enterprise.server.webservices
Class WebservicesManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.webservices.WebservicesManagerBean
All Implemented Interfaces:
AlertDefinitionManagerRemote, AlertManagerRemote, SubjectManagerRemote, RoleManagerRemote, BundleManagerRemote, ConfigurationManagerRemote, ContentManagerRemote, RepoManagerRemote, DiscoveryBossRemote, EventManagerRemote, AvailabilityManagerRemote, CallTimeDataManagerRemote, MeasurementBaselineManagerRemote, MeasurementDataManagerRemote, MeasurementDefinitionManagerRemote, MeasurementProblemManagerRemote, MeasurementScheduleManagerRemote, OperationManagerRemote, ResourceGroupManagerRemote, ResourceFactoryManagerRemote, ResourceManagerRemote, ResourceTypeManagerRemote, SupportManagerRemote, SynchronizationManagerRemote, SystemManagerRemote, WebservicesRemote

public class WebservicesManagerBean
extends Object
implements WebservicesRemote

The purpose of this class is to aggregate all the EJB remote implementation into one class that can be annotated by JBossWS. Each annotated SLSB causes a full WSDL compile and publish by JBossWS which is very costly in terms of time. Deploy times went from 2 mins to 12 mins.

Author:
Simeon Pinder

Constructor Summary
WebservicesManagerBean()
           
 
Method Summary
 int acknowledgeAlerts(org.rhq.core.domain.auth.Subject subject, int[] alertIds)
           
 int acknowledgeAlertsByContext(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.common.EntityContext context)
           
 org.rhq.core.domain.bundle.BundleFile addBundleFile(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, String name, String version, org.rhq.core.domain.content.Architecture architecture, InputStream fileStream)
          Adds a BundleFile to the BundleVersion and implicitly creates the backing PackageVersion.
 org.rhq.core.domain.bundle.BundleFile addBundleFileViaByteArray(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, String name, String version, org.rhq.core.domain.content.Architecture architecture, byte[] fileBytes)
          A convenience method taking a byte array as opposed to a stream for the file bits.
 org.rhq.core.domain.bundle.BundleFile addBundleFileViaPackageVersion(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, String name, int packageVersionId)
          A convenience method taking an existing PackageVersion as opposed to a stream for the file bits.
 org.rhq.core.domain.bundle.BundleFile addBundleFileViaURL(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, String name, String version, org.rhq.core.domain.content.Architecture architecture, String bundleFileUrl)
          A convenience method taking a URL String whose content will be streamed to the server and used for the file bits.
 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 addResourceGroupsToRole(org.rhq.core.domain.auth.Subject subject, int roleId, int[] pendingGroupIds)
          Adds the given resource groups to the given role.
 void addResourcesToGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] resourceIds)
           
 void addRolesToResourceGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] roleIds)
           
 void addRolesToSubject(org.rhq.core.domain.auth.Subject subject, int subjectId, int[] roleIds)
          Assigns a set of roles to a subject which authorizes the subject to do anything the roles permit.
 void addSubjectsToRole(org.rhq.core.domain.auth.Subject subject, int roleId, int[] subjectIds)
          Assigns a set of subjects to a role which authorizes the subjects to do anything the role permits.
 void cancelOperationHistory(org.rhq.core.domain.auth.Subject subject, int operationHistoryId, boolean ignoreAgentErrors)
          Cancels a currently in-progress operation.
 void changePassword(org.rhq.core.domain.auth.Subject subject, String username, String password)
          Change the password for a user.
 org.rhq.core.domain.bundle.BundleDeployment createBundleDeployment(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, int bundleDestinationId, String description, org.rhq.core.domain.configuration.Configuration configuration)
          Create a new bundle deployment.
 org.rhq.core.domain.bundle.BundleDestination createBundleDestination(org.rhq.core.domain.auth.Subject subject, int bundleId, String name, String description, String destBaseDirName, String deployDir, Integer groupId)
          Creates a bundle destination that describes a target for the bundle deployments.
 org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaByteArray(org.rhq.core.domain.auth.Subject subject, byte[] fileBytes)
          Creates a bundle version based on the actual bytes of a Bundle Distribution file.
 org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject, File distributionFile)
          Creates a bundle version based on a Bundle Distribution file.
 org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaRecipe(org.rhq.core.domain.auth.Subject subject, String recipe)
          Creates a bundle version based on single recipe string.
 org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject, String distributionFileUrl)
          Creates a bundle version based on a Bundle Distribution file.
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, byte[] packageBits)
           
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, byte[] packageBits, Integer timeout)
          Creates a new physical resource.
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, int packageVersionId)
           
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, int packageVersionId, Integer timeout)
          Creates a new physical resource.
 org.rhq.core.domain.content.PackageVersion createPackageVersion(org.rhq.core.domain.auth.Subject subject, String packageName, int packageTypeId, String version, Integer architectureId, byte[] packageBytes)
          Creates a new package version in the system.
 org.rhq.core.domain.content.PackageVersion createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject, String packageName, int packageTypeId, String version, String displayVersion, Integer architectureId, byte[] packageBytes)
          Creates a new package version in the system.
 void createPrincipal(org.rhq.core.domain.auth.Subject subject, String username, String password)
          Creates a new principal (username and password) in the internal database.
 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.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int resourceTypeId, String resourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration resourceConfiguration)
           
 org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int resourceTypeId, String resourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration resourceConfiguration, Integer timeout)
          Creates a new physical resource.
 org.rhq.core.domain.resource.group.ResourceGroup createResourceGroup(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.resource.group.ResourceGroup resourceGroup)
           
 org.rhq.core.domain.authz.Role createRole(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.authz.Role newRole)
          Persists the new role to the database.
 org.rhq.core.domain.auth.Subject createSubject(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.auth.Subject subjectToCreate)
          Create a a new subject.
 int deleteAlerts(org.rhq.core.domain.auth.Subject subject, int[] alertIds)
           
 int deleteAlertsByContext(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.common.EntityContext context)
           
 void deleteBundle(org.rhq.core.domain.auth.Subject subject, int bundleId)
          Remove everything associated with the Bundle with the exception of files laid down by related deployments.
 void deleteBundles(org.rhq.core.domain.auth.Subject subject, int[] bundleIds)
          Remove everything associated with the Bundles with the exception of files laid down by related deployments.
 void deleteBundleVersion(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, boolean deleteBundleIfEmpty)
          Remove everything associated with the BundleVersion with the exception of files laid down by related deployments.
 void deleteOperationHistory(org.rhq.core.domain.auth.Subject subject, int operationHistoryId, boolean purgeInProgress)
          Purges the history from the database.
 void deletePackages(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] installedPackageIds, String requestNotes)
          Deletes the specified package from the resource.
 void deletePackageVersion(org.rhq.core.domain.auth.Subject subject, int packageVersionId)
          Deletes the specified PackageVersion from the system.
 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.
 org.rhq.core.domain.resource.DeleteResourceHistory deleteResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Deletes a physical resource from the agent machine.
 void deleteResourceGroup(org.rhq.core.domain.auth.Subject subject, int groupId)
           
 void deleteResourceGroups(org.rhq.core.domain.auth.Subject subject, int[] groupIds)
           
 List<org.rhq.core.domain.resource.DeleteResourceHistory> deleteResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
          Deletes physical resources from the agent machine.
 void deleteRoles(org.rhq.core.domain.auth.Subject subject, int[] roleIds)
          Removes a set of roles from the database.
 void deleteSubjects(org.rhq.core.domain.auth.Subject subject, int[] subjectIds)
          Deletes the given set of users, including both the Subject and Principal objects associated with those users.
 void deployPackages(org.rhq.core.domain.auth.Subject subject, int[] resourceIds, int[] packageVersionIds)
          Deploys packages on the specified resources.
 void deployPackagesWithNote(org.rhq.core.domain.auth.Subject subject, int[] resourceIds, int[] packageVersionIds, String requestNotes)
          Deploys packages on the specified resources.
 int disableAlertDefinitions(org.rhq.core.domain.auth.Subject subject, int[] alertDefinitionIds)
           
 void disableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject, int[] measurementDefinitionIds)
           
 void disableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] measurementDefinitionIds)
           
 void disableSchedulesForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] measurementDefinitionIds)
           
 int enableAlertDefinitions(org.rhq.core.domain.auth.Subject subject, int[] alertDefinitionIds)
           
 void enableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject, int[] measurementDefinitionIds)
           
 void enableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] measurementDefinitionIds)
           
 void enableSchedulesForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] measurementDefinitionIds)
           
 org.rhq.core.domain.sync.ExportReport exportAllSubsystems(org.rhq.core.domain.auth.Subject subject)
          This exports the configuration data of all supported subsystems in RHQ.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.AlertDefinition> findAlertDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.AlertDefinitionCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.Alert> findAlertsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.AlertCriteria criteria)
           
 List<org.rhq.core.domain.content.Architecture> findArchitectures(org.rhq.core.domain.auth.Subject subject)
          Returns all architectures known to the system.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.Availability> findAvailabilityForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.util.PageControl pc)
           
 List<org.rhq.core.domain.measurement.MeasurementBaseline> findBaselinesForResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDeployment> findBundleDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleDeploymentCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDestination> findBundleDestinationsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleDestinationCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleFile> findBundleFilesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleFileCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleResourceDeployment> findBundleResourceDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleResourceDeploymentCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.Bundle> findBundlesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.composite.BundleWithLatestVersionComposite> findBundlesWithLatestVersionCompositesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleVersion> findBundleVersionsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.BundleVersionCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.calltime.CallTimeDataComposite> findCallTimeDataForResource(org.rhq.core.domain.auth.Subject subject, int scheduleId, long beginTime, long endTime, org.rhq.core.domain.util.PageControl pc)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResources(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.CreateResourceHistory> findCreateChildResourceHistory(org.rhq.core.domain.auth.Subject subject, int parentResourceId, Long beginDate, Long endDate, org.rhq.core.domain.util.PageControl pageControl)
          Returns a pagination enabled list of requests for the creation of new child resources to the specified parent.
 List<org.rhq.core.domain.measurement.MeasurementDataTrait> findCurrentTraitsForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.measurement.DisplayType displayType)
           
 List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int definitionId, long beginTime, long endTime, int numPoints)
           
 List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] definitionIds, long beginTime, long endTime, int numPoints)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.DeleteResourceHistory> findDeleteChildResourceHistory(org.rhq.core.domain.auth.Subject subject, int parentResourceId, Long beginDate, Long endDate, org.rhq.core.domain.util.PageControl pageControl)
          Returns a pagination enabled list of requests to delete a child resource on the specified parent.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.event.Event> findEventsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.EventCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> findGroupOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.GroupOperationHistoryCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.InstalledPackage> findInstalledPackagesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.InstalledPackageCriteria criteria)
           
 Set<org.rhq.core.domain.measurement.MeasurementData> findLiveData(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] definitionIds)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementDefinition> findMeasurementDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.MeasurementDefinitionCriteria criteria)
           
 List<org.rhq.core.domain.operation.OperationDefinition> findOperationDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.OperationDefinitionCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Package> findPackagesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.PackageCriteria criteria)
          If the criteria object filters on repo id, the subject needs to be able to access that repo.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageAndLatestVersionComposite> findPackagesWithLatestVersion(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.PackageCriteria criteria)
          Akin to ContentManagerRemote.findPackagesByCriteria(Subject, PackageCriteria) but also determines the latest version of the returned packages.
 org.rhq.core.domain.content.PackageType findPackageType(org.rhq.core.domain.auth.Subject subject, Integer resourceTypeId, String packageTypeName)
          This re tries to find a package type of given name defined by the resource type provided.
 List<org.rhq.core.domain.content.PackageType> findPackageTypes(org.rhq.core.domain.auth.Subject subject, String resourceTypeName, String pluginName)
          This gets the package types that can be deployed to the given resource.
 org.rhq.core.domain.content.composite.PackageTypeAndVersionFormatComposite findPackageTypeWithVersionFormat(org.rhq.core.domain.auth.Subject subject, Integer resourceTypeId, String packageTypeName)
          Similar to ContentManagerRemote.findPackageType(Subject, Integer, String) but returns the package type along with the version format specification.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> findPackageVersionsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.PackageVersionCriteria criteria)
          If a resourceId filter is not set via PackageVersionCriteria.addFilterResourceId() then this method requires InventoryManager permissions.
 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.resource.composite.ProblemResourceComposite> findProblemResources(org.rhq.core.domain.auth.Subject subject, long oldestDate, org.rhq.core.domain.util.PageControl pc)
           
 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.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.group.ResourceGroup> findResourceGroupsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceGroupCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.group.ResourceGroup> findResourceGroupsForRole(org.rhq.core.domain.auth.Subject subject, int roleId, org.rhq.core.domain.util.PageControl pc)
           
 List<org.rhq.core.domain.resource.Resource> findResourceLineage(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Returns the lineage of the Resource with the specified id.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findResourceOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceOperationHistoryCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.ResourceType> findResourceTypesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.ResourceTypeCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.authz.Role> findRolesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.RoleCriteria criteria)
           
 List<org.rhq.core.domain.operation.bean.GroupOperationSchedule> findScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject, int groupId)
           
 List<org.rhq.core.domain.operation.bean.ResourceOperationSchedule> findScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Returns the list of scheduled operations for the given resource.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.MeasurementScheduleCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.authz.Role> findSubjectAssignedRoles(org.rhq.core.domain.auth.Subject subject, int subjectId, org.rhq.core.domain.util.PageControl pc)
          Get all roles assigned for a certain subject
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.auth.Subject> findSubjectsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.SubjectCriteria criteria)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.authz.Role> findSubjectUnassignedRoles(org.rhq.core.domain.auth.Subject subject, int subjectId, org.rhq.core.domain.util.PageControl pc)
           
 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)
          Get a list of truncated Repo objects that represent the subscriptions for the specified resource.
 List<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraits(org.rhq.core.domain.auth.Subject subject, int resourceId, int definitionId)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraitsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.MeasurementDataTraitCriteria criteria)
           
 MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject, int scheduleId, long startTime, long endTime)
           
 org.rhq.core.domain.alert.AlertDefinition getAlertDefinition(org.rhq.core.domain.auth.Subject subject, int alertDefinitionId)
           
 String[] getAlertNotificationConfigurationPreview(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.alert.notification.AlertNotification[] alertNotifications)
           
 List<org.rhq.core.domain.bundle.BundleType> getAllBundleTypes(org.rhq.core.domain.auth.Subject subject)
           
 org.rhq.core.domain.content.InstalledPackage getBackingPackageForResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
          For a resource that is content-backed (aka package-backed), this call will return InstalledPackage information for the backing content (package).
 org.rhq.core.domain.bundle.BundleType getBundleType(org.rhq.core.domain.auth.Subject subject, String bundleTypeName)
           
 Set<String> getBundleVersionFilenames(org.rhq.core.domain.auth.Subject subject, int bundleVersionId, boolean withoutBundleFileOnly)
          Determine the files required for a BundleVersion and return all of the filenames or optionally, just those that lack BundleFiles for the BundleVersion.
 org.rhq.core.domain.configuration.Configuration getConfiguration(org.rhq.core.domain.auth.Subject subject, int configurationId)
           
 org.rhq.core.domain.measurement.Availability getCurrentAvailabilityForResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Gets the last known Availability for the given resource - which includes whether it is currently up (i.e.
 org.rhq.core.domain.configuration.group.GroupPluginConfigurationUpdate getGroupPluginConfigurationUpdate(org.rhq.core.domain.auth.Subject subject, int configurationUpdateId)
           
 org.rhq.core.domain.configuration.group.GroupResourceConfigurationUpdate getGroupResourceConfigurationUpdate(org.rhq.core.domain.auth.Subject subject, int configurationUpdateId)
           
 org.rhq.core.domain.sync.ImportConfigurationDefinition getImportConfigurationDefinition(String importerClass)
          Returns the configuration definition of the import for synchronizer of given type.
 List<org.rhq.core.domain.sync.ImportConfigurationDefinition> getImportConfigurationDefinitionOfAllSynchronizers()
          Returns the configuration definitions of all known importers.
 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.configuration.PluginConfigurationUpdate getLatestPluginConfigurationUpdate(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 org.rhq.core.domain.configuration.ResourceConfigurationUpdate getLatestResourceConfigurationUpdate(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 org.rhq.core.domain.measurement.ResourceAvailability getLiveResourceAvailability(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Returns the availability of the resource with the specified id.
 org.rhq.core.domain.configuration.Configuration getLiveResourceConfiguration(org.rhq.core.domain.auth.Subject subject, int resourceId, boolean pingAgentFirst)
          Get the currently live resource configuration for the Resource with the given id.
 org.rhq.core.domain.measurement.MeasurementDefinition getMeasurementDefinition(org.rhq.core.domain.auth.Subject subject, int definitionId)
           
 byte[] getPackageBytes(org.rhq.core.domain.auth.Subject subject, int resourceId, int installedPackageId)
          This can be a dangerous call for large packages as the entire package will attempt to be loaded.
 org.rhq.core.domain.configuration.definition.ConfigurationDefinition getPackageTypeConfigurationDefinition(org.rhq.core.domain.auth.Subject subject, int packageTypeId)
          Return the deploy configuration definition for the PackageType with the specified id.
 org.rhq.core.domain.resource.Resource getParentResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 org.rhq.core.domain.configuration.Configuration getPluginConfiguration(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Get the current plugin configuration for the Resource with the given id, or null if the resource's plugin configuration is not yet initialized.
 org.rhq.core.domain.configuration.definition.ConfigurationDefinition getPluginConfigurationDefinitionForResourceType(org.rhq.core.domain.auth.Subject subject, int resourceTypeId)
          Return the plugin configuration definition for the ResourceType with the specified id.
 org.rhq.core.domain.common.ProductInfo getProductInfo(org.rhq.core.domain.auth.Subject subject)
          Provides product information suitable for "About" details.
 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.
 org.rhq.core.domain.resource.Resource getResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Returns the Resource with the specified id.
 org.rhq.core.domain.configuration.Configuration getResourceConfiguration(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Get the current Resource configuration.
 org.rhq.core.domain.configuration.definition.ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(org.rhq.core.domain.auth.Subject subject, int resourceTypeId)
          Return the resource configuration definition for the ResourceType with the specified id.
 org.rhq.core.domain.configuration.definition.ConfigurationDefinition getResourceConfigurationDefinitionWithTemplatesForResourceType(org.rhq.core.domain.auth.Subject subject, int resourceTypeId)
          Return the resource configuration definition for the ResourceType with the specified id.
 org.rhq.core.domain.resource.group.ResourceGroup getResourceGroup(org.rhq.core.domain.auth.Subject subject, int groupId)
           
 org.rhq.core.domain.resource.group.composite.ResourceGroupComposite getResourceGroupComposite(org.rhq.core.domain.auth.Subject subject, int groupId)
           
 Map<Integer,String> getResourcesAncestry(org.rhq.core.domain.auth.Subject subject, Integer[] resourceIds, org.rhq.core.domain.resource.ResourceAncestryFormat format)
          Resource.ancestry is an encoded value that holds the resource's parental ancestry.
 org.rhq.core.domain.bundle.ResourceTypeBundleConfiguration getResourceTypeBundleConfiguration(org.rhq.core.domain.auth.Subject subject, int compatGroupId)
          Given the ID for a compatible group, this will return the bundle configuration metadata for that group's resource type.
 org.rhq.core.domain.resource.ResourceType getResourceTypeById(org.rhq.core.domain.auth.Subject subject, int resourceTypeId)
           
 org.rhq.core.domain.resource.ResourceType getResourceTypeByNameAndPlugin(org.rhq.core.domain.auth.Subject subject, String name, String plugin)
           
 org.rhq.core.domain.authz.Role getRole(org.rhq.core.domain.auth.Subject subject, int roleId)
          Returns the role with the given ID
 org.rhq.core.domain.common.ServerDetails getServerDetails(org.rhq.core.domain.auth.Subject subject)
          Provides details (such as product version) of the server processing the request.
 org.rhq.core.domain.event.EventSeverity[] getSeverityBuckets(org.rhq.core.domain.auth.Subject subject, int resourceId, long begin, long end, int numBuckets)
           
 org.rhq.core.domain.event.EventSeverity[] getSeverityBucketsForAutoGroup(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int resourceTypeId, long begin, long end, int numBuckets)
           
 org.rhq.core.domain.event.EventSeverity[] getSeverityBucketsForCompGroup(org.rhq.core.domain.auth.Subject subject, int resourceGroupId, long begin, long end, int numBuckets)
           
 URL getSnapshotReport(org.rhq.core.domain.auth.Subject subject, int resourceId, String name, String description)
          Asks that a snapshot report be taken of the given resource.
 org.rhq.core.domain.auth.Subject getSubjectByName(String username)
          Looks up the existing subject using the given username.
 org.rhq.core.domain.auth.Subject getSubjectByNameAndSessionId(String username, int sessionId)
          Looks up the Subject for a current RHQ session by username and sessionId.
 Properties getSystemConfiguration(org.rhq.core.domain.auth.Subject subject)
           
 org.rhq.core.domain.common.composite.SystemSettings getSystemSettings(org.rhq.core.domain.auth.Subject subject)
          Get the server cloud configuration.
 void ignoreResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
          Analogous to the GUI feature Ignore Resources in the auto discovery queue.
 org.rhq.core.domain.sync.ImportReport importAllSubsystems(org.rhq.core.domain.auth.Subject subject, byte[] exportFile, List<org.rhq.core.domain.sync.ImportConfiguration> importerConfigurations)
          Imports everything from the export file.
 void importResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
          Analogous to the GUI feature Import Resources in the auto discovery queue.
 boolean isGroupResourceConfigurationUpdateInProgress(org.rhq.core.domain.auth.Subject subject, int resourceGroupId)
           
 boolean isResourceConfigurationUpdateInProgress(org.rhq.core.domain.auth.Subject subject, int resourceId)
          Get whether the the specified resource is in the process of updating its configuration.
 org.rhq.core.domain.auth.Subject login(String username, String password)
          Logs a user into the system.
 void logout(org.rhq.core.domain.auth.Subject subject)
          Logs out a user.
 org.rhq.core.domain.resource.Resource manuallyAddResource(org.rhq.core.domain.auth.Subject subject, int resourceTypeId, int parentResourceId, org.rhq.core.domain.configuration.Configuration pluginConfiguration)
          Manually Add the resource of the specified type to inventory using the specified plugin configuration (i.e.
 void purgeBundleDestination(org.rhq.core.domain.auth.Subject subject, int bundleDestinationId)
          Purges the destination's live deployment content from the remote platforms.
 int removeAlertDefinitions(org.rhq.core.domain.auth.Subject subject, int[] alertDefinitionIds)
           
 void removeResourceGroupsFromRole(org.rhq.core.domain.auth.Subject subject, int roleId, int[] groupIds)
          Removes the given resource groups from the given role.
 void removeResourcesFromGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] resourceIds)
           
 void removeRolesFromResourceGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] roleIds)
           
 void removeRolesFromSubject(org.rhq.core.domain.auth.Subject subject, int subjectId, int[] roleIds)
          Disassociates particular roles from a subject.
 void removeSubjectsFromRole(org.rhq.core.domain.auth.Subject subject, int roleId, int[] subjectIds)
          Dissociate particular subjects from a role.
 org.rhq.core.domain.bundle.BundleDeployment scheduleBundleDeployment(org.rhq.core.domain.auth.Subject subject, int bundleDeploymentId, boolean isCleanDeployment)
          Deploy the bundle to the destination, as described in the provided deployment.
 org.rhq.core.domain.operation.bean.GroupOperationSchedule scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject, int groupId, int[] executionOrderResourceIds, boolean haltOnFailure, String operationName, org.rhq.core.domain.configuration.Configuration parameters, long delay, long repeatInterval, int repeatCount, int timeout, String description)
           
 int scheduleGroupResourceConfigurationUpdate(org.rhq.core.domain.auth.Subject subject, int compatibleGroupId, Map<Integer,org.rhq.core.domain.configuration.Configuration> newResourceConfigurationMap)
           
 org.rhq.core.domain.operation.bean.ResourceOperationSchedule scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject, int resourceId, String operationName, long delay, long repeatInterval, int repeatCount, int timeout, org.rhq.core.domain.configuration.Configuration parameters, String description)
          Schedules an operation for execution on the given resource.
 org.rhq.core.domain.bundle.BundleDeployment scheduleRevertBundleDeployment(org.rhq.core.domain.auth.Subject subject, int bundleDestinationId, String deploymentDescription, boolean isCleanDeployment)
          For the specified destination, revert from the current live deployment to the deployment it had replaced.
 void setAssignedResourceGroups(org.rhq.core.domain.auth.Subject subject, int roleId, int[] groupIds)
           
 void setAssignedSubjectRoles(org.rhq.core.domain.auth.Subject subject, int subjectId, int[] roleIds)
          Sets the set of roles assigned to a subject.
 void setRecursive(org.rhq.core.domain.auth.Subject subject, int groupId, boolean isRecursive)
           
 void setSystemConfiguration(org.rhq.core.domain.auth.Subject subject, Properties properties, boolean skipValidation)
           
 void setSystemSettings(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.common.composite.SystemSettings settings)
          Set the server cloud configuration.
 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)
           
 org.rhq.core.domain.configuration.Configuration translateResourceConfiguration(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.configuration.Configuration configuration, boolean fromStructured)
           
 void unignoreResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
          Analogous to the GUI feature Unignore Resources in the auto discovery queue.
 List<Integer> uninventoryResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
          Removes these resources from inventory.
 void unscheduleGroupOperation(org.rhq.core.domain.auth.Subject subject, String jobId, int resourceGroupId)
          Unschedules the group operation identified with the given job ID.
 void unscheduleResourceOperation(org.rhq.core.domain.auth.Subject subject, String jobId, int resourceId)
          Unschedules the resource operation identified with the given job ID.
 void unsubscribeResourceFromRepos(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] repoIds)
          Unsubscribes the identified resource from the set of identified repos.
 void updateMeasurementTemplates(org.rhq.core.domain.auth.Subject subject, int[] measurementDefinitionIds, long collectionInterval)
           
 org.rhq.core.domain.configuration.PluginConfigurationUpdate updatePluginConfiguration(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.configuration.Configuration newConfiguration)
          Updates the plugin configuration used to connect and communicate with the resource.
 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.
 org.rhq.core.domain.resource.Resource updateResource(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.resource.Resource resource)
          Update resource's editable properties (name, description, location).
 org.rhq.core.domain.configuration.ResourceConfigurationUpdate updateResourceConfiguration(org.rhq.core.domain.auth.Subject subject, int resourceId, org.rhq.core.domain.configuration.Configuration newConfiguration)
          This method is called when a user has requested to change the resource configuration for an existing resource.
 org.rhq.core.domain.resource.group.ResourceGroup updateResourceGroup(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.resource.group.ResourceGroup newResourceGroup)
           
 org.rhq.core.domain.authz.Role updateRole(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.authz.Role role)
          Updates the given role, excluding the subjects and groups.
 void updateSchedule(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.measurement.MeasurementSchedule schedule)
           
 void updateSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject, int groupId, int[] measurementDefinitionIds, long collectionInterval)
           
 void updateSchedulesForResource(org.rhq.core.domain.auth.Subject subject, int resourceId, int[] measurementDefinitionIds, long collectionInterval)
           
 org.rhq.core.domain.auth.Subject updateSubject(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.auth.Subject subjectToModify)
          Updates an existing subject with new data.
 void validate(org.rhq.core.domain.auth.Subject subject, byte[] exportFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebservicesManagerBean

public WebservicesManagerBean()
Method Detail

findAlertsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.Alert> findAlertsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                               org.rhq.core.domain.criteria.AlertCriteria criteria)
Specified by:
findAlertsByCriteria in interface AlertManagerRemote

deleteAlerts

public int deleteAlerts(org.rhq.core.domain.auth.Subject subject,
                        int[] alertIds)
Specified by:
deleteAlerts in interface AlertManagerRemote

deleteAlertsByContext

public int deleteAlertsByContext(org.rhq.core.domain.auth.Subject subject,
                                 org.rhq.core.domain.common.EntityContext context)
Specified by:
deleteAlertsByContext in interface AlertManagerRemote

acknowledgeAlerts

public int acknowledgeAlerts(org.rhq.core.domain.auth.Subject subject,
                             int[] alertIds)
Specified by:
acknowledgeAlerts in interface AlertManagerRemote

acknowledgeAlertsByContext

public int acknowledgeAlertsByContext(org.rhq.core.domain.auth.Subject subject,
                                      org.rhq.core.domain.common.EntityContext context)
Specified by:
acknowledgeAlertsByContext in interface AlertManagerRemote

getAlertDefinition

public org.rhq.core.domain.alert.AlertDefinition getAlertDefinition(org.rhq.core.domain.auth.Subject subject,
                                                                    int alertDefinitionId)
Specified by:
getAlertDefinition in interface AlertDefinitionManagerRemote

findAlertDefinitionsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.alert.AlertDefinition> findAlertDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                   org.rhq.core.domain.criteria.AlertDefinitionCriteria criteria)
Specified by:
findAlertDefinitionsByCriteria in interface AlertDefinitionManagerRemote

enableAlertDefinitions

public int enableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
                                  int[] alertDefinitionIds)
Specified by:
enableAlertDefinitions in interface AlertDefinitionManagerRemote

disableAlertDefinitions

public int disableAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
                                   int[] alertDefinitionIds)
Specified by:
disableAlertDefinitions in interface AlertDefinitionManagerRemote

removeAlertDefinitions

public int removeAlertDefinitions(org.rhq.core.domain.auth.Subject subject,
                                  int[] alertDefinitionIds)
Specified by:
removeAlertDefinitions in interface AlertDefinitionManagerRemote

getAlertNotificationConfigurationPreview

public String[] getAlertNotificationConfigurationPreview(org.rhq.core.domain.auth.Subject subject,
                                                         org.rhq.core.domain.alert.notification.AlertNotification[] alertNotifications)
Specified by:
getAlertNotificationConfigurationPreview in interface AlertDefinitionManagerRemote

findAvailabilityForResource

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.Availability> findAvailabilityForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                                                   int resourceId,
                                                                                                                   org.rhq.core.domain.util.PageControl pc)
Specified by:
findAvailabilityForResource in interface AvailabilityManagerRemote
Returns:

getCurrentAvailabilityForResource

public org.rhq.core.domain.measurement.Availability getCurrentAvailabilityForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                      int resourceId)
Description copied from interface: AvailabilityManagerRemote
Gets the last known Availability for the given resource - which includes whether it is currently up (i.e. available) or down and the last time it was known to have changed to that state.

Specified by:
getCurrentAvailabilityForResource in interface AvailabilityManagerRemote
Returns:
the full and current status of the resource

getResourceTypeBundleConfiguration

public org.rhq.core.domain.bundle.ResourceTypeBundleConfiguration getResourceTypeBundleConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                                                     int compatGroupId)
                                                                                              throws Exception
Description copied from interface: BundleManagerRemote
Given the ID for a compatible group, this will return the bundle configuration metadata for that group's resource type. User interfaces will need to use this method in order to find out if a) the group can be a target for a bundle deployment and/or b) what different destination base locations are supported by the group.

Specified by:
getResourceTypeBundleConfiguration in interface BundleManagerRemote
Parameters:
subject - the user making the request
compatGroupId - the ID for a compatible group whose type's bundle config is to be returned
Returns:
the bundle configuration for the group's resource type
Throws:
Exception

addBundleFile

public org.rhq.core.domain.bundle.BundleFile addBundleFile(org.rhq.core.domain.auth.Subject subject,
                                                           int bundleVersionId,
                                                           String name,
                                                           String version,
                                                           org.rhq.core.domain.content.Architecture architecture,
                                                           InputStream fileStream)
                                                    throws Exception
Description copied from interface: BundleManagerRemote
Adds a BundleFile to the BundleVersion and implicitly creates the backing PackageVersion. If the PackageVersion already exists use addBundleFile(Subject, int, String, int, boolean)

Specified by:
addBundleFile in interface BundleManagerRemote
Parameters:
subject - user that must have proper permissions
bundleVersionId - id of the BundleVersion incorporating this BundleFile
name - name of the BundleFile (and the resulting Package)
version - version of the backing package
architecture - architecture appropriate for the backing package. Defaults to noarch (i.e. any architecture).
fileStream - the file bits
Returns:
the new BundleFile
Throws:
Exception

addBundleFileViaByteArray

public org.rhq.core.domain.bundle.BundleFile addBundleFileViaByteArray(org.rhq.core.domain.auth.Subject subject,
                                                                       int bundleVersionId,
                                                                       String name,
                                                                       String version,
                                                                       org.rhq.core.domain.content.Architecture architecture,
                                                                       byte[] fileBytes)
                                                                throws Exception
Description copied from interface: BundleManagerRemote
A convenience method taking a byte array as opposed to a stream for the file bits. WARNING: obviously, this requires the entire bundle file to have been loaded fully in memory. For very large files, this could cause OutOfMemoryErrors.

Specified by:
addBundleFileViaByteArray in interface BundleManagerRemote
Throws:
Exception
See Also:
addBundleFile(Subject, int, String, String, Architecture, InputStream, boolean)}

addBundleFileViaURL

public org.rhq.core.domain.bundle.BundleFile addBundleFileViaURL(org.rhq.core.domain.auth.Subject subject,
                                                                 int bundleVersionId,
                                                                 String name,
                                                                 String version,
                                                                 org.rhq.core.domain.content.Architecture architecture,
                                                                 String bundleFileUrl)
                                                          throws Exception
Description copied from interface: BundleManagerRemote
A convenience method taking a URL String whose content will be streamed to the server and used for the file bits.

Specified by:
addBundleFileViaURL in interface BundleManagerRemote
Throws:
Exception
See Also:
addBundleFile(Subject, int, String, String, Architecture, InputStream, boolean)}

addBundleFileViaPackageVersion

public org.rhq.core.domain.bundle.BundleFile addBundleFileViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                            int bundleVersionId,
                                                                            String name,
                                                                            int packageVersionId)
                                                                     throws Exception
Description copied from interface: BundleManagerRemote
A convenience method taking an existing PackageVersion as opposed to a stream for the file bits.

Specified by:
addBundleFileViaPackageVersion in interface BundleManagerRemote
Throws:
Exception
See Also:
addBundleFile(Subject, int, String, String, Architecture, InputStream, boolean)}

createBundleDeployment

public org.rhq.core.domain.bundle.BundleDeployment createBundleDeployment(org.rhq.core.domain.auth.Subject subject,
                                                                          int bundleVersionId,
                                                                          int bundleDestinationId,
                                                                          String description,
                                                                          org.rhq.core.domain.configuration.Configuration configuration)
                                                                   throws Exception
Description copied from interface: BundleManagerRemote
Create a new bundle deployment. Note that bundle deployment names are generated by this call. This provides useful, uniform naming for display. An optional, custom description can be added. This call defines a deployment. The defined deployment can then be scheduled in a separate call.

Specified by:
createBundleDeployment in interface BundleManagerRemote
Parameters:
subject - user that must have proper permissions
bundleVersionId - the BundleVersion being deployed by this deployment
bundleDestinationId - the BundleDestination for the deployment
description - an optional longer description describing this deployment
configuration - a Configuration (pojo) to be associated with this deployment. Although it is not enforceable must be that of the associated BundleVersion.
Returns:
the persisted deployment
Throws:
Exception

createBundleDestination

public org.rhq.core.domain.bundle.BundleDestination createBundleDestination(org.rhq.core.domain.auth.Subject subject,
                                                                            int bundleId,
                                                                            String name,
                                                                            String description,
                                                                            String destBaseDirName,
                                                                            String deployDir,
                                                                            Integer groupId)
                                                                     throws Exception
Description copied from interface: BundleManagerRemote
Creates a bundle destination that describes a target for the bundle deployments.

Specified by:
createBundleDestination in interface BundleManagerRemote
Parameters:
subject - user must have MANAGE_INVENTORY permission
bundleId - the Bundle to be deployed to this Destination
name - a name for this destination. not null or empty
description - an optional longer description describing this destination
destBaseDirName - The name of the base directory location where the bundle will be deployed. deployDir is relative to the directory that this name refers to. This name isn't the directory itself, it refers to the named location as defined in the agent plugin's descriptor for the resource's type
deployDir - the root dir for deployments to this destination
groupId - the target platforms for deployments to this destination
Returns:
the persisted destination
Throws:
Exception

createBundleVersionViaRecipe

public org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaRecipe(org.rhq.core.domain.auth.Subject subject,
                                                                             String recipe)
                                                                      throws Exception
Description copied from interface: BundleManagerRemote
Creates a bundle version based on single recipe string. The recipe specifies the bundle name, version, version name and version description. If this is the initial version for the named bundle the bundle will be implicitly created. The bundle type is discovered by the bundle server plugin that can parse the recipe.

Specified by:
createBundleVersionViaRecipe in interface BundleManagerRemote
recipe - the recipe that defines the bundle version to be created
Returns:
the persisted BundleVersion with alot of the internal relationships filled in to help the caller understand all that this method did.
Throws:
Exception

createBundleVersionViaFile

public org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaFile(org.rhq.core.domain.auth.Subject subject,
                                                                           File distributionFile)
                                                                    throws Exception
Description copied from interface: BundleManagerRemote
Creates a bundle version based on a Bundle Distribution file. Typically a zip file, the bundle distribution contains the recipe for a supported bundle type, along with 0, 1 or more bundle files that will be associated with the bundle version. The recipe specifies the bundle name, version, version name and version description. If this is the initial version for the named bundle the bundle will be implicitly created. The bundle type is discovered by inspecting the distribution file.

Specified by:
createBundleVersionViaFile in interface BundleManagerRemote
distributionFile - a local Bundle Distribution file. It must be read accessible by the RHQ server process.
Returns:
the persisted BundleVersion with alot of the internal relationships filled in to help the caller understand all that this method did. Bundle files specifically are returned.
Throws:
Exception

createBundleVersionViaByteArray

public org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaByteArray(org.rhq.core.domain.auth.Subject subject,
                                                                                byte[] fileBytes)
                                                                         throws Exception
Description copied from interface: BundleManagerRemote
Creates a bundle version based on the actual bytes of a Bundle Distribution file. This is essentially the same as BundleManagerRemote.createBundleVersionViaFile(Subject, File) but the caller is providing the actual bytes of the file as opposed to the file itself. WARNING: obviously, this requires the entire distribution file to have been loaded fully in memory. For very large distribution files, this could cause OutOfMemoryErrors.

Specified by:
createBundleVersionViaByteArray in interface BundleManagerRemote
fileBytes - the file bits that make up the entire bundle distribution file
Returns:
the persisted BundleVersion with alot of the internal relationships filled in to help the caller understand all that this method did. Bundle files specifically are returned.
Throws:
Exception

createBundleVersionViaURL

public org.rhq.core.domain.bundle.BundleVersion createBundleVersionViaURL(org.rhq.core.domain.auth.Subject subject,
                                                                          String distributionFileUrl)
                                                                   throws Exception
Description copied from interface: BundleManagerRemote
Creates a bundle version based on a Bundle Distribution file. Typically a zip file, the bundle distribution contains the recipe for a supported bundle type, along with 0, 1 or more bundle files that will be associated with the bundle version. The recipe specifies the bundle name, version, version name and version description. If this is the initial version for the named bundle the bundle will be implicitly created. The bundle type is discovered by inspecting the distribution file.

Note, if the file is local it is more efficient to use BundleManagerRemote.createBundleVersionViaFile(Subject,File).

Specified by:
createBundleVersionViaURL in interface BundleManagerRemote
distributionFileUrl - a URL String to the Bundle Distribution file. It must be live, resolvable and read accessible by the RHQ server process.
Returns:
the persisted BundleVersion with alot of the internal relationships filled in to help the caller understand all that this method did. Bundle files specifically are returned.
Throws:
Exception

deleteBundles

public void deleteBundles(org.rhq.core.domain.auth.Subject subject,
                          int[] bundleIds)
                   throws Exception
Description copied from interface: BundleManagerRemote
Remove everything associated with the Bundles with the exception of files laid down by related deployments. Deployed files are left as is on the deployment platforms but the bundle mechanism will no longer track the deployment of all bundles that have been deleted.

Specified by:
deleteBundles in interface BundleManagerRemote
bundleIds - IDs of all bundles to be deleted
Throws:
Exception - if any part of the removal fails.

deleteBundle

public void deleteBundle(org.rhq.core.domain.auth.Subject subject,
                         int bundleId)
                  throws Exception
Description copied from interface: BundleManagerRemote
Remove everything associated with the Bundle with the exception of files laid down by related deployments. Deployed files are left as is on the deployment platforms but the bundle mechanism will no longer track the deployment.

Specified by:
deleteBundle in interface BundleManagerRemote
Throws:
Exception - if any part of the removal fails.

deleteBundleVersion

public void deleteBundleVersion(org.rhq.core.domain.auth.Subject subject,
                                int bundleVersionId,
                                boolean deleteBundleIfEmpty)
                         throws Exception
Description copied from interface: BundleManagerRemote
Remove everything associated with the BundleVersion with the exception of files laid down by related deployments. Deployed files are left as is on the deployment platforms but the bundle mechanism will no longer track the deployment.

Specified by:
deleteBundleVersion in interface BundleManagerRemote
deleteBundleIfEmpty - if true and if this method deletes the last bundle version for its bundle, then that bundle entity itself will be completely purged
Throws:
Exception - if any part of the removal fails.

findBundleDeploymentsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDeployment> findBundleDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                      org.rhq.core.domain.criteria.BundleDeploymentCriteria criteria)
Specified by:
findBundleDeploymentsByCriteria in interface BundleManagerRemote

findBundleDestinationsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleDestination> findBundleDestinationsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                        org.rhq.core.domain.criteria.BundleDestinationCriteria criteria)
Specified by:
findBundleDestinationsByCriteria in interface BundleManagerRemote

findBundleResourceDeploymentsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleResourceDeployment> findBundleResourceDeploymentsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                      org.rhq.core.domain.criteria.BundleResourceDeploymentCriteria criteria)
Specified by:
findBundleResourceDeploymentsByCriteria in interface BundleManagerRemote

findBundlesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.Bundle> findBundlesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                  org.rhq.core.domain.criteria.BundleCriteria criteria)
Specified by:
findBundlesByCriteria in interface BundleManagerRemote

findBundleFilesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleFile> findBundleFilesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                          org.rhq.core.domain.criteria.BundleFileCriteria criteria)
Specified by:
findBundleFilesByCriteria in interface BundleManagerRemote

findBundleVersionsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.BundleVersion> findBundleVersionsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                org.rhq.core.domain.criteria.BundleVersionCriteria criteria)
Specified by:
findBundleVersionsByCriteria in interface BundleManagerRemote

findBundlesWithLatestVersionCompositesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.bundle.composite.BundleWithLatestVersionComposite> findBundlesWithLatestVersionCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                                                 org.rhq.core.domain.criteria.BundleCriteria criteria)
Specified by:
findBundlesWithLatestVersionCompositesByCriteria in interface BundleManagerRemote

getAllBundleTypes

public List<org.rhq.core.domain.bundle.BundleType> getAllBundleTypes(org.rhq.core.domain.auth.Subject subject)
Specified by:
getAllBundleTypes in interface BundleManagerRemote

getBundleType

public org.rhq.core.domain.bundle.BundleType getBundleType(org.rhq.core.domain.auth.Subject subject,
                                                           String bundleTypeName)
Specified by:
getBundleType in interface BundleManagerRemote

getBundleVersionFilenames

public Set<String> getBundleVersionFilenames(org.rhq.core.domain.auth.Subject subject,
                                             int bundleVersionId,
                                             boolean withoutBundleFileOnly)
                                      throws Exception
Description copied from interface: BundleManagerRemote
Determine the files required for a BundleVersion and return all of the filenames or optionally, just those that lack BundleFiles for the BundleVersion. The recipe may be parsed as part of this call.

Specified by:
getBundleVersionFilenames in interface BundleManagerRemote
Parameters:
subject - user that must have proper permissions
bundleVersionId - the BundleVersion being queried
withoutBundleFileOnly - if true omit any filenames that already have a corresponding BundleFile for the BundleVersion.
Returns:
The List of filenames.
Throws:
Exception

scheduleBundleDeployment

public org.rhq.core.domain.bundle.BundleDeployment scheduleBundleDeployment(org.rhq.core.domain.auth.Subject subject,
                                                                            int bundleDeploymentId,
                                                                            boolean isCleanDeployment)
                                                                     throws Exception
Description copied from interface: BundleManagerRemote
Deploy the bundle to the destination, as described in the provided deployment. Deployment is asynchronous so return of this method does not indicate individual resource deployments are complete. The returned BundleDeployment can be used to track the history of the individual deployments.

TODO: Add the scheduling capability, currently it's Immediate.

Specified by:
scheduleBundleDeployment in interface BundleManagerRemote
Parameters:
subject - user that must have proper permissions
bundleDeploymentId - the BundleDeployment being used to guide the deployments
isCleanDeployment - if true perform a wipe of the deploy directory prior to the deployment. If false perform as an upgrade to the existing deployment, if any.
Returns:
the BundleDeployment record, updated with status and (resource) deployments.
Throws:
Exception

scheduleRevertBundleDeployment

public org.rhq.core.domain.bundle.BundleDeployment scheduleRevertBundleDeployment(org.rhq.core.domain.auth.Subject subject,
                                                                                  int bundleDestinationId,
                                                                                  String deploymentDescription,
                                                                                  boolean isCleanDeployment)
                                                                           throws Exception
Description copied from interface: BundleManagerRemote
For the specified destination, revert from the current live deployment to the deployment it had replaced. A revert first rolls back to the previous deployment (bundle version and configuration) and then rolls forward by replacing changed files that had been backed up during the most recent (live) deployment. The returned BundleDeployment represents the new live deployment and can be used to track the history of the individual revert deployments. Note that bundle deployment names are generated by this call. This provides useful, uniform naming for display. An optional, custom description can be added.

TODO: Add the scheduling capability, currently it's Immediate.

Specified by:
scheduleRevertBundleDeployment in interface BundleManagerRemote
Parameters:
subject - user that must have proper permissions
deploymentDescription - an optional longer description describing this deployment. If null defaults to the description of the previous deployment.
isCleanDeployment - if true perform a wipe of the deploy directory prior to the revert deployment. Backed up files will still be applied. If false perform as an upgrade to the existing deployment.
Returns:
the BundleDeployment record, updated with status and (resource) deployments.
Throws:
Exception

purgeBundleDestination

public void purgeBundleDestination(org.rhq.core.domain.auth.Subject subject,
                                   int bundleDestinationId)
                            throws Exception
Description copied from interface: BundleManagerRemote
Purges the destination's live deployment content from the remote platforms.

Specified by:
purgeBundleDestination in interface BundleManagerRemote
Parameters:
subject - user that must have proper permissions
bundleDestinationId - the ID of the destination that is to be purged of bundle content
Throws:
Exception

findCallTimeDataForResource

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.calltime.CallTimeDataComposite> findCallTimeDataForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                     int scheduleId,
                                                                                                                                     long beginTime,
                                                                                                                                     long endTime,
                                                                                                                                     org.rhq.core.domain.util.PageControl pc)
Specified by:
findCallTimeDataForResource in interface CallTimeDataManagerRemote

getConfiguration

public org.rhq.core.domain.configuration.Configuration getConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                        int configurationId)

getGroupPluginConfigurationUpdate

public org.rhq.core.domain.configuration.group.GroupPluginConfigurationUpdate getGroupPluginConfigurationUpdate(org.rhq.core.domain.auth.Subject subject,
                                                                                                                int configurationUpdateId)
Specified by:
getGroupPluginConfigurationUpdate in interface ConfigurationManagerRemote

getGroupResourceConfigurationUpdate

public org.rhq.core.domain.configuration.group.GroupResourceConfigurationUpdate getGroupResourceConfigurationUpdate(org.rhq.core.domain.auth.Subject subject,
                                                                                                                    int configurationUpdateId)
Specified by:
getGroupResourceConfigurationUpdate in interface ConfigurationManagerRemote

getLatestPluginConfigurationUpdate

public org.rhq.core.domain.configuration.PluginConfigurationUpdate getLatestPluginConfigurationUpdate(org.rhq.core.domain.auth.Subject subject,
                                                                                                      int resourceId)
Specified by:
getLatestPluginConfigurationUpdate in interface ConfigurationManagerRemote

getLatestResourceConfigurationUpdate

public org.rhq.core.domain.configuration.ResourceConfigurationUpdate getLatestResourceConfigurationUpdate(org.rhq.core.domain.auth.Subject subject,
                                                                                                          int resourceId)
Specified by:
getLatestResourceConfigurationUpdate in interface ConfigurationManagerRemote

getLiveResourceConfiguration

public org.rhq.core.domain.configuration.Configuration getLiveResourceConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                                    int resourceId,
                                                                                    boolean pingAgentFirst)
                                                                             throws Exception
Description copied from interface: ConfigurationManagerRemote
Get the currently live resource configuration for the Resource with the given id. This actually asks for the up-to-date configuration directly from the agent. An exception will be thrown if communications with the agent cannot be made.

Specified by:
getLiveResourceConfiguration in interface ConfigurationManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - resourceId
Returns:
the live configuration
Throws:
Exception - if failed to get the configuration from the agent

getPluginConfiguration

public org.rhq.core.domain.configuration.Configuration getPluginConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                              int resourceId)
Description copied from interface: ConfigurationManagerRemote
Get the current plugin configuration for the Resource with the given id, or null if the resource's plugin configuration is not yet initialized.

Specified by:
getPluginConfiguration in interface ConfigurationManagerRemote
resourceId - Resource Id
Returns:
the current plugin configuration for the Resource with the given id, or null if the resource's configuration is not yet initialized

getPluginConfigurationDefinitionForResourceType

public org.rhq.core.domain.configuration.definition.ConfigurationDefinition getPluginConfigurationDefinitionForResourceType(org.rhq.core.domain.auth.Subject subject,
                                                                                                                            int resourceTypeId)
Description copied from interface: ConfigurationManagerRemote
Return the plugin configuration definition for the ResourceType with the specified id.

Specified by:
getPluginConfigurationDefinitionForResourceType in interface ConfigurationManagerRemote
Parameters:
subject - the user who is requesting the plugin configuration definition
resourceTypeId - identifies the resource type whose plugin configuration definition is being requested
Returns:
the plugin configuration definition for the ResourceType with the specified id, or null if the ResourceType does not define a plugin configuration

getResourceConfiguration

public org.rhq.core.domain.configuration.Configuration getResourceConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                                int resourceId)
Description copied from interface: ConfigurationManagerRemote
Get the current Resource configuration.

Specified by:
getResourceConfiguration in interface ConfigurationManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - A resource id.
Returns:
The specified configuration.

getResourceConfigurationDefinitionForResourceType

public org.rhq.core.domain.configuration.definition.ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(org.rhq.core.domain.auth.Subject subject,
                                                                                                                              int resourceTypeId)
Description copied from interface: ConfigurationManagerRemote
Return the resource configuration definition for the ResourceType with the specified id.

Specified by:
getResourceConfigurationDefinitionForResourceType in interface ConfigurationManagerRemote
Parameters:
subject - the user who is requesting the resource configuration definition
resourceTypeId - identifies the resource type whose resource configuration definition is being requested
Returns:
the resource configuration definition for the ResourceType with the specified id, or null if the ResourceType does not define a resource configuration

getResourceConfigurationDefinitionWithTemplatesForResourceType

public org.rhq.core.domain.configuration.definition.ConfigurationDefinition getResourceConfigurationDefinitionWithTemplatesForResourceType(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                           int resourceTypeId)
Description copied from interface: ConfigurationManagerRemote
Return the resource configuration definition for the ResourceType with the specified id. The templates will be loaded in the definition returned from this call.

Specified by:
getResourceConfigurationDefinitionWithTemplatesForResourceType in interface ConfigurationManagerRemote
Parameters:
subject - the user who is requesting the resource configuration definition
resourceTypeId - identifies the resource type whose resource configuration definition is being requested
Returns:
the resource configuration definition for the ResourceType with the specified id, or null if the ResourceType does not define a resource configuration

isGroupResourceConfigurationUpdateInProgress

public boolean isGroupResourceConfigurationUpdateInProgress(org.rhq.core.domain.auth.Subject subject,
                                                            int resourceGroupId)
Specified by:
isGroupResourceConfigurationUpdateInProgress in interface ConfigurationManagerRemote

isResourceConfigurationUpdateInProgress

public boolean isResourceConfigurationUpdateInProgress(org.rhq.core.domain.auth.Subject subject,
                                                       int resourceId)
Description copied from interface: ConfigurationManagerRemote
Get whether the the specified resource is in the process of updating its configuration.

Specified by:
isResourceConfigurationUpdateInProgress in interface ConfigurationManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - A resource id.
Returns:
True if in progress, else False.

scheduleGroupResourceConfigurationUpdate

public int scheduleGroupResourceConfigurationUpdate(org.rhq.core.domain.auth.Subject subject,
                                                    int compatibleGroupId,
                                                    Map<Integer,org.rhq.core.domain.configuration.Configuration> newResourceConfigurationMap)
Specified by:
scheduleGroupResourceConfigurationUpdate in interface ConfigurationManagerRemote

updatePluginConfiguration

public org.rhq.core.domain.configuration.PluginConfigurationUpdate updatePluginConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                                             int resourceId,
                                                                                             org.rhq.core.domain.configuration.Configuration newConfiguration)
                                                                                      throws ResourceNotFoundException
Description copied from interface: ConfigurationManagerRemote
Updates the plugin configuration used to connect and communicate with the resource. The given newConfiguration is usually a modified version of a configuration returned by ConfigurationManagerRemote.getPluginConfiguration(Subject, int).

Specified by:
updatePluginConfiguration in interface ConfigurationManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - a Resource id
newConfiguration - the new plugin configuration
Returns:
the plugin configuration update item corresponding to this request
Throws:
ResourceNotFoundException

updateResourceConfiguration

public org.rhq.core.domain.configuration.ResourceConfigurationUpdate updateResourceConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                                                 int resourceId,
                                                                                                 org.rhq.core.domain.configuration.Configuration newConfiguration)
                                                                                          throws ResourceNotFoundException,
                                                                                                 ConfigurationUpdateStillInProgressException
Description copied from interface: ConfigurationManagerRemote
This method is called when a user has requested to change the resource configuration for an existing resource. If the user does not have the proper permissions to change the resource's configuration, an exception is thrown.

This will not wait for the agent to finish the configuration update. This will return after the request is sent. Once the agent finishes with the request, it will send the completed request information to #completedResourceConfigurationUpdate(AbstractResourceConfigurationUpdate).

Specified by:
updateResourceConfiguration in interface ConfigurationManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - identifies the resource to be updated
newConfiguration - the resource's desired new configuration
Returns:
the resource configuration update item corresponding to this request
Throws:
ResourceNotFoundException
ConfigurationUpdateStillInProgressException

getPackageTypeConfigurationDefinition

public org.rhq.core.domain.configuration.definition.ConfigurationDefinition getPackageTypeConfigurationDefinition(org.rhq.core.domain.auth.Subject subject,
                                                                                                                  int packageTypeId)
Description copied from interface: ConfigurationManagerRemote
Return the deploy configuration definition for the PackageType with the specified id.

Specified by:
getPackageTypeConfigurationDefinition in interface ConfigurationManagerRemote
Parameters:
subject - the user who is requesting the plugin configuration definition
packageTypeId - identifies the package type whose configuration definition is being requested
Returns:
the the deploy configuration definition for the PackageType with the specified id.

translateResourceConfiguration

public org.rhq.core.domain.configuration.Configuration translateResourceConfiguration(org.rhq.core.domain.auth.Subject subject,
                                                                                      int resourceId,
                                                                                      org.rhq.core.domain.configuration.Configuration configuration,
                                                                                      boolean fromStructured)
                                                                               throws ResourceNotFoundException
Specified by:
translateResourceConfiguration in interface ConfigurationManagerRemote
Throws:
ResourceNotFoundException

createPackageVersion

public org.rhq.core.domain.content.PackageVersion createPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                       String packageName,
                                                                       int packageTypeId,
                                                                       String version,
                                                                       Integer architectureId,
                                                                       byte[] packageBytes)
Description copied from interface: ContentManagerRemote
Creates a new package version in the system. If the parent package (identified by the packageName parameter) does not exist, it will be created. If a package version exists with the specified version ID, a new one will not be created and the existing package version instance will be returned.

Specified by:
createPackageVersion in interface ContentManagerRemote
Parameters:
subject - The logged in subject
packageName - parent package name; uniquely identifies the package under which this version goes
packageTypeId - identifies the type of package in case the general package needs to be created
version - identifies the version to be create
architectureId - architecture of the newly created package version. If null then no architecture restriction.
Returns:
newly created package version if one did not exist; existing package version that matches these data if one was found

createPackageVersionWithDisplayVersion

public org.rhq.core.domain.content.PackageVersion createPackageVersionWithDisplayVersion(org.rhq.core.domain.auth.Subject subject,
                                                                                         String packageName,
                                                                                         int packageTypeId,
                                                                                         String version,
                                                                                         String displayVersion,
                                                                                         Integer architectureId,
                                                                                         byte[] packageBytes)
Description copied from interface: ContentManagerRemote
Creates a new package version in the system. If the parent package (identified by the packageName parameter) does not exist, it will be created. If a package version exists with the specified version ID, a new one will not be created and the existing package version instance will be returned.

Specified by:
createPackageVersionWithDisplayVersion in interface ContentManagerRemote
Parameters:
subject - The logged in subject
packageName - parent package name; uniquely identifies the package under which this version goes
packageTypeId - identifies the type of package in case the general package needs to be created
version - identifies the version to be create
architectureId - architecture of the newly created package version. If null then no architecture restriction.
Returns:
newly created package version if one did not exist; existing package version that matches these data if one was found

deletePackages

public void deletePackages(org.rhq.core.domain.auth.Subject subject,
                           int resourceId,
                           int[] installedPackageIds,
                           String requestNotes)
Description copied from interface: ContentManagerRemote
Deletes the specified package from the resource.

Specified by:
deletePackages in interface ContentManagerRemote
Parameters:
subject - The logged in subject
resourceId - identifies the resource from which the packages should be deleted
installedPackageIds - identifies all of the packages to be deleted

deletePackageVersion

public void deletePackageVersion(org.rhq.core.domain.auth.Subject subject,
                                 int packageVersionId)
Description copied from interface: ContentManagerRemote
Deletes the specified PackageVersion from the system. The PackageVersion must be an orphan to be deleted. If it is referenced by a content source, repo or installed package it must be removed via the higher level construct and this call will have no effect.

Specified by:
deletePackageVersion in interface ContentManagerRemote
Parameters:
subject - The logged in subject

deployPackages

public void deployPackages(org.rhq.core.domain.auth.Subject subject,
                           int[] resourceIds,
                           int[] packageVersionIds)
Description copied from interface: ContentManagerRemote
Deploys packages on the specified resources. Each installed package entry should be populated with the PackageVersion being installed, along with the deployment configuration values if any. This method will take care of populating the rest of the values in each installed package object.

Specified by:
deployPackages in interface ContentManagerRemote
Parameters:
subject - The logged in subject
resourceIds - identifies the resources against which the package will be deployed
packageVersionIds - packageVersions we want to install

deployPackagesWithNote

public void deployPackagesWithNote(org.rhq.core.domain.auth.Subject subject,
                                   int[] resourceIds,
                                   int[] packageVersionIds,
                                   String requestNotes)
Description copied from interface: ContentManagerRemote
Deploys packages on the specified resources. Each installed package entry should be populated with the PackageVersion being installed, along with the deployment configuration values if any. This method will take care of populating the rest of the values in each installed package object.

Specified by:
deployPackagesWithNote in interface ContentManagerRemote
Parameters:
subject - The logged in subject
resourceIds - identifies the resources against which the package will be deployed
packageVersionIds - packageVersions we want to install
requestNotes - request notes

findArchitectures

public List<org.rhq.core.domain.content.Architecture> findArchitectures(org.rhq.core.domain.auth.Subject subject)
Description copied from interface: ContentManagerRemote
Returns all architectures known to the system.

Specified by:
findArchitectures in interface ContentManagerRemote
Parameters:
subject - The logged in subject
Returns:
list of all architectures in the database

findInstalledPackagesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.InstalledPackage> findInstalledPackagesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                       org.rhq.core.domain.criteria.InstalledPackageCriteria criteria)
Specified by:
findInstalledPackagesByCriteria in interface ContentManagerRemote
criteria - InstalledPackageCriteria
Returns:
InstalledPackages for the criteria

findPackageTypes

public List<org.rhq.core.domain.content.PackageType> findPackageTypes(org.rhq.core.domain.auth.Subject subject,
                                                                      String resourceTypeName,
                                                                      String pluginName)
                                                               throws ResourceTypeNotFoundException
Description copied from interface: ContentManagerRemote
This gets the package types that can be deployed to the given resource. It is a function of the resource type of the resource.

Specified by:
findPackageTypes in interface ContentManagerRemote
Parameters:
subject - The logged in subject
resourceTypeName - The resource type in question
Returns:
The requested list of package types. Can be empty.
Throws:
ResourceTypeNotFoundException

findPackageType

public org.rhq.core.domain.content.PackageType findPackageType(org.rhq.core.domain.auth.Subject subject,
                                                               Integer resourceTypeId,
                                                               String packageTypeName)
Description copied from interface: ContentManagerRemote
This re tries to find a package type of given name defined by the resource type provided.

The resource type id can be null, in which case only the serverside defined package types are searched for.

Specified by:
findPackageType in interface ContentManagerRemote
Parameters:
subject - the authenticated user
resourceTypeId - the id of the resource type associated with the package type or null if only server-side package types should be searched for
packageTypeName - the name of the package type to find
Returns:

findPackageTypeWithVersionFormat

public org.rhq.core.domain.content.composite.PackageTypeAndVersionFormatComposite findPackageTypeWithVersionFormat(org.rhq.core.domain.auth.Subject subject,
                                                                                                                   Integer resourceTypeId,
                                                                                                                   String packageTypeName)
Description copied from interface: ContentManagerRemote
Similar to ContentManagerRemote.findPackageType(Subject, Integer, String) but returns the package type along with the version format specification.

Specified by:
findPackageTypeWithVersionFormat in interface ContentManagerRemote
Returns:

getBackingPackageForResource

public org.rhq.core.domain.content.InstalledPackage getBackingPackageForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                 int resourceId)
Description copied from interface: ContentManagerRemote
For a resource that is content-backed (aka package-backed), this call will return InstalledPackage information for the backing content (package).

Specified by:
getBackingPackageForResource in interface ContentManagerRemote
resourceId - a valid resource
Returns:
The InstalledPackage object for the content-packed resource. Or null for non-existent or non-package backed resource.

getPackageBytes

public byte[] getPackageBytes(org.rhq.core.domain.auth.Subject subject,
                              int resourceId,
                              int installedPackageId)
Description copied from interface: ContentManagerRemote
This can be a dangerous call for large packages as the entire package will attempt to be loaded.

Specified by:
getPackageBytes in interface ContentManagerRemote
Returns:
the package bytes

findPackagesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.Package> findPackagesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                     org.rhq.core.domain.criteria.PackageCriteria criteria)
Description copied from interface: ContentManagerRemote
If the criteria object filters on repo id, the subject needs to be able to access that repo. If there is no filter on repos, the subject needs to have MANAGE_REPOSITORIES permission.

Specified by:
findPackagesByCriteria in interface ContentManagerRemote
Returns:

findPackagesWithLatestVersion

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageAndLatestVersionComposite> findPackagesWithLatestVersion(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                               org.rhq.core.domain.criteria.PackageCriteria criteria)
Description copied from interface: ContentManagerRemote
Akin to ContentManagerRemote.findPackagesByCriteria(Subject, PackageCriteria) but also determines the latest version of the returned packages.

The provided criteria has to be limited to a specific repo using PackageCriteria.addFilterRepoId(Integer).

Specified by:
findPackagesWithLatestVersion in interface ContentManagerRemote
Returns:

ignoreResources

public void ignoreResources(org.rhq.core.domain.auth.Subject subject,
                            int[] resourceIds)
Description copied from interface: DiscoveryBossRemote
Analogous to the GUI feature Ignore Resources in the auto discovery queue. Note, to query for Resources with a specific InventoryStatus, see ResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).

Specified by:
ignoreResources in interface DiscoveryBossRemote

importResources

public void importResources(org.rhq.core.domain.auth.Subject subject,
                            int[] resourceIds)
Description copied from interface: DiscoveryBossRemote
Analogous to the GUI feature Import Resources in the auto discovery queue. Note, to query for Resources with a specific InventoryStatus, see ResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).

Specified by:
importResources in interface DiscoveryBossRemote

unignoreResources

public void unignoreResources(org.rhq.core.domain.auth.Subject subject,
                              int[] resourceIds)
Description copied from interface: DiscoveryBossRemote
Analogous to the GUI feature Unignore Resources in the auto discovery queue. Note, to query for Resources with a specific InventoryStatus, see ResourceManagerRemote.findResourcesByCriteria(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.criteria.ResourceCriteria).

Specified by:
unignoreResources in interface DiscoveryBossRemote

manuallyAddResource

public org.rhq.core.domain.resource.Resource manuallyAddResource(org.rhq.core.domain.auth.Subject subject,
                                                                 int resourceTypeId,
                                                                 int parentResourceId,
                                                                 org.rhq.core.domain.configuration.Configuration pluginConfiguration)
                                                          throws Exception
Description copied from interface: DiscoveryBossRemote
Manually Add the resource of the specified type to inventory using the specified plugin configuration (i.e. connection properties). This will not only create a new resource, but it will also ensure the resource component is activated (and thus connects to the managed resource).

Specified by:
manuallyAddResource in interface DiscoveryBossRemote
Parameters:
subject - the user making the request
resourceTypeId - the type of resource to be manually discovered
parentResourceId - the id of the resource that will be the parent of the manually discovered resource
pluginConfiguration - the properties that should be used to connect to the underlying managed resource
Returns:
The resource. Note that the resource may have existed already if given the provided pluginConfiguration leads to a previously defined resource.
Throws:
Exception - if connecting to the underlying managed resource failed due to invalid plugin configuration or if the manual discovery fails for any reason.

findEventsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.event.Event> findEventsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                               org.rhq.core.domain.criteria.EventCriteria criteria)
Specified by:
findEventsByCriteria in interface EventManagerRemote

getSeverityBuckets

public org.rhq.core.domain.event.EventSeverity[] getSeverityBuckets(org.rhq.core.domain.auth.Subject subject,
                                                                    int resourceId,
                                                                    long begin,
                                                                    long end,
                                                                    int numBuckets)
Specified by:
getSeverityBuckets in interface EventManagerRemote

getSeverityBucketsForAutoGroup

public org.rhq.core.domain.event.EventSeverity[] getSeverityBucketsForAutoGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                int parentResourceId,
                                                                                int resourceTypeId,
                                                                                long begin,
                                                                                long end,
                                                                                int numBuckets)
Specified by:
getSeverityBucketsForAutoGroup in interface EventManagerRemote

getSeverityBucketsForCompGroup

public org.rhq.core.domain.event.EventSeverity[] getSeverityBucketsForCompGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                int resourceGroupId,
                                                                                long begin,
                                                                                long end,
                                                                                int numBuckets)
Specified by:
getSeverityBucketsForCompGroup in interface EventManagerRemote

findBaselinesForResource

public List<org.rhq.core.domain.measurement.MeasurementBaseline> findBaselinesForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                          int resourceId)
Specified by:
findBaselinesForResource in interface MeasurementBaselineManagerRemote

findCurrentTraitsForResource

public List<org.rhq.core.domain.measurement.MeasurementDataTrait> findCurrentTraitsForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                               int resourceId,
                                                                                               org.rhq.core.domain.measurement.DisplayType displayType)
Specified by:
findCurrentTraitsForResource in interface MeasurementDataManagerRemote

findDataForCompatibleGroup

public List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
                                                                                                                               int groupId,
                                                                                                                               int definitionId,
                                                                                                                               long beginTime,
                                                                                                                               long endTime,
                                                                                                                               int numPoints)
Specified by:
findDataForCompatibleGroup in interface MeasurementDataManagerRemote

findDataForResource

public List<List<org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite>> findDataForResource(org.rhq.core.domain.auth.Subject subject,
                                                                                                                        int resourceId,
                                                                                                                        int[] definitionIds,
                                                                                                                        long beginTime,
                                                                                                                        long endTime,
                                                                                                                        int numPoints)
Specified by:
findDataForResource in interface MeasurementDataManagerRemote

findLiveData

public Set<org.rhq.core.domain.measurement.MeasurementData> findLiveData(org.rhq.core.domain.auth.Subject subject,
                                                                         int resourceId,
                                                                         int[] definitionIds)
Specified by:
findLiveData in interface MeasurementDataManagerRemote

findTraits

public List<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraits(org.rhq.core.domain.auth.Subject subject,
                                                                             int resourceId,
                                                                             int definitionId)
Specified by:
findTraits in interface MeasurementDataManagerRemote

getAggregate

public MeasurementAggregate getAggregate(org.rhq.core.domain.auth.Subject subject,
                                         int scheduleId,
                                         long startTime,
                                         long endTime)
Specified by:
getAggregate in interface MeasurementDataManagerRemote

findTraitsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementDataTrait> findTraitsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                    org.rhq.core.domain.criteria.MeasurementDataTraitCriteria criteria)
Specified by:
findTraitsByCriteria in interface MeasurementDataManagerRemote

findMeasurementDefinitionsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementDefinition> findMeasurementDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                     org.rhq.core.domain.criteria.MeasurementDefinitionCriteria criteria)
Specified by:
findMeasurementDefinitionsByCriteria in interface MeasurementDefinitionManagerRemote

getMeasurementDefinition

public org.rhq.core.domain.measurement.MeasurementDefinition getMeasurementDefinition(org.rhq.core.domain.auth.Subject subject,
                                                                                      int definitionId)
Specified by:
getMeasurementDefinition in interface MeasurementDefinitionManagerRemote

findProblemResources

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.composite.ProblemResourceComposite> findProblemResources(org.rhq.core.domain.auth.Subject subject,
                                                                                                                               long oldestDate,
                                                                                                                               org.rhq.core.domain.util.PageControl pc)
Specified by:
findProblemResources in interface MeasurementProblemManagerRemote

disableSchedulesForResource

public void disableSchedulesForResource(org.rhq.core.domain.auth.Subject subject,
                                        int resourceId,
                                        int[] measurementDefinitionIds)
Specified by:
disableSchedulesForResource in interface MeasurementScheduleManagerRemote

disableSchedulesForCompatibleGroup

public void disableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
                                               int groupId,
                                               int[] measurementDefinitionIds)
Specified by:
disableSchedulesForCompatibleGroup in interface MeasurementScheduleManagerRemote

disableMeasurementTemplates

public void disableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
                                        int[] measurementDefinitionIds)
Specified by:
disableMeasurementTemplates in interface MeasurementScheduleManagerRemote

enableSchedulesForResource

public void enableSchedulesForResource(org.rhq.core.domain.auth.Subject subject,
                                       int resourceId,
                                       int[] measurementDefinitionIds)
Specified by:
enableSchedulesForResource in interface MeasurementScheduleManagerRemote

enableSchedulesForCompatibleGroup

public void enableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
                                              int groupId,
                                              int[] measurementDefinitionIds)
Specified by:
enableSchedulesForCompatibleGroup in interface MeasurementScheduleManagerRemote

enableMeasurementTemplates

public void enableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
                                       int[] measurementDefinitionIds)
Specified by:
enableMeasurementTemplates in interface MeasurementScheduleManagerRemote

updateSchedule

public void updateSchedule(org.rhq.core.domain.auth.Subject subject,
                           org.rhq.core.domain.measurement.MeasurementSchedule schedule)
Specified by:
updateSchedule in interface MeasurementScheduleManagerRemote

updateSchedulesForResource

public void updateSchedulesForResource(org.rhq.core.domain.auth.Subject subject,
                                       int resourceId,
                                       int[] measurementDefinitionIds,
                                       long collectionInterval)
Specified by:
updateSchedulesForResource in interface MeasurementScheduleManagerRemote

updateSchedulesForCompatibleGroup

public void updateSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
                                              int groupId,
                                              int[] measurementDefinitionIds,
                                              long collectionInterval)
Specified by:
updateSchedulesForCompatibleGroup in interface MeasurementScheduleManagerRemote

updateMeasurementTemplates

public void updateMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
                                       int[] measurementDefinitionIds,
                                       long collectionInterval)
Specified by:
updateMeasurementTemplates in interface MeasurementScheduleManagerRemote

findSchedulesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                      org.rhq.core.domain.criteria.MeasurementScheduleCriteria criteria)
Specified by:
findSchedulesByCriteria in interface MeasurementScheduleManagerRemote

cancelOperationHistory

public void cancelOperationHistory(org.rhq.core.domain.auth.Subject subject,
                                   int operationHistoryId,
                                   boolean ignoreAgentErrors)
Description copied from interface: OperationManagerRemote
Cancels a currently in-progress operation. Doing this will attempt to stop the invocation if it is currently running on the agent.

Note that this method will handle canceling a resource or group history - depending on what the given historyId refers to. If it refers to a group history, it will cancel all the resource invocations for that group invocation.

If the cancel request succeeds, the history element will be checked against the AlertConditionCacheManager.

Specified by:
cancelOperationHistory in interface OperationManagerRemote
Parameters:
subject - The logged in user's subject.
ignoreAgentErrors - if true this will still flag the history items in the database as canceled, even if the method failed to notify the agent(s) that the operation should be canceled. If false, this method will not update the history status unless it could successfully tell the agent(s) to cancel the operation.

deleteOperationHistory

public void deleteOperationHistory(org.rhq.core.domain.auth.Subject subject,
                                   int operationHistoryId,
                                   boolean purgeInProgress)
Description copied from interface: OperationManagerRemote
Purges the history from the database. Doing this loses all audit trails of the invoked operation. This can handle deleting a group or resource history.

Note that this method will handle deleting a resource or group history - depending on what the given historyId refers to.

Specified by:
deleteOperationHistory in interface OperationManagerRemote
Parameters:
subject - The logged in user's subject.
purgeInProgress - if true, even if the operation is in progress, the history entity will be deleted. You normally do not want to purge operation histories until they are completed, so you normally pass in false, but a user might want to force it to be purged, in which case the UI will want to pass in true

findGroupOperationHistoriesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> findGroupOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                    org.rhq.core.domain.criteria.GroupOperationHistoryCriteria criteria)
Specified by:
findGroupOperationHistoriesByCriteria in interface OperationManagerRemote

findOperationDefinitionsByCriteria

public List<org.rhq.core.domain.operation.OperationDefinition> findOperationDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                  org.rhq.core.domain.criteria.OperationDefinitionCriteria criteria)
Specified by:
findOperationDefinitionsByCriteria in interface OperationManagerRemote

findResourceOperationHistoriesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findResourceOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                                          org.rhq.core.domain.criteria.ResourceOperationHistoryCriteria criteria)
Specified by:
findResourceOperationHistoriesByCriteria in interface OperationManagerRemote

findScheduledGroupOperations

public List<org.rhq.core.domain.operation.bean.GroupOperationSchedule> findScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject,
                                                                                                    int groupId)
                                                                                             throws Exception
Specified by:
findScheduledGroupOperations in interface OperationManagerRemote
Throws:
Exception

findScheduledResourceOperations

public List<org.rhq.core.domain.operation.bean.ResourceOperationSchedule> findScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject,
                                                                                                          int resourceId)
                                                                                                   throws Exception
Description copied from interface: OperationManagerRemote
Returns the list of scheduled operations for the given resource. This only includes scheduled jobs on the individual resource - it will not include schedules from groups, even if the resource is a member of a group that has scheduled jobs.

Specified by:
findScheduledResourceOperations in interface OperationManagerRemote
Returns:
resource scheduled operations
Throws:
Exception - TODO

scheduleGroupOperation

public org.rhq.core.domain.operation.bean.GroupOperationSchedule scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
                                                                                        int groupId,
                                                                                        int[] executionOrderResourceIds,
                                                                                        boolean haltOnFailure,
                                                                                        String operationName,
                                                                                        org.rhq.core.domain.configuration.Configuration parameters,
                                                                                        long delay,
                                                                                        long repeatInterval,
                                                                                        int repeatCount,
                                                                                        int timeout,
                                                                                        String description)
                                                                                 throws ScheduleException
Specified by:
scheduleGroupOperation in interface OperationManagerRemote
Returns:
Throws:
ScheduleException

scheduleResourceOperation

public org.rhq.core.domain.operation.bean.ResourceOperationSchedule scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
                                                                                              int resourceId,
                                                                                              String operationName,
                                                                                              long delay,
                                                                                              long repeatInterval,
                                                                                              int repeatCount,
                                                                                              int timeout,
                                                                                              org.rhq.core.domain.configuration.Configuration parameters,
                                                                                              String description)
                                                                                       throws ScheduleException
Description copied from interface: OperationManagerRemote
Schedules an operation for execution on the given resource.

Specified by:
scheduleResourceOperation in interface OperationManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the resource that is the target of the operation
operationName - the actual operation to invoke
delay - the number of milliseconds to delay this operation, 0 for immediate start.
repeatInterval - the number of milliseconds after completion to repeat this operation. 0 for no repeat.
repeatCount - the number of times to repeat this operation. -1 infinite, 0 for no repeat.
timeout - the number of seconds before this operation will fail due to timeout. 0 for no timeout.
parameters - the names parameters for the operation.
description - user-entered description of the job to be scheduled
Returns:
the information on the new schedule
Throws:
ScheduleException - TODO

unscheduleGroupOperation

public void unscheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
                                     String jobId,
                                     int resourceGroupId)
                              throws UnscheduleException
Description copied from interface: OperationManagerRemote
Unschedules the group operation identified with the given job ID.

Specified by:
unscheduleGroupOperation in interface OperationManagerRemote
Parameters:
subject - the user who is asking to unschedule the operation
jobId - identifies the operation to unschedule
resourceGroupId - the ID of the group whose operation is getting unscheduled
Throws:
UnscheduleException - TODO

unscheduleResourceOperation

public void unscheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
                                        String jobId,
                                        int resourceId)
                                 throws UnscheduleException
Description copied from interface: OperationManagerRemote
Unschedules the resource operation identified with the given job ID.

Specified by:
unscheduleResourceOperation in interface OperationManagerRemote
Parameters:
subject - The logged in user's subject.
jobId - identifies the operation to unschedule
resourceId - the ID of the resource whose operation is getting unscheduled
Throws:
UnscheduleException - TODO

addPackageVersionsToRepo

public void addPackageVersionsToRepo(org.rhq.core.domain.auth.Subject subject,
                                     int repoId,
                                     int[] packageVersionIds)
Description copied from interface: RepoManagerRemote
Associates the package versions (identified by their IDs) to the given repo (also identified by its ID).

Specified by:
addPackageVersionsToRepo in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
repoId - the ID of the repo
packageVersionIds - the list of package version IDs to add to the repo

createRepo

public org.rhq.core.domain.content.Repo createRepo(org.rhq.core.domain.auth.Subject subject,
                                                   org.rhq.core.domain.content.Repo repo)
                                            throws RepoException
Description copied from interface: RepoManagerRemote
Creates a new Repo. Note that the created repo will not have any content sources assigned and no resources will be subscribed. It is a virgin repo.

Specified by:
createRepo in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
repo - a new repo object.
Returns:
the newly created repo
Throws:
RepoException - if a repo already exists with the same name

deleteRepo

public void deleteRepo(org.rhq.core.domain.auth.Subject subject,
                       int repoId)
Description copied from interface: RepoManagerRemote
Deletes the indicated repo. If this deletion orphans package versions (that is, its originating resource or content source has been deleted), this will also purge those orphaned package versions.

Specified by:
deleteRepo in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
repoId - identifies the repo to delete

findRepos

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)
Description copied from interface: RepoManagerRemote
Returns all imported repos in the server.

Specified by:
findRepos in interface RepoManagerRemote
Parameters:
subject - user making the request
pc - used for pagination
Returns:
paged list

findReposByCriteria

public 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)
Description copied from interface: RepoManagerRemote
Returns all repos that match the given criteria.

Specified by:
findReposByCriteria in interface RepoManagerRemote
Parameters:
subject - user making the query
criteria - describes how the query should function; may not be null
Returns:
any repos that match the given criteria; empty list if none match

findPackageVersionsInRepo

public 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)
Description copied from interface: RepoManagerRemote
Returns the set of package versions that can currently be accessed via the given repo.

Specified by:
findPackageVersionsInRepo in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
repoId - identifies the repo
filter - A repo filter.
pc - pagination controls
Returns:
the package versions that are available in the repo

findPackageVersionsInRepoByCriteria

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)
Specified by:
findPackageVersionsInRepoByCriteria in interface RepoManagerRemote
criteria - Caller must add a valid repoId via PackageVersionCriteria.addFilterRepoId(Integer)}
Returns:
PackageVersions for the repo

getLatestPackageVersion

public org.rhq.core.domain.content.PackageVersion getLatestPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                          int packageId,
                                                                          int repoId)
Description copied from interface: RepoManagerRemote
Returns the latest package version of the supplied package. The latest version is determined using a comparator which is found using the following rules:
  1. determine the comparator using the package type behavior if one is setup for the package type
  2. If no package behavior exists, use PackageVersion.DEFAULT_COMPARATOR

Specified by:
getLatestPackageVersion in interface RepoManagerRemote
Parameters:
subject - the authenticated user
packageId - the id of the package to find the latest version for.
repoId - the repo where to take the package versions of the package from
Returns:

deletePackageVersionsFromRepo

public boolean deletePackageVersionsFromRepo(org.rhq.core.domain.auth.Subject subject,
                                             int repoId,
                                             int[] packageVersionIds)
Description copied from interface: RepoManagerRemote
Deletes package versions from a repo if they are not referenced by a content source.

The package versions themselves are not deleted until some content source or repository is deleted at which point orphans detection is performed.

Specified by:
deletePackageVersionsFromRepo in interface RepoManagerRemote
Returns:
true if all the package versions were successfully deleted, false if some references exist.

findSubscribedResources

public 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)
Description copied from interface: RepoManagerRemote
Gets all resources that are subscribed to the given repo.

Specified by:
findSubscribedResources in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
Returns:
the list of subscribers

findSubscriptions

public List<org.rhq.core.domain.content.transfer.SubscribedRepo> findSubscriptions(org.rhq.core.domain.auth.Subject subject,
                                                                                   int resourceId)
Description copied from interface: RepoManagerRemote
Get a list of truncated Repo objects that represent the subscriptions for the specified resource.

Specified by:
findSubscriptions in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - The id of the resource.
Returns:
A list of repos.

getRepo

public org.rhq.core.domain.content.Repo getRepo(org.rhq.core.domain.auth.Subject subject,
                                                int repoId)
Description copied from interface: RepoManagerRemote
Returns the repo with the given id; throws an error if one does not exist at that id.

Specified by:
getRepo in interface RepoManagerRemote
Parameters:
subject - user whose permissions will be checked for access to the repo
repoId - identifies the repo to be retrieved
Returns:
details describing the repo

subscribeResourceToRepos

public void subscribeResourceToRepos(org.rhq.core.domain.auth.Subject subject,
                                     int resourceId,
                                     int[] repoIds)
Description copied from interface: RepoManagerRemote
Subscribes the identified resource to the set of identified repos. Once complete, the resource will be able to access all package content from all content sources that are assigned to the given repos.

Specified by:
subscribeResourceToRepos in interface RepoManagerRemote
Parameters:
subject - 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.

unsubscribeResourceFromRepos

public void unsubscribeResourceFromRepos(org.rhq.core.domain.auth.Subject subject,
                                         int resourceId,
                                         int[] repoIds)
Description copied from interface: RepoManagerRemote
Unsubscribes the identified resource from the set of identified repos.

Specified by:
unsubscribeResourceFromRepos in interface RepoManagerRemote
Parameters:
subject - 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.

updateRepo

public org.rhq.core.domain.content.Repo updateRepo(org.rhq.core.domain.auth.Subject subject,
                                                   org.rhq.core.domain.content.Repo repo)
                                            throws RepoException
Description copied from interface: RepoManagerRemote
Update an existing Repo 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).

Specified by:
updateRepo in interface RepoManagerRemote
Parameters:
subject - The logged in user's subject.
repo - to be updated
Returns:
Repo that was updated
Throws:
RepoException

findPackageVersionsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.PackageVersion> findPackageVersionsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                   org.rhq.core.domain.criteria.PackageVersionCriteria criteria)
Description copied from interface: ContentManagerRemote
If a resourceId filter is not set via PackageVersionCriteria.addFilterResourceId() then this method requires InventoryManager permissions. When set the user must have permission to view the resource.

Specified by:
findPackageVersionsByCriteria in interface ContentManagerRemote
Returns:
Installed PackageVersions for the resource

synchronizeRepos

public int synchronizeRepos(org.rhq.core.domain.auth.Subject subject,
                            int[] repoIds)
                     throws Exception
Specified by:
synchronizeRepos in interface RepoManagerRemote
Throws:
Exception

createResource

public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject,
                                                                         int parentResourceId,
                                                                         int resourceTypeId,
                                                                         String resourceName,
                                                                         org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                         org.rhq.core.domain.configuration.Configuration resourceConfiguration)

createResource

public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject,
                                                                         int parentResourceId,
                                                                         int resourceTypeId,
                                                                         String resourceName,
                                                                         org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                         org.rhq.core.domain.configuration.Configuration resourceConfiguration,
                                                                         Integer timeout)
Description copied from interface: ResourceFactoryManagerRemote
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONFIGURATION. If this call is made for a resource type that cannot be created via a configuration, the plugin container will throw an exception.

Specified by:
createResource in interface ResourceFactoryManagerRemote
Parameters:
subject - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
resourceTypeId - type of resource to create
resourceName - name of the resource being created
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
resourceConfiguration - resource configuration for the new resource
timeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.

createPackageBackedResource

public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
                                                                                      int parentResourceId,
                                                                                      int newResourceTypeId,
                                                                                      String newResourceName,
                                                                                      org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                                      String packageName,
                                                                                      String packageVersion,
                                                                                      Integer architectureId,
                                                                                      org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                                      byte[] packageBits)

createPackageBackedResource

public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
                                                                                      int parentResourceId,
                                                                                      int newResourceTypeId,
                                                                                      String newResourceName,
                                                                                      org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                                      String packageName,
                                                                                      String packageVersion,
                                                                                      Integer architectureId,
                                                                                      org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                                      byte[] packageBits,
                                                                                      Integer timeout)
Description copied from interface: ResourceFactoryManagerRemote
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a resource type that cannot be created via an package, the plugin container will throw an exception.

Specified by:
createPackageBackedResource in interface ResourceFactoryManagerRemote
Parameters:
subject - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
newResourceTypeId - identifies the type of resource being created
newResourceName - Ignored, pass null. This is determined from the package.
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
packageName - name of the package that will be created as a result of this resource create
packageVersion - The string version of the package. If null will be set to system timestamp (long)
architectureId - Id of the target architecture of the package, null indicates NoArch (any).
deploymentTimeConfiguration - dictates how the package will be deployed
packageBits - content of the package to create
timeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.

createPackageBackedResourceViaPackageVersion

public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                                                       int parentResourceId,
                                                                                                       int newResourceTypeId,
                                                                                                       String newResourceName,
                                                                                                       org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                                                       org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                                                       int packageVersionId)

createPackageBackedResourceViaPackageVersion

public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                                                       int parentResourceId,
                                                                                                       int newResourceTypeId,
                                                                                                       String newResourceName,
                                                                                                       org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                                                       org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                                                       int packageVersionId,
                                                                                                       Integer timeout)
Description copied from interface: ResourceFactoryManagerRemote
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a resource type that cannot be created via an package, the plugin container will throw an exception.

Specified by:
createPackageBackedResourceViaPackageVersion in interface ResourceFactoryManagerRemote
Parameters:
subject - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
newResourceTypeId - identifies the type of resource being created
newResourceName - Ignored, pass null. This is determined from the package.
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
deploymentTimeConfiguration - dictates how the package will be deployed
packageVersionId - An existing package version to back this resource
timeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.

deleteResource

public org.rhq.core.domain.resource.DeleteResourceHistory deleteResource(org.rhq.core.domain.auth.Subject subject,
                                                                         int resourceId)
Description copied from interface: ResourceFactoryManagerRemote
Deletes a physical resource from the agent machine. After this call, the resource will no longer be accessible not only to JON, but in general. It is up to the plugin to determine how to complete the delete, but a deleted resource will no longer be returned from resource discoveries.

Specified by:
deleteResource in interface ResourceFactoryManagerRemote
Parameters:
subject - user requesting the deletion. must have resource delete perm on the resource.
resourceId - resource being deleted

deleteResources

public List<org.rhq.core.domain.resource.DeleteResourceHistory> deleteResources(org.rhq.core.domain.auth.Subject subject,
                                                                                int[] resourceIds)
Description copied from interface: ResourceFactoryManagerRemote
Deletes physical resources from the agent machine. After this call, the resource will no longer be accessible not only to JON, but in general. It is up to the plugin to determine how to complete the delete, but a deleted resource will no longer be returned from resource discoveries.

Specified by:
deleteResources in interface ResourceFactoryManagerRemote
Parameters:
subject - user requesting the deletion. must have resource delete perm on the resources.
resourceIds - the resources being deleted

findCreateChildResourceHistory

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.CreateResourceHistory> findCreateChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
                                                                                                                            int parentResourceId,
                                                                                                                            Long beginDate,
                                                                                                                            Long endDate,
                                                                                                                            org.rhq.core.domain.util.PageControl pageControl)
Description copied from interface: ResourceFactoryManagerRemote
Returns a pagination enabled list of requests for the creation of new child resources to the specified parent. These requests may be completed or still in progress; it represents the history of creation attempts for this parent resource.

Specified by:
findCreateChildResourceHistory in interface ResourceFactoryManagerRemote
Parameters:
subject - the user making the request
parentResourceId - resource to check for child resource creations
beginDate - filter used to show only results occurring after this epoch millis parameter, nullable
endDate - filter used to show only results occurring before this epoch millis parameter, nullable
pageControl - control for pagination
Returns:
list of requests

findDeleteChildResourceHistory

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.DeleteResourceHistory> findDeleteChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
                                                                                                                            int parentResourceId,
                                                                                                                            Long beginDate,
                                                                                                                            Long endDate,
                                                                                                                            org.rhq.core.domain.util.PageControl pageControl)
Description copied from interface: ResourceFactoryManagerRemote
Returns a pagination enabled list of requests to delete a child resource on the specified parent. These requests may be complete or still in progress; it represents the history of all delete attempts of child resources to this resource.

Specified by:
findDeleteChildResourceHistory in interface ResourceFactoryManagerRemote
Parameters:
subject - the user making the request
parentResourceId - resource to check for deleted child resources
beginDate - filter used to show only results occurring after this epoch millis parameter, nullable
pageControl - control for pagination
Returns:
list of requests

findResourceLineage

public List<org.rhq.core.domain.resource.Resource> findResourceLineage(org.rhq.core.domain.auth.Subject subject,
                                                                       int resourceId)
Description copied from interface: ResourceManagerRemote
Returns the lineage of the Resource with the specified id. The lineage is represented as a List of Resources, with the first item being the root of the Resource's ancestry (or the Resource itself if it is a root Resource (i.e. a platform)) and the last item being the Resource itself. Since the lineage includes the Resource itself, the returned List will always contain at least one item.

Specified by:
findResourceLineage in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the id of a Resource in inventory
Returns:
the lineage of the Resource with the specified id

findResourcesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findResourcesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                        org.rhq.core.domain.criteria.ResourceCriteria criteria)
Specified by:
findResourcesByCriteria in interface ResourceManagerRemote

findChildResources

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Resource> findChildResources(org.rhq.core.domain.auth.Subject subject,
                                                                                                   int resourceId,
                                                                                                   org.rhq.core.domain.util.PageControl pageControl)
Specified by:
findChildResources in interface ResourceManagerRemote

getParentResource

public org.rhq.core.domain.resource.Resource getParentResource(org.rhq.core.domain.auth.Subject subject,
                                                               int resourceId)
Specified by:
getParentResource in interface ResourceManagerRemote

getLiveResourceAvailability

public org.rhq.core.domain.measurement.ResourceAvailability getLiveResourceAvailability(org.rhq.core.domain.auth.Subject subject,
                                                                                        int resourceId)
Description copied from interface: ResourceManagerRemote
Returns the availability of the resource with the specified id. This performs a live check - a resource will be considered UNKNOWN if the agent cannot be contacted for any reason.

Specified by:
getLiveResourceAvailability in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the id of a Resource in inventory.
Returns:
the resource availability - note that if the encapsulated availability type is null, the resource availability is UNKNOWN.

getResource

public org.rhq.core.domain.resource.Resource getResource(org.rhq.core.domain.auth.Subject subject,
                                                         int resourceId)
Description copied from interface: ResourceManagerRemote
Returns the Resource with the specified id.

Specified by:
getResource in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceId - the id of a Resource in inventory.
Returns:
the resource

getResourcesAncestry

public Map<Integer,String> getResourcesAncestry(org.rhq.core.domain.auth.Subject subject,
                                                Integer[] resourceIds,
                                                org.rhq.core.domain.resource.ResourceAncestryFormat format)
Description copied from interface: ResourceManagerRemote
Resource.ancestry is an encoded value that holds the resource's parental ancestry. It is not suitable for display. This method can be used to get decoded and formatted ancestry values for a set of resources. A typical usage would a criteria resource fetch, and then a subsequent call to this method for ancestry display, potentially for resource disambiguation purposes.

Specified by:
getResourcesAncestry in interface ResourceManagerRemote
Returns:
A Map of ResourceIds to FormattedAncestryStrings, one entry for each unique, valid, resourceId passed in.

uninventoryResources

public List<Integer> uninventoryResources(org.rhq.core.domain.auth.Subject subject,
                                          int[] resourceIds)
Description copied from interface: ResourceManagerRemote
Removes these resources from inventory. The resources may subsequently be rediscovered. Note that for each specified resource all children will also be removed, it it not necessary or recommended to specify more than one resource in the same ancestry line.

Specified by:
uninventoryResources in interface ResourceManagerRemote
Parameters:
subject - The logged in user's subject.
resourceIds - The resources to uninventory.

updateResource

public org.rhq.core.domain.resource.Resource updateResource(org.rhq.core.domain.auth.Subject subject,
                                                            org.rhq.core.domain.resource.Resource resource)
Description copied from interface: ResourceManagerRemote
Update resource's editable properties (name, description, location).

Specified by:
updateResource in interface ResourceManagerRemote
resource - the resource to update
Returns:
the updated resource

addResourcesToGroup

public void addResourcesToGroup(org.rhq.core.domain.auth.Subject subject,
                                int groupId,
                                int[] resourceIds)
Specified by:
addResourcesToGroup in interface ResourceGroupManagerRemote

createResourceGroup

public org.rhq.core.domain.resource.group.ResourceGroup createResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                                                            org.rhq.core.domain.resource.group.ResourceGroup resourceGroup)
Specified by:
createResourceGroup in interface ResourceGroupManagerRemote

deleteResourceGroup

public void deleteResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                int groupId)
                         throws ResourceGroupNotFoundException,
                                ResourceGroupDeleteException
Specified by:
deleteResourceGroup in interface ResourceGroupManagerRemote
Throws:
ResourceGroupNotFoundException
ResourceGroupDeleteException

deleteResourceGroups

public void deleteResourceGroups(org.rhq.core.domain.auth.Subject subject,
                                 int[] groupIds)
                          throws ResourceGroupNotFoundException,
                                 ResourceGroupDeleteException
Specified by:
deleteResourceGroups in interface ResourceGroupManagerRemote
Throws:
ResourceGroupNotFoundException
ResourceGroupDeleteException

findResourceGroupsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.group.ResourceGroup> findResourceGroupsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                        org.rhq.core.domain.criteria.ResourceGroupCriteria criteria)
Specified by:
findResourceGroupsByCriteria in interface ResourceGroupManagerRemote

findResourceGroupsForRole

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.group.ResourceGroup> findResourceGroupsForRole(org.rhq.core.domain.auth.Subject subject,
                                                                                                                     int roleId,
                                                                                                                     org.rhq.core.domain.util.PageControl pc)
Specified by:
findResourceGroupsForRole in interface ResourceGroupManagerRemote

getResourceGroup

public org.rhq.core.domain.resource.group.ResourceGroup getResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                                                         int groupId)
Specified by:
getResourceGroup in interface ResourceGroupManagerRemote

getResourceGroupComposite

public org.rhq.core.domain.resource.group.composite.ResourceGroupComposite getResourceGroupComposite(org.rhq.core.domain.auth.Subject subject,
                                                                                                     int groupId)
Specified by:
getResourceGroupComposite in interface ResourceGroupManagerRemote

removeResourcesFromGroup

public void removeResourcesFromGroup(org.rhq.core.domain.auth.Subject subject,
                                     int groupId,
                                     int[] resourceIds)
Specified by:
removeResourcesFromGroup in interface ResourceGroupManagerRemote

setRecursive

public void setRecursive(org.rhq.core.domain.auth.Subject subject,
                         int groupId,
                         boolean isRecursive)
Specified by:
setRecursive in interface ResourceGroupManagerRemote

updateResourceGroup

public org.rhq.core.domain.resource.group.ResourceGroup updateResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                                                            org.rhq.core.domain.resource.group.ResourceGroup newResourceGroup)
Specified by:
updateResourceGroup in interface ResourceGroupManagerRemote

findResourceTypesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.ResourceType> findResourceTypesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                                org.rhq.core.domain.criteria.ResourceTypeCriteria criteria)
Specified by:
findResourceTypesByCriteria in interface ResourceTypeManagerRemote

getResourceTypeById

public org.rhq.core.domain.resource.ResourceType getResourceTypeById(org.rhq.core.domain.auth.Subject subject,
                                                                     int resourceTypeId)
                                                              throws ResourceTypeNotFoundException
Specified by:
getResourceTypeById in interface ResourceTypeManagerRemote
Throws:
ResourceTypeNotFoundException

getResourceTypeByNameAndPlugin

public org.rhq.core.domain.resource.ResourceType getResourceTypeByNameAndPlugin(org.rhq.core.domain.auth.Subject subject,
                                                                                String name,
                                                                                String plugin)
Specified by:
getResourceTypeByNameAndPlugin in interface ResourceTypeManagerRemote
Returns:
the resource type by name and plugin or null if the type is not found

addResourceGroupsToRole

public void addResourceGroupsToRole(org.rhq.core.domain.auth.Subject subject,
                                    int roleId,
                                    int[] pendingGroupIds)
Description copied from interface: RoleManagerRemote
Adds the given resource groups to the given role.

Specified by:
addResourceGroupsToRole in interface RoleManagerRemote
Parameters:
subject - The logged in user's subject.

addRolesToResourceGroup

public void addRolesToResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                    int groupId,
                                    int[] roleIds)
Specified by:
addRolesToResourceGroup in interface RoleManagerRemote

addRolesToSubject

public void addRolesToSubject(org.rhq.core.domain.auth.Subject subject,
                              int subjectId,
                              int[] roleIds)
Description copied from interface: RoleManagerRemote
Assigns a set of roles to a subject which authorizes the subject to do anything the roles permit.

Specified by:
addRolesToSubject in interface RoleManagerRemote
Parameters:
subject - The logged in user's subject.
subjectId - the subject who is to be authorized with the given roles
roleIds - the roles to assign

addSubjectsToRole

public void addSubjectsToRole(org.rhq.core.domain.auth.Subject subject,
                              int roleId,
                              int[] subjectIds)
Description copied from interface: RoleManagerRemote
Assigns a set of subjects to a role which authorizes the subjects to do anything the role permits.

Specified by:
addSubjectsToRole in interface RoleManagerRemote
Parameters:
subject - the user attempting to assign the roles to the subject
roleId - the role who will authorized with the given subjects
subjectIds - the subjects to assign the role

setAssignedSubjectRoles

public void setAssignedSubjectRoles(org.rhq.core.domain.auth.Subject subject,
                                    int subjectId,
                                    int[] roleIds)
Description copied from interface: RoleManagerRemote
Sets the set of roles assigned to a subject. Requires SECURITY_ADMIN

Specified by:
setAssignedSubjectRoles in interface RoleManagerRemote

findRolesByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.authz.Role> findRolesByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                             org.rhq.core.domain.criteria.RoleCriteria criteria)
Specified by:
findRolesByCriteria in interface RoleManagerRemote

findSubjectAssignedRoles

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.authz.Role> findSubjectAssignedRoles(org.rhq.core.domain.auth.Subject subject,
                                                                                                  int subjectId,
                                                                                                  org.rhq.core.domain.util.PageControl pc)
Description copied from interface: RoleManagerRemote
Get all roles assigned for a certain subject

Specified by:
findSubjectAssignedRoles in interface RoleManagerRemote
Parameters:
subject - The logged in user's subject
subjectId - The subject ID to find the associated roles for
pc - PageControl
Returns:
A page list of assigned

findSubjectUnassignedRoles

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.authz.Role> findSubjectUnassignedRoles(org.rhq.core.domain.auth.Subject subject,
                                                                                                    int subjectId,
                                                                                                    org.rhq.core.domain.util.PageControl pc)
Specified by:
findSubjectUnassignedRoles in interface RoleManagerRemote

getRole

public org.rhq.core.domain.authz.Role getRole(org.rhq.core.domain.auth.Subject subject,
                                              int roleId)
Description copied from interface: RoleManagerRemote
Returns the role with the given ID

Specified by:
getRole in interface RoleManagerRemote
Returns:
the role or null if it wasn't found

createRole

public org.rhq.core.domain.authz.Role createRole(org.rhq.core.domain.auth.Subject subject,
                                                 org.rhq.core.domain.authz.Role newRole)
Description copied from interface: RoleManagerRemote
Persists the new role to the database. The subjects assigned to the role are ignored - this only creates the role entity with 0 subjects initially assigned to it.

Specified by:
createRole in interface RoleManagerRemote
Parameters:
subject - The user attempting to create the role
newRole - The new role being created
Returns:
The persisted role with the primary key populated

deleteRoles

public void deleteRoles(org.rhq.core.domain.auth.Subject subject,
                        int[] roleIds)
Description copied from interface: RoleManagerRemote
Removes a set of roles from the database. The subjects assigned to the roles are no longer authorized with the deleted roles. Groups attached to the deleted roles are left alone.

Specified by:
deleteRoles in interface RoleManagerRemote
Parameters:
subject - The user attempting to delete the role
roleIds - The IDs of the roles to delete

updateRole

public org.rhq.core.domain.authz.Role updateRole(org.rhq.core.domain.auth.Subject subject,
                                                 org.rhq.core.domain.authz.Role role)
Description copied from interface: RoleManagerRemote
Updates the given role, excluding the subjects and groups. This updates permissions, name, description, etc.

Specified by:
updateRole in interface RoleManagerRemote
Parameters:
subject - The user updating the role
role - The role being updated
Returns:
The updated role

removeResourceGroupsFromRole

public void removeResourceGroupsFromRole(org.rhq.core.domain.auth.Subject subject,
                                         int roleId,
                                         int[] groupIds)
Description copied from interface: RoleManagerRemote
Removes the given resource groups from the given role.

Specified by:
removeResourceGroupsFromRole in interface RoleManagerRemote
Parameters:
subject - user attempting to remove the groups from the role

removeRolesFromResourceGroup

public void removeRolesFromResourceGroup(org.rhq.core.domain.auth.Subject subject,
                                         int groupId,
                                         int[] roleIds)
Specified by:
removeRolesFromResourceGroup in interface RoleManagerRemote

removeRolesFromSubject

public void removeRolesFromSubject(org.rhq.core.domain.auth.Subject subject,
                                   int subjectId,
                                   int[] roleIds)
Description copied from interface: RoleManagerRemote
Disassociates particular roles from a subject. Once complete, the subject will no longer be authorized with the given roles.

Specified by:
removeRolesFromSubject in interface RoleManagerRemote
Parameters:
subject - The logged in user's subject.
subjectId - the user that is to have the roles unassigned from it
roleIds - list of role IDs that are to be removed from user

removeSubjectsFromRole

public void removeSubjectsFromRole(org.rhq.core.domain.auth.Subject subject,
                                   int roleId,
                                   int[] subjectIds)
Description copied from interface: RoleManagerRemote
Dissociate particular subjects from a role.

Specified by:
removeSubjectsFromRole in interface RoleManagerRemote
Parameters:
subject - The logged in user's subject.
roleId - The role ID to dissociate the roles from
subjectIds - The IDs of the subjects to remove from the specified Role

setAssignedResourceGroups

public void setAssignedResourceGroups(org.rhq.core.domain.auth.Subject subject,
                                      int roleId,
                                      int[] groupIds)
Specified by:
setAssignedResourceGroups in interface RoleManagerRemote

changePassword

public void changePassword(org.rhq.core.domain.auth.Subject subject,
                           String username,
                           String password)
Description copied from interface: SubjectManagerRemote
Change the password for a user.

Specified by:
changePassword in interface SubjectManagerRemote
Parameters:
subject - The logged in user's subject.
username - The user whose password will be changed
password - The new password for the user

createPrincipal

public void createPrincipal(org.rhq.core.domain.auth.Subject subject,
                            String username,
                            String password)
                     throws SubjectException
Description copied from interface: SubjectManagerRemote
Creates a new principal (username and password) in the internal database. The password will be encoded before being stored.

Specified by:
createPrincipal in interface SubjectManagerRemote
Parameters:
subject - The logged in user's subject.
username - The username part of the principal
password - The password part ofthe principal
Throws:
SubjectException

createSubject

public org.rhq.core.domain.auth.Subject createSubject(org.rhq.core.domain.auth.Subject subject,
                                                      org.rhq.core.domain.auth.Subject subjectToCreate)
                                               throws SubjectException
Description copied from interface: SubjectManagerRemote
Create a a new subject. This ignores the roles in subject. The created subject will not be assigned to any roles; use the role manager to assign roles to a subject.

Specified by:
createSubject in interface SubjectManagerRemote
Parameters:
subject - The logged in user's subject.
subjectToCreate - The subject to be created.
Returns:
the newly persisted Subject
Throws:
SubjectException

deleteSubjects

public void deleteSubjects(org.rhq.core.domain.auth.Subject subject,
                           int[] subjectIds)
Description copied from interface: SubjectManagerRemote
Deletes the given set of users, including both the Subject and Principal objects associated with those users.

Specified by:
deleteSubjects in interface SubjectManagerRemote
Parameters:
subject - The logged in user's subject.
subjectIds - identifies the subject IDs for all the users that are to be deleted

findSubjectsByCriteria

public org.rhq.core.domain.util.PageList<org.rhq.core.domain.auth.Subject> findSubjectsByCriteria(org.rhq.core.domain.auth.Subject subject,
                                                                                                  org.rhq.core.domain.criteria.SubjectCriteria criteria)
Specified by:
findSubjectsByCriteria in interface SubjectManagerRemote

getSubjectByName

public org.rhq.core.domain.auth.Subject getSubjectByName(String username)
Description copied from interface: SubjectManagerRemote
Looks up the existing subject using the given username.

Specified by:
getSubjectByName in interface SubjectManagerRemote
Parameters:
username - the name of the subject to look for
Returns:
the subject that was found or null if not found

getSubjectByNameAndSessionId

public org.rhq.core.domain.auth.Subject getSubjectByNameAndSessionId(String username,
                                                                     int sessionId)
                                                              throws Exception
Description copied from interface: SubjectManagerRemote
Looks up the Subject for a current RHQ session by username and sessionId.

Specified by:
getSubjectByNameAndSessionId in interface SubjectManagerRemote
Parameters:
username - The name of the user.
sessionId - The sessionId of the desired Subject.
Returns:
The Subject that was found
Throws:
Exception - if the sessionId is not valid

login

public org.rhq.core.domain.auth.Subject login(String username,
                                              String password)
                                       throws LoginException
Description copied from interface: SubjectManagerRemote
Logs a user into the system. This will authenticate the given user with the given password. If the user was already logged in, the current session will be used but the password will still need to be authenticated.

Specified by:
login in interface SubjectManagerRemote
Parameters:
username - The name of the user.
password - The password.
Returns:
The subject of the authenticated user.
Throws:
LoginException - if the login failed for some reason

logout

public void logout(org.rhq.core.domain.auth.Subject subject)
Description copied from interface: SubjectManagerRemote
Logs out a user.

Specified by:
logout in interface SubjectManagerRemote
Parameters:
subject - The Subject to log out. The sessionId must be valid.

updateSubject

public org.rhq.core.domain.auth.Subject updateSubject(org.rhq.core.domain.auth.Subject subject,
                                                      org.rhq.core.domain.auth.Subject subjectToModify)
Description copied from interface: SubjectManagerRemote
Updates an existing subject with new data. This does not cascade any changes to the roles but it will save the subject's configuration.

Specified by:
updateSubject in interface SubjectManagerRemote
Parameters:
subject - The logged in user's subject.
subjectToModify - the subject whose data is to be updated (which may or may not be the same as user)
Returns:
the merged subject, which may or may not be the same instance of subjectToModify

getSnapshotReport

public URL getSnapshotReport(org.rhq.core.domain.auth.Subject subject,
                             int resourceId,
                             String name,
                             String description)
                      throws Exception
Description copied from interface: SupportManagerRemote
Asks that a snapshot report be taken of the given resource. Snapshot reports consist of things like log files, data files and configuration files. What is included in snapshot reports is controlled by the resource's plugin configuration. A snapshot report is compressed as a zip file.

Specified by:
getSnapshotReport in interface SupportManagerRemote
Parameters:
subject - the user requesting the snapshot
resourceId - the resource whose snapshot report is to be taken
name - the name of the snapshot report
description - a description for the caller to use to describe the purpose for taking the snapshot report
Returns:
a URL that the caller can use to obtain the snapshot report
Throws:
Exception

getProductInfo

public org.rhq.core.domain.common.ProductInfo getProductInfo(org.rhq.core.domain.auth.Subject subject)
Description copied from interface: SystemManagerRemote
Provides product information suitable for "About" details.

Specified by:
getProductInfo in interface SystemManagerRemote
Parameters:
subject - user making the request
Returns:
the product info

getServerDetails

public org.rhq.core.domain.common.ServerDetails getServerDetails(org.rhq.core.domain.auth.Subject subject)
Description copied from interface: SystemManagerRemote
Provides details (such as product version) of the server processing the request. Requires MANAGE_SETTINGS.

Specified by:
getServerDetails in interface SystemManagerRemote
Parameters:
subject - user making the request
Returns:
server details

getSystemConfiguration

public Properties getSystemConfiguration(org.rhq.core.domain.auth.Subject subject)
Specified by:
getSystemConfiguration in interface SystemManagerRemote

setSystemConfiguration

public void setSystemConfiguration(org.rhq.core.domain.auth.Subject subject,
                                   Properties properties,
                                   boolean skipValidation)
                            throws Exception
Specified by:
setSystemConfiguration in interface SystemManagerRemote
Throws:
Exception

getSystemSettings

public org.rhq.core.domain.common.composite.SystemSettings getSystemSettings(org.rhq.core.domain.auth.Subject subject)
Description copied from interface: SystemManagerRemote
Get the server cloud configuration. These are the server configurations that will be the same for all servers in the HA server cloud.

Specified by:
getSystemSettings in interface SystemManagerRemote
Parameters:
subject - user making the request
Returns:
the settings

setSystemSettings

public void setSystemSettings(org.rhq.core.domain.auth.Subject subject,
                              org.rhq.core.domain.common.composite.SystemSettings settings)
                       throws Exception
Description copied from interface: SystemManagerRemote
Set the server cloud configuration. The given properties will be the new settings for all servers in the HA server cloud.

Specified by:
setSystemSettings in interface SystemManagerRemote
Parameters:
subject - the user who wants to change the settings
settings - the new system configuration settings
Throws:
Exception

exportAllSubsystems

public org.rhq.core.domain.sync.ExportReport exportAllSubsystems(org.rhq.core.domain.auth.Subject subject)
Description copied from interface: SynchronizationManagerRemote
This exports the configuration data of all supported subsystems in RHQ.

The returned report contains the data bytes themselves as well as a map of messages and notes produced by the different subsystem exporters so that the caller of this method is able to determine possible problems of the export file without needing to deserialize and read it (the same messages are also included in the export data).

The export data is a zipped XML.

The export requires the user to have Permission.MANAGE_INVENTORY permission.

Specified by:
exportAllSubsystems in interface SynchronizationManagerRemote
Parameters:
subject - the logged in user
Returns:
the export report

validate

public void validate(org.rhq.core.domain.auth.Subject subject,
                     byte[] exportFile)
              throws ValidationException
Specified by:
validate in interface SynchronizationManagerRemote
Throws:
ValidationException

getImportConfigurationDefinitionOfAllSynchronizers

public List<org.rhq.core.domain.sync.ImportConfigurationDefinition> getImportConfigurationDefinitionOfAllSynchronizers()
Description copied from interface: SynchronizationManagerRemote
Returns the configuration definitions of all known importers.

Specified by:
getImportConfigurationDefinitionOfAllSynchronizers in interface SynchronizationManagerRemote
Returns:

getImportConfigurationDefinition

public org.rhq.core.domain.sync.ImportConfigurationDefinition getImportConfigurationDefinition(String importerClass)
Description copied from interface: SynchronizationManagerRemote
Returns the configuration definition of the import for synchronizer of given type.

Specified by:
getImportConfigurationDefinition in interface SynchronizationManagerRemote
Returns:

importAllSubsystems

public org.rhq.core.domain.sync.ImportReport importAllSubsystems(org.rhq.core.domain.auth.Subject subject,
                                                                 byte[] exportFile,
                                                                 List<org.rhq.core.domain.sync.ImportConfiguration> importerConfigurations)
                                                          throws ValidationException,
                                                                 ImportException
Description copied from interface: SynchronizationManagerRemote
Imports everything from the export file.

Specified by:
importAllSubsystems in interface SynchronizationManagerRemote
Parameters:
subject - the authenticated user
exportFile - the contents of the export file
importerConfigurations - the configurations of individual importers to be used when importing or null if the default configurations should be used for all the importers.
Returns:
the report describing the result of the import
Throws:
ValidationException
ImportException


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