JBoss Community Archive (Read Only)

RHQ 4.9

Design-Web Services

Below the line is design work from the previous, and very relevant, effort into a WS interface. It will be used as the starting point and revised incrementally, moving more and more above the line as the design is finalized.

A significant difference in approach was the initial approach to expose the Local interfaces nearly completely. In this second go there is a goal to provide a smaller set of Remote interfaces that remain robust yet are easier to use for the vast majority of integration use cases. It will de-emphasize administration and focus on operational aspects of integration. Supporting the CLI on this interface is a target if not a full goal. (Note that the CLI itself is more limited in scope than the V1.4 CLI since the GUI is more powerful, obviating the need for certain scripting.) It is not the goal to be able to implement the full JON GUI on this set of services.

Implementation will be JAX-WS based.

Proposed Remote Interface:
Selection Criteria - first cut

Review value = Y(in)/#(in, use case number)/N(out)/M(maybe, proposed but no current use case)/
Test Status value = P(pass)/F(fail) blank indicates untested

Remote Interface

Review

Test Status

Service

AlertDefinitionManagerRemote

 

 

 

 

 

 

AlertDefinition getAlertDefinitionById(Subject user, int alertDefinitionId)

  • perhaps only return name/description

AlertManagerRemote

Y

 

 

 

2

 

PageList<Alert> findAlerts(Subject subject, Integer[] resourceIds, AlertPriority priority, long timeRange, PageControl pageControl)

AvailabilityManagerRemote

 

 

 

 

 

 

List<AvailabilityPoint> getAvailabilitiesForResource(Subject whoami, int resourceId, long begin, long end, int points)

 

 

 

AvailabilityType getCurrentAvailabilityTypeForResource(Subject whoami, int resourceId)

CallTimeDataManagerRemote

 

 

 

 

 

 

PageList<CallTimeDataComposite> getCallTimeDataForResource(Subject subject, int scheduleId, long begin, long end, PageControl pageControl)

 

 

 

PageList<CallTimeDataComposite> getCallTimeDataForCompatibleGroup(Subject subject, int groupId, int measurementDefinitionId, long begin, long end, PageControl pageControl)

 

 

 

 

PageList<CallTimeDataComposite> getCallTimeDataForAutoGroup(Subject subject, int parentId, int childResourceTypeId, int measurementDefinitionId, long begin, long end, PageControl pageControl)

ChannelManagerRemote

Y

 

 

 

 

8

 

void addPackageVersionsToChannel(Subject subject, int channelId, int[] packageVersionIds) throws Exception

 

8

 

Channel createChannel(Subject subject, Channel channel) throws ChannelException

 

8

 

void deleteChannel(Subject subject, int channelId)

 

8

 

PageList<Channel> getAllChannels(Subject subject, PageControl pc)

 

8

 

PageList<Resource> getSubscribedResources(Subject subject, int channelId, PageControl pc)

 

8

 

PageList<PackageVersion> getPackageVersionsInChannel(Subject subject, int channelId, String filter, PageControl pc)

 

8

 

void subscribeResourceToChannels(Subject subject, int resourceId, int[] channelIds)

 

8

 

void unsubscribeResourceFromChannels(Subject subject, int resourceId, int[] channelIds)

 

8

 

Channel updateChannel(Subject subject, Channel channel) throws ChannelException

ClusterManagerRemote

 

 

 

 

 

 

??? Any need to remotely change server operation mode?

ConfigurationManagerRemote

Y

 

 

 

M

 

Configuration getConfigurationById(Subject whoami, int id)

  • added Subject param

 

3

 

Configuration getCurrentPluginConfiguration(Subject user, int resourceId)

 

3

 

Configuration getCurrentResourceConfiguration(Subject user, int resourceId)

 

M

 

Configuration getLiveResourceConfiguration(Subject user, int resourceId)

 

M

 

ConfigurationDefinition getPluginConfigurationDefinitionForResourceType(Subject whoami, int resourceTypeId)

 

M

 

ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(Subject whoami, int resourceTypeId)

 

3

 

boolean isResourceConfigurationUpdateInProgress(Subject user, int resourceId)

 

3

 

