From: <jma...@rh...> - 2009-07-15 07:22:40
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [4409] fix OperationManagerBean methods which return a list to begin with "find"</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>4409</dd> <dt>Author</dt> <dd>jmarques</dd> <dt>Date</dt> <dd>2009-07-15 02:22:32 -0500 (Wed, 15 Jul 2009)</dd> </dl> <h3>Log Message</h3> <pre>fix OperationManagerBean methods which return a list to begin with "find"</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsAlertDefUtiljava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/AlertDefUtil.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsconfigDefinitionFormPrepareActionjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionFormPrepareAction.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguinavigationgroupResourceGroupTreeContextMenuUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/group/ResourceGroupTreeContextMenuUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguinavigationresourceResourceTreeContextMenuUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeContextMenuUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationdefinitiongroupResourceGroupOperationDefinitionUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/group/ResourceGroupOperationDefinitionUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationdefinitionresourceResourceOperationDefinitionUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/resource/ResourceOperationDefinitionUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationschedulegroupResourceGroupOperationScheduleUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/group/ResourceGroupOperationScheduleUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationscheduleresourceResourceOperationScheduleUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/resource/ResourceOperationScheduleUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveroperationOperationManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveroperationOperationManagerLocaljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerLocal.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveroperationOperationManagerRemotejava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerRemote.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourcegroupResourceGroupManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrctestjavaorgrhqenterpriseserveroperationOperationManagerBeanTestjava">rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/operation/OperationManagerBeanTest.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrctestjavaorgrhqenterpriseservertestTestRemoteInterfacejava">rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestRemoteInterface.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsAlertDefUtiljava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/AlertDefUtil.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/AlertDefUtil.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/AlertDefUtil.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -251,9 +251,9 @@ </span><span class="cx"> // need to eager load the definitions so the check against getParametersConfigurationDefinition succeeds below if (isAlertTemplate) { </span><span class="rem">- operationDefinitions = operationManager.getSupportedResourceTypeOperations(subject, id, true); </span><span class="add">+ operationDefinitions = operationManager.findSupportedResourceTypeOperations(subject, id, true); </span><span class="cx"> } else { </span><span class="rem">- operationDefinitions = operationManager.getSupportedResourceOperations(subject, id, true); </span><span class="add">+ operationDefinitions = operationManager.findSupportedResourceOperations(subject, id, true); </span><span class="cx"> } for (OperationDefinition definition : operationDefinitions) { </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsconfigDefinitionFormPrepareActionjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionFormPrepareAction.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionFormPrepareAction.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionFormPrepareAction.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -180,7 +180,7 @@ </span><span class="cx"> List<OptionItem> controlActions = new ArrayList<OptionItem>(); OperationManagerLocal operationManager = LookupUtil.getOperationManager(); // do not need to eagerly load the definitions because only name and displayName are needed </span><span class="rem">- for (OperationDefinition action : operationManager.getSupportedResourceTypeOperations(subject, type.getId(), </span><span class="add">+ for (OperationDefinition action : operationManager.findSupportedResourceTypeOperations(subject, type.getId(), </span><span class="cx"> false)) { OptionItem actionItem = new OptionItem(action.getDisplayName(), action.getName()); controlActions.add(actionItem); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguinavigationgroupResourceGroupTreeContextMenuUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/group/ResourceGroupTreeContextMenuUIBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/group/ResourceGroupTreeContextMenuUIBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/group/ResourceGroupTreeContextMenuUIBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -89,7 +89,7 @@ </span><span class="cx"> DataType.MEASUREMENT, null); // operations menugroup, lazy-loaded entries because only name/id are needed for display </span><span class="rem">- List<OperationDefinition> operations = operationManager.getSupportedResourceTypeOperations(subject, </span><span class="add">+ List<OperationDefinition> operations = operationManager.findSupportedResourceTypeOperations(subject, </span><span class="cx"> currentResourceGroup.getResourceType().getId(), false); menuItemDescriptorsForView = createViewMenuItemDescriptors(currentResourceGroup, definitions); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguinavigationresourceResourceTreeContextMenuUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeContextMenuUIBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeContextMenuUIBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeContextMenuUIBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -54,7 +54,7 @@ </span><span class="cx"> subject, resourceId, DataType.MEASUREMENT, null, true); // operations menu, lazy-loaded entries because only name/id are needed for display </span><span class="rem">- List<OperationDefinition> operations = operationManager.getSupportedResourceTypeOperations(subject, </span><span class="add">+ List<OperationDefinition> operations = operationManager.findSupportedResourceTypeOperations(subject, </span><span class="cx"> currentResource.getResourceType().getId(), false); menuItemDescriptorsForView = createViewMenuItemDescriptors(resourceId, schedules); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationdefinitiongroupResourceGroupOperationDefinitionUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/group/ResourceGroupOperationDefinitionUIBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/group/ResourceGroupOperationDefinitionUIBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/group/ResourceGroupOperationDefinitionUIBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -54,7 +54,7 @@ </span><span class="cx"> ResourceGroup resourceGroup = EnterpriseFacesContextUtility.getResourceGroup(); // only name and definition are displayed in the "Supported Operations" section of the Operation>New sub-tab </span><span class="rem">- List<OperationDefinition> definitions = operationManager.getSupportedGroupOperations(subject, resourceGroup </span><span class="add">+ List<OperationDefinition> definitions = operationManager.findSupportedGroupOperations(subject, resourceGroup </span><span class="cx"> .getId(), false); return new PageList<OperationDefinition>(definitions, new PageControl(0, definitions.size())); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationdefinitionresourceResourceOperationDefinitionUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/resource/ResourceOperationDefinitionUIBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/resource/ResourceOperationDefinitionUIBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/definition/resource/ResourceOperationDefinitionUIBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -42,7 +42,7 @@ </span><span class="cx"> Resource resource = EnterpriseFacesContextUtility.getResource(); // only name and definition are displayed in the "Supported Operations" section of the Operation>New sub-tab </span><span class="rem">- List<OperationDefinition> definitions = operationManager.getSupportedResourceOperations(subject, resource </span><span class="add">+ List<OperationDefinition> definitions = operationManager.findSupportedResourceOperations(subject, resource </span><span class="cx"> .getId(), false); return new PageList<OperationDefinition>(definitions, new PageControl(0, definitions.size())); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationschedulegroupResourceGroupOperationScheduleUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/group/ResourceGroupOperationScheduleUIBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/group/ResourceGroupOperationScheduleUIBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/group/ResourceGroupOperationScheduleUIBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> List<GroupOperationSchedule> results = null; try { </span><span class="rem">- results = manager.getScheduledGroupOperations(subject, requestGroup.getId()); </span><span class="add">+ results = manager.findScheduledGroupOperations(subject, requestGroup.getId()); </span><span class="cx"> } catch (SchedulerException se) { // throw up all known information to the caller for now throw new IllegalStateException(se.getMessage(), se); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguioperationscheduleresourceResourceOperationScheduleUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/resource/ResourceOperationScheduleUIBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/resource/ResourceOperationScheduleUIBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/operation/schedule/resource/ResourceOperationScheduleUIBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -61,7 +61,7 @@ </span><span class="cx"> List<ResourceOperationSchedule> results = null; try { </span><span class="rem">- results = manager.getScheduledResourceOperations(subject, requestResource.getId()); </span><span class="add">+ results = manager.findScheduledResourceOperations(subject, requestResource.getId()); </span><span class="cx"> } catch (SchedulerException se) { // throw up all known information to the caller for now throw new IllegalStateException(se.getMessage(), se); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveroperationOperationManagerBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -368,7 +368,7 @@ </span><span class="cx"> return; } </span><span class="rem">- public List<ResourceOperationSchedule> getScheduledResourceOperations(Subject subject, int resourceId) </span><span class="add">+ public List<ResourceOperationSchedule> findScheduledResourceOperations(Subject subject, int resourceId) </span><span class="cx"> throws SchedulerException { Resource resource = getResourceIfAuthorized(subject, resourceId); </span><span class="lines">@@ -392,7 +392,7 @@ </span><span class="cx"> return operationSchedules; } </span><span class="rem">- public List<GroupOperationSchedule> getScheduledGroupOperations(Subject subject, int groupId) </span><span class="add">+ public List<GroupOperationSchedule> findScheduledGroupOperations(Subject subject, int groupId) </span><span class="cx"> throws SchedulerException { ResourceGroup group = getCompatibleGroupIfAuthorized(subject, groupId); </span><span class="lines">@@ -1004,7 +1004,7 @@ </span><span class="cx"> } @SuppressWarnings("unchecked") </span><span class="rem">- public List<OperationDefinition> getSupportedResourceOperations(Subject subject, int resourceId, boolean eagerLoaded) { </span><span class="add">+ public List<OperationDefinition> findSupportedResourceOperations(Subject subject, int resourceId, boolean eagerLoaded) { </span><span class="cx"> if (!authorizationManager.canViewResource(subject, resourceId)) { throw new PermissionException("User [" + subject + "] does not have permission to view resource [" + resourceId + "]"); </span><span class="lines">@@ -1026,7 +1026,7 @@ </span><span class="cx"> } @SuppressWarnings("unchecked") </span><span class="rem">- public List<OperationDefinition> getSupportedResourceTypeOperations(Subject subject, int resourceTypeId, </span><span class="add">+ public List<OperationDefinition> findSupportedResourceTypeOperations(Subject subject, int resourceTypeId, </span><span class="cx"> boolean eagerLoaded) { try { String queryName = eagerLoaded ? OperationDefinition.QUERY_FIND_BY_TYPE_AND_NAME </span><span class="lines">@@ -1045,7 +1045,7 @@ </span><span class="cx"> } @SuppressWarnings( { "unchecked" }) </span><span class="rem">- public List<OperationDefinition> getSupportedGroupOperations(Subject subject, int compatibleGroupId, </span><span class="add">+ public List<OperationDefinition> findSupportedGroupOperations(Subject subject, int compatibleGroupId, </span><span class="cx"> boolean eagerLoaded) { if (!authorizationManager.canViewGroup(subject, compatibleGroupId)) { throw new PermissionException("User [" + subject + "] does not have permission to view group [" </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveroperationOperationManagerLocaljava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerLocal.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerLocal.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerLocal.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -136,7 +136,7 @@ </span><span class="cx"> * * @throws SchedulerException */ </span><span class="rem">- List<GroupOperationSchedule> getScheduledGroupOperations(Subject subject, int groupId) throws SchedulerException; </span><span class="add">+ List<GroupOperationSchedule> findScheduledGroupOperations(Subject subject, int groupId) throws SchedulerException; </span><span class="cx"> /** * Given a resource job's details, this returns the schedule for that resource job. </span><span class="lines">@@ -270,7 +270,7 @@ </span><span class="cx"> * * @return the operation definitions for the resource type */ </span><span class="rem">- List<OperationDefinition> getSupportedResourceTypeOperations(Subject subject, int resourceTypeId, </span><span class="add">+ List<OperationDefinition> findSupportedResourceTypeOperations(Subject subject, int resourceTypeId, </span><span class="cx"> boolean eagerLoaded); /** </span><span class="lines">@@ -283,7 +283,7 @@ </span><span class="cx"> * * @return the operation definitions for the group */ </span><span class="rem">- List<OperationDefinition> getSupportedGroupOperations(Subject subject, int compatibleGroupId, boolean eagerLoaded); </span><span class="add">+ List<OperationDefinition> findSupportedGroupOperations(Subject subject, int compatibleGroupId, boolean eagerLoaded); </span><span class="cx"> /** * Returns the definition of the named operation supported by the given resource. If the operation is not valid for </span><span class="lines">@@ -554,7 +554,7 @@ </span><span class="cx"> * * @throws SchedulerException */ </span><span class="rem">- List<ResourceOperationSchedule> getScheduledResourceOperations(Subject subject, int resourceId) </span><span class="add">+ List<ResourceOperationSchedule> findScheduledResourceOperations(Subject subject, int resourceId) </span><span class="cx"> throws SchedulerException; /** </span><span class="lines">@@ -567,7 +567,7 @@ </span><span class="cx"> * * @return the operation definitions for the resource */ </span><span class="rem">- List<OperationDefinition> getSupportedResourceOperations(Subject subject, int resourceId, boolean eagerLoaded); </span><span class="add">+ List<OperationDefinition> findSupportedResourceOperations(Subject subject, int resourceId, boolean eagerLoaded); </span><span class="cx"> /** * #see {@link OperationManagerRemote#scheduleGroupOperation </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveroperationOperationManagerRemotejava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerRemote.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerRemote.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/operation/OperationManagerRemote.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -311,7 +311,7 @@ </span><span class="cx"> * @throws Exception */ @WebMethod </span><span class="rem">- List<ResourceOperationSchedule> getScheduledResourceOperations( // </span><span class="add">+ List<ResourceOperationSchedule> findScheduledResourceOperations( // </span><span class="cx"> @WebParam(name = "subject") Subject subject, // @WebParam(name = "resourceId") int resourceId) // throws Exception; </span><span class="lines">@@ -328,7 +328,7 @@ </span><span class="cx"> * @throws Exception */ @WebMethod </span><span class="rem">- List<OperationDefinition> getSupportedResourceOperations( // </span><span class="add">+ List<OperationDefinition> findSupportedResourceOperations( // </span><span class="cx"> @WebParam(name = "subject") Subject subject, // @WebParam(name = "resourceId") int resourceId, // @WebParam(name = "eagerLoaded") boolean eagerLoaded); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceManagerBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -442,7 +442,7 @@ </span><span class="cx"> int result = 0; try { </span><span class="rem">- List<ResourceOperationSchedule> schedules = operationManager.getScheduledResourceOperations(overlord, </span><span class="add">+ List<ResourceOperationSchedule> schedules = operationManager.findScheduledResourceOperations(overlord, </span><span class="cx"> resourceId); result = schedules.size(); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourcegroupResourceGroupManagerBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -279,7 +279,7 @@ </span><span class="cx"> if (group.getGroupCategory() == GroupCategory.COMPATIBLE) { Subject overlord = subjectManager.getOverlord(); try { </span><span class="rem">- List<GroupOperationSchedule> ops = operationManager.getScheduledGroupOperations(overlord, groupId); </span><span class="add">+ List<GroupOperationSchedule> ops = operationManager.findScheduledGroupOperations(overlord, groupId); </span><span class="cx"> for (GroupOperationSchedule schedule : ops) { try { </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrctestjavaorgrhqenterpriseserveroperationOperationManagerBeanTestjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/operation/OperationManagerBeanTest.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/operation/OperationManagerBeanTest.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/operation/OperationManagerBeanTest.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -155,7 +155,7 @@ </span><span class="cx"> ResourceOperationSchedule schedule = operationManager.scheduleResourceOperation(superuser, resource.getId(), "testOp", null, trigger, "desc"); List<ResourceOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; </span><span class="lines">@@ -184,7 +184,7 @@ </span><span class="cx"> // nothing to unschedule really // but lets prove to ourselves that it isn't scheduled anymore (because it executed) </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 0; } </span><span class="lines">@@ -208,7 +208,7 @@ </span><span class="cx"> assert schedule.getGroup().getId() == newGroup.getId(); List<GroupOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="add">+ schedules = operationManager.findScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; GroupOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -264,7 +264,7 @@ </span><span class="cx"> assert returnedConfiguration.getSimple("param2").getStringValue().equals("blah"); List<GroupOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="add">+ schedules = operationManager.findScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; GroupOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -324,7 +324,7 @@ </span><span class="cx"> assert schedule.getGroup().getId() == newGroup.getId(); List<GroupOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="add">+ schedules = operationManager.findScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; GroupOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -355,7 +355,7 @@ </span><span class="cx"> assert results2.size() == 0; // see that it isn't scheduled anymore </span><span class="rem">- schedules = operationManager.getScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="add">+ schedules = operationManager.findScheduledGroupOperations(superuser, newGroup.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 0; } </span><span class="lines">@@ -915,7 +915,7 @@ </span><span class="cx"> assert schedule.getResource().getId() == newResource.getId(); List<ResourceOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; ResourceOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -976,7 +976,7 @@ </span><span class="cx"> assert returnedConfiguration.getSimple("param2").getStringValue().equals("blah"); List<ResourceOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; ResourceOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -1021,7 +1021,7 @@ </span><span class="cx"> assert schedule.getResource().getId() == newResource.getId(); List<ResourceOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; ResourceOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -1057,7 +1057,7 @@ </span><span class="cx"> assert results.size() == 0; // see that it isn't scheduled anymore </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 0; } </span><span class="lines">@@ -1081,7 +1081,7 @@ </span><span class="cx"> assert schedule.getResource().getId() == newResource.getId(); List<ResourceOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; ResourceOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -1139,7 +1139,7 @@ </span><span class="cx"> assert schedule.getResource().getId() == newResource.getId(); List<ResourceOperationSchedule> schedules; </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(superuser, resource.getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(superuser, resource.getId()); </span><span class="cx"> assert schedules != null; assert schedules.size() == 1; ResourceOperationSchedule returnedSchedule = schedules.get(0); </span><span class="lines">@@ -1483,7 +1483,7 @@ </span><span class="cx"> assert op.equals(newOperation); // need to eager load the definition because .equals compares the resource type objects </span><span class="rem">- ops = operationManager.getSupportedGroupOperations(superuser, newGroup.getId(), true); </span><span class="add">+ ops = operationManager.findSupportedGroupOperations(superuser, newGroup.getId(), true); </span><span class="cx"> assert ops != null; assert ops.size() == 1; op = ops.iterator().next(); </span><span class="lines">@@ -1500,7 +1500,7 @@ </span><span class="cx"> assert op.equals(newOperation); // need to eager load the definition because .equals compares the resource type objects </span><span class="rem">- ops = operationManager.getSupportedResourceOperations(superuser, newResource.getId(), true); </span><span class="add">+ ops = operationManager.findSupportedResourceOperations(superuser, newResource.getId(), true); </span><span class="cx"> assert ops != null; assert ops.size() == 1; op = ops.iterator().next(); </span><span class="lines">@@ -1532,13 +1532,13 @@ </span><span class="cx"> } try { </span><span class="rem">- operationManager.getScheduledGroupOperations(noPermSubject, newGroup.getId()); </span><span class="add">+ operationManager.findScheduledGroupOperations(noPermSubject, newGroup.getId()); </span><span class="cx"> assert false : "Should not have permission to do this"; } catch (PermissionException expected) { } try { </span><span class="rem">- operationManager.getScheduledResourceOperations(noPermSubject, newResource.getId()); </span><span class="add">+ operationManager.findScheduledResourceOperations(noPermSubject, newResource.getId()); </span><span class="cx"> assert false : "Should not have permission to do this"; } catch (PermissionException expected) { } </span><span class="lines">@@ -1552,7 +1552,7 @@ </span><span class="cx"> try { // do not need to eager load just to test authorization </span><span class="rem">- operationManager.getSupportedGroupOperations(noPermSubject, newGroup.getId(), false); </span><span class="add">+ operationManager.findSupportedGroupOperations(noPermSubject, newGroup.getId(), false); </span><span class="cx"> assert false : "Should not have permission to do this"; } catch (PermissionException expected) { } </span><span class="lines">@@ -1566,7 +1566,7 @@ </span><span class="cx"> try { // do not need to eager load just to test authorization </span><span class="rem">- operationManager.getSupportedResourceOperations(noPermSubject, newResource.getId(), false); </span><span class="add">+ operationManager.findSupportedResourceOperations(noPermSubject, newResource.getId(), false); </span><span class="cx"> assert false : "Should not have permission to do this"; } catch (PermissionException expected) { } </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrctestjavaorgrhqenterpriseservertestTestRemoteInterfacejava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestRemoteInterface.java (4408 => 4409)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestRemoteInterface.java 2009-07-15 05:47:12 UTC (rev 4408) +++ rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestRemoteInterface.java 2009-07-15 07:22:32 UTC (rev 4409) </span><span class="lines">@@ -244,7 +244,7 @@ </span><span class="cx"> assertEquals(1, history.size()); // remove scheduled operations </span><span class="rem">- List<ResourceOperationSchedule> schedules = operationManager.getScheduledResourceOperations(user, testPlatform </span><span class="add">+ List<ResourceOperationSchedule> schedules = operationManager.findScheduledResourceOperations(user, testPlatform </span><span class="cx"> .getResource().getId()); assertEquals(1, history.size()); </span><span class="lines">@@ -254,7 +254,7 @@ </span><span class="cx"> .getResource().getId()); } </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(user, testPlatform.getResource().getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(user, testPlatform.getResource().getId()); </span><span class="cx"> assertTrue(schedules.isEmpty()); } </span><span class="lines">@@ -262,13 +262,13 @@ </span><span class="cx"> schedule = operationManager.scheduleResourceOperation(user, testPlatform.getResource().getId(), "viewProcessList", 300000L, 0L, 0, 0, null, "unit test - shutdown operation"); </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(user, testPlatform.getResource().getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(user, testPlatform.getResource().getId()); </span><span class="cx"> assertEquals(1, schedules.size()); assertEquals(schedule.getJobId(), schedules.get(0).getJobId()); operationManager.unscheduleResourceOperation(user, schedules.get(0).getJobId().toString(), testPlatform .getResource().getId()); </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(user, testPlatform.getResource().getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(user, testPlatform.getResource().getId()); </span><span class="cx"> assertTrue(schedules.isEmpty()); } </span><span class="lines">@@ -362,7 +362,7 @@ </span><span class="cx"> assertEquals(1, history.size()); // remove scheduled operations </span><span class="rem">- List<ResourceOperationSchedule> schedules = operationManager.getScheduledResourceOperations(user, testAS </span><span class="add">+ List<ResourceOperationSchedule> schedules = operationManager.findScheduledResourceOperations(user, testAS </span><span class="cx"> .getResource().getId()); assertEquals(1, history.size()); </span><span class="lines">@@ -372,7 +372,7 @@ </span><span class="cx"> .getId()); } </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(user, testAS.getResource().getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(user, testAS.getResource().getId()); </span><span class="cx"> assertTrue(schedules.isEmpty()); } </span><span class="lines">@@ -380,13 +380,13 @@ </span><span class="cx"> schedule = operationManager.scheduleResourceOperation(user, testAS.getResource().getId(), "shutdown", 300000L, 0L, 0, 0, null, "unit test - shutdown operation"); </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(user, testAS.getResource().getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(user, testAS.getResource().getId()); </span><span class="cx"> assertEquals(1, schedules.size()); assertEquals(schedule.getJobId(), schedules.get(0).getJobId()); operationManager.unscheduleResourceOperation(user, schedules.get(0).getJobId().toString(), testAS.getResource() .getId()); </span><span class="rem">- schedules = operationManager.getScheduledResourceOperations(user, testAS.getResource().getId()); </span><span class="add">+ schedules = operationManager.findScheduledResourceOperations(user, testAS.getResource().getId()); </span><span class="cx"> assertTrue(schedules.isEmpty()); } </span> </pre> </div> </div> </body> </html> |