PluginConfigurationUpdate updatePluginConfiguration(Subject whoami, int resourceId, Configuration newConfiguration);

 

3

 

ResourceConfigurationUpdate updateResourceConfiguration(Subject whoami, int resourceId, Configuration newConfiguration)

ContentManagerRemote

Y

 

 

 

8

 

PackageVersion createPackageVersion(String packageName, int packageTypeId, String version, int architectureId,InputStream packageBitStream)

 

8

 

void deletePackages(Subject user, int resourceId, Set<Integer> installedPackageIds, String requestNotes)

 

8

 

void deployPackages(Subject user, Set<Integer> resourceIds, Set<Integer> packageVersionIds)

DiscoveryBossRemote

N

 

 

 

N

 

??? Do we need to allow resource add?

EventManagerRemote

Y

 

 

 

5

 

PageList<EventComposite> getEventsForResource(Subject subject, int resourceId, long begin, long end, EventSeverity severity, String source, String detail, PageControl pc)

 

 

 

PageList<EventComposite> getEventsForAutoGroup(Subject subject, int groupId, long begin, long end, EventSeverity severity, int parentId, String source, String detail, PageControl

 

 

 

PageList<EventComposite> getEventsForCompGroup(Subject subject, int groupId, long begin, long end, EventSeverity severity, int eventId, String source, String detail, PageControl pc)
pc)

 

 

 

EventSeverity[] getSeverityBuckets(Subject subject, int resourceId, long begin, long end, int numBuckets)

 

 

 

EventSeverity[] getSeverityBucketsForAutoGroup(Subject subject, int parentId, long begin, long end, int numBuckets)

 

 

 

EventSeverity[] getSeverityBucketsForCompGroup(Subject subject, int groupId, long begin, long end, int numBuckets)

MeasurementBaselineManagerRemote

 

 

 

 

 

 

MeasurementBaseline findBaselineForResourceAndMeasurementDefinition(Subject subject, Integer resource, Integer measurementDefinitionId)

 

 

 

List<MeasurementBaseline> findBaselinesForResource(Subject subject, Resource resource)

  • added Subject param

 

 

 

PageList<MeasurementBaselineComposite> getAllDynamicMeasurementBaselines(Subject subject, int agentId, Subject subject, PageControl pc)

  • added Subject param

MeasurementDataManagerRemote

Y

 

 

 

 

 

MeasurementAggregate getAggregate(Subject subject, MeasurementSchedule sched, long start, long end) throws MeasurementException

  • added Subject param

 

4

 

List<MeasurementDataTrait> getAllTraitDataForResourceAndDefinition(Subject subject, int resourceId, int definitionId)

  • added Subject param

 

4

 

Set<MeasurementData> getLiveData(Subject subject, int resourceId, Set<Integer> definitionIds)

  • added Subject param

 

 

 

List<List<MeasurementDataNumericHighLowComposite>> getMeasurementDataForAutoGroup(Subject subject, int autoGroupParentResourceId, int autoGroupChildResourceTypeId, int measurementDefinitionId, long beginTime, long endTime, int numberOfDataPoints, boolean aggregateOverAutoGroup)

 

 

 

List<List<MeasurementDataNumericHighLowComposite>> getMeasurementDataForCompatibleGroup(Subject subject, int compatibleGroupId, int measurementDefinitionId, long beginTime, long endTime, int numberOfDataPoints, boolean aggregateOverGroup)

 

4

 

List<List<MeasurementDataNumericHighLowComposite>> getMeasurementDataForResource(Subject subject, int resourceId, int[] measurementDefinitionIds, long beginTime, long endTime, int dataPoints)

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForAutoGroup(Subject subject, int autoGroupParentResourceId, int autoGroupChildResourceTypeId, int[] measurementDefinitionIds, long begin, long end, boolean enabledOnly)

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForCompatibleGroup(Subject subject, int groupId, Int[] measurementDefinitionIds, long begin, long end, boolean enabledOnly) throws MeasurementException

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForMetrics(Subject subject, int resourceId, DataType dataType,
long begin, long end, boolean narrowed, boolean enabledOnly) throws MeasurementException

 

 

 

List<MetricDisplaySummary> getMetricDisplaySummariesForResource(Subject subject, int resourceId, int[] measurementDefinitionIds, long begin, long end) throws MeasurementException

MeasurementDefinitionManagerRemote

 

 

 

 

 

 

List<MeasurementDefinition> getMeasurementDefinitionsByIds(Subject subject, Integer[] measurementDefinitionIds)

 

 

 

List<MeasurementDefinition> getMeasurementDefinitionsByResourceType(Subject user, int resourceTypeId, DataType dataType, DisplayType displayType)

MeasurementProblemManagerRemote

 

 

 

 

M

 

PageList<ProblemResourceComposite> findProblemResources(Subject subject, long oldestDate, int maxResources)

 

 

 

PageList<MeasurementOutOfBounds> findResourceMeasurementOutOfBounds(Subject subject, long oldestDate, int resourceId, PageControl pc)

 

 

 

PageList<MeasurementOutOfBounds> findScheduleMeasurementOutOfBounds(Subject subject, long oldestDate,int scheduleId, PageControl pc)

 

 

 

public Map<Integer, Integer> getMeasurementSchedulesOOBCount(Subject subject, long begin, long end, List<Integer> scheduleIds)

  • added Subject param

MeasurementScheduleManagerRemote

 

 

 

 

 

 

PageList<MeasurementScheduleComposite> getDefaultMeasurementSchedulesForResourceType(Subject subject, int resourceTypeId, PageControl pageControl)

 

 

 

List<MeasurementSchedule> getMeasurementSchedulesByDefinitionIdAndResources(Subject subject, int definitionId, List<Resource> resources)

 

 

 

PageList<MeasurementScheduleComposite> getMeasurementSchedulesForAutoGroup(Subject subject, int parentId, int childType, PageControl pageControl)

 

 

 

public PageList<MeasurementScheduleComposite> getMeasurementSchedulesForCompatGroup(Subject subject, int groupId, PageControl pageControl)

 

 

 

PageList<MeasurementScheduleComposite> getMeasurementSchedulesForResource(Subject subject, int resourceId, DataType dataType, PageControl pageControl)

 

 

 

List<MeasurementSchedule> getSchedulesByIds(Subject subject, Collection<Integer> ids)

  • added Subject param

OperationManagerRemote

Y

 

 

 

1

 

void cancelOperationHistory(Subject user, int historyId, boolean ignoreAgentErrors)

 

1

 

void deleteOperationHistory(Subject user, int historyId, boolean purgeInProgress)

 

1

 

PageList<ResourceOperationHistory> getCompletedResourceOperationHistories(Subject user, int resourceId, PageControl pc)

 

1

 

PageList<ResourceOperationHistory> getPendingResourceOperationHistories(Subject user, int resourceId, PageControl pc)

 

M

 

PageList<ResourceOperationHistory> getResourceOperationHistories(Subject whoami, int resourceId, PageControl pc) ??? add status param?

 

M

 

OperationHistory(Subject whoami, int historyId) getOperationHistoryByHistoryId(Subject whoami, int historyId)

 

M

 

OperationHistory getOperationHistoryByJobId(Subject whoami, String historyJobId)

 

 

 

List<GroupOperationSchedule> getScheduledGroupOperations(Subject whoami, int groupId) throws SchedulerException

 

1

 

List<ResourceOperationSchedule> getScheduledResourceOperations(Subject user, int resourceId) throws SchedulerException

 

M

 

OperationDefinition getSupportedResourceOperations(Subject user, int resourceId, String operationName)

 

M

 

List<OperationDefinition> getSupportedResourceOperations(Subject whoami, int resourceId)

 

M

 

List<OperationDefinition> getSupportedResourceTypeOperations(Subject whoami, int resourceTypeId)

 

 

 

GroupOperationSchedule scheduleGroupOperation(Subject whoami, int groupId, int[] executionOrderResourceIds,boolean haltOnFailure, String operationName, Configuration parameters, Trigger trigger, String description) throws SchedulerException

 

1

 

ResourceOperationSchedule scheduleResourceOperation(Subject user, int resourceId, String operationName,Configuration parameters, Trigger trigger, String description) throws SchedulerException

  • Simplified parameters

 

 

 

void unscheduleGroupOperation(Subject whoami, String jobId, int resourceGroupId) throws SchedulerException

 

1

 

void unscheduleResourceOperation(Subject user, String jobId, int resourceId) throws SchedulerException

ResourceGroupManagerRemote

 

 

 

 

 

 

PageList<ResourceGroupComposite> getAllResourceGroups(Subject subject, GroupCategory groupCategory, ResourceCategory resourceCategory, ResourceType resourceType, String nameFilter, PageControl pageControl)

 

 

 

PageList<ResourceGroupComposite> getResourceGroupsForResource(Subject subject, int resourceId, PageControl pageControl)

ResourceManagerRemote

Y

 

 

 

1

 

PageList<ResourceComposite> findResourceComposites(Subject user, ResourceCategory category, String typeName, int parentResourceId, String searchString, PageControl pageControl)

 

 

 

PageList<Resource> getChildResourcesByCategoryAndInventoryStatus(Subject user, Resource parent, ResourceCategory category, InventoryStatus status, PageControl pageControl)

 

 

 

PageList<Resource> getExplicitResourcesByResourceGroup(Subject subject, ResourceGroup group, PageControl pageControl)

 

 

 

PageList<ResourceWithAvailability> getImplicitResourceWithAvailabilityByResourceGroup(Subject subject,ResourceGroup group, PageControl pageControl)

 

 

 

Resource getResourceById(Subject user, int resourceId)

 

3

 

PageList<Resource> getResourceByIds(Subject subject, Integer[] resourceIds, boolean attachParentResource,PageControl pageControl)

ResourceTypeManagerRemote

 

 

 

 

 

 

List<ResourceType> getAllResourceTypesByCategory(Subject subject, ResourceCategory category)

 

 

 

List<ResourceType> getChildResourceTypesByCategory(Subject subject, Resource parentResource,ResourceCategory resourceCategory)

 

 

 

ResourceFacets getResourceFacets(Subject subject, int resourceTypeId) throws ResourceTypeNotFoundException

 

 

 

List<ResourceType> getResourceTypesByPlugin(Subject subject, String pluginName)

  • added Subject param

 

 

 

List<ResourceType> getUtilizedChildResourceTypesByCategory(Subject subject, Resource parentResource,ResourceCategory resourceCategory)

RoleManagerRemote

7

 

 

 

7

 

void assignRolesToSubject(Subject subject, Integer subjectId, Integer[] roleIds)

 

7

 

PageList<Role> getAllRoles(Subject subject, PageControl pc)

 

7

 

PageList<Role> getAvailableRolesForSubject(Subject subject, Integer subjectId, Integer[] pendingRoleIds, PageControl pc

 

7

 

PageList<Role> getRoles(Subject subject, Subject rolesSubject, PageControl pc)

 

7

 

PageList<Subject> getRoleSubjects(Subject subject, Integer roleId, PageControl pc)

 

7

 

void removeRolesFromSubject(Subject subject, Integer subjectId, Integer[] roleIds)

SubjectManagerRemote

Y

 

 

 

7

 

void changePassword(Subject subject, String username, String password) throws Exception

 

7

 

void createPrincipal(Subject subject, String username, String password) throws Exception

 

7

 

Subject createSubject(Subject whoami, Subject subject) throws CreateException

 

7

 

void deleteUsers(Subject subject, Integer[] subjectIds) throws Exception

 

7

 

Subject findSubjectByName(Subject subject, String username);

  • Added Subject param

 

Y

 

boolean isLoggedIn(String username)

 

Y

 

Subject login(String username, String password) throws LoginException

 

Y

 

void logout(int sessionId)

 

7

 

Subject updateSubject(Subject subject, Subject subjectToModify)

Locals without planned remotes at this time:

Remote Interface

Notes

AffinityGroupManagerLocal

Not necessary, administration via GUI

AgentManagerLocal

Not necessary, administration via GUI

AgentStatusManagerLocal

Server impl, no exposure necessary

AlertConditionCacheManagerLocal

Server impl, no exposure necessary

AlertConditionLogManagerLocal

Server impl, no exposure necessary

AlertConditionManagerLocal

Not necessary to see alert conditions, just alert firings/history

AlertDampeningManagerLocal

Server impl, no exposure necessary

AlertNotificationManagerLocal

Not necessary to manipulate notifications

AlertTemplateManagerLocal

Not necessary to manipulate alert templates

AuthorizationManagerRemote

Logged in user will be denied services if they don't have the permissions necessary. Inspection of authorization information may not be needed.

CachedConditionManagerLocal

Server impl, no exposure necessary

CachedConditionProducerLocal

Server impl, no exposure necessary

CacheConsistencyManagerLocal

Server impl, no exposure necessary

ConfigurationMetadataManagerLocal

Do we need to be able to update config, leaning against...

ContentSourceManagerLocal

Not necessary, administration via GUI

ContentUIManagerLocal

Not necessary, administration via GUI

EmailManagerLocal

Server impl, no exposure necessary

EntityManagerFacadeLocal

Server impl, no exposure necessary

FailoverListManagerLocal

Not necessary, administration via GUI

GroupDefinitionExpressionBuilderManagerLocal

Not necessary, GUI support

GroupDefinitionManagerLocal

Not necessary, administration via GUI

MeasurementCompressionManagerLocal

Server impl, no exposure necessary

PartitionEventManagerLocal

Not necessary, administration via GUI

PerspectiveManagerLocal

Server impl, no exposure necessary

ProductVersionManagerLocal

Not necessary, administration via GUI

ResourceBossLocal

??? maybe need the ability to get an Inventory summary for the user ?

ResourceMetadataManagerLocal

Server impl, no exposure necessary

ResourceFactoryManagerLocal

Not necessary, administration via GUI

SchedulerLocal

Server impl, no exposure necessary

ServerManagerLocal

Not necessary, administration via GUI

SystemManagerLocal

Server impl, no exposure necessary ??? getVersion?

 

 

Co-Development Impact:

The new Subsystem View Search queries may need to be exposed via Remote. My initial thought is that it will not be necessary to remote the building of those queries, that can be done via the GUI, but rather the execution of those saved subsystem searches.

What Is This Page

images/author/images/icons/emoticons/help_16.gif indicates the *Local interface needs to be analyzed to see if it needs a remote interface or not
images/author/images/icons/emoticons/forbidden0.gif indicates the *Local interface needs to have an associated *Remote interface created for it but it isn't done yet
images/author/images/icons/emoticons/add.gif indicates either that *Local interface should not have a *Remote counterpart, or it has a *Remote interface and it has been completed
images/author/images/icons/emoticons/check.gif indicates that the *Remote interface needed to be added or updated and that work has been completed. Further, it indicates that the web gui has been updated to use the remote interface.

If you see a Local class in bold, it means all methods can be made remotely accessible.
If you see a Local class striked, it means all methods must not be remotely accessible.

If you see individual methods listed underneath a Local class, it means that method should not be exposed to remote clients and therefore should not be included in the *Remote interface counterpart.

Work Items:

  • Create Remote Interface

    • Copy local interface xxLocal to remote interface xxRemote.

    • Replace javadocs in local interface with @see references to remote counterpart.

    • Replace @Local annotation to @Remote and add @WebService in remote interface.

    • Add @WebParam annotations to all method parameters in remote interface.

  • Update LookupUtil methods

    • Rename getXX() method to getXXLocal() in LookupUtil. Done for remaining lookups as of r308

    • Update all references to LookupUtil.getXX() to LookupUtil.getXXLocal()

  • Update portal project

    • Update references to LookupUtil.getXXLocal() in portal project from xxLocal LookupUtil.getXXLocal() to: xxRemtoe LookupUitl.getXX()

  • Update domain/composite objects

    • Add protected default constructor on domain objects (and composites) where needed.

    • Add @XmlElement tags on domain objects (and composites) without public getters and setters.

SVN

Branch for this work: http://svn.rhq-project.org/repos/rhq/branches/API-REFACTORING

* rhq/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/jms

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 08:04:04 UTC, last content change 2013-09-18 19:41:20 UTC.