From: <jma...@rh...> - 2009-07-08 20:53:06
|
<!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] [4311] [RHQ-2192] - fix AlertDefinitionManagerBean methods that return lists to use findXXX (as opposed to getXXX) naming convention; </title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>4311</dd> <dt>Author</dt> <dd>jmarques</dd> <dt>Date</dt> <dd>2009-07-08 15:53:02 -0500 (Wed, 08 Jul 2009)</dd> </dl> <h3>Log Message</h3> <pre>[RHQ-2192] - fix AlertDefinitionManagerBean methods that return lists to use findXXX (as opposed to getXXX) naming convention; </pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguialertListAlertDefinitionsUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertDefinitionsUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguialertListAlertHistoryUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertHistoryUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsconfigDefinitionFormjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionForm.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsconfigListDefinitionsActionjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/ListDefinitionsAction.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveralertAlertDefinitionManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveralertAlertDefinitionManagerLocaljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguialertListAlertDefinitionsUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertDefinitionsUIBean.java (4310 => 4311)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertDefinitionsUIBean.java 2009-07-08 20:48:11 UTC (rev 4310) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertDefinitionsUIBean.java 2009-07-08 20:53:02 UTC (rev 4311) </span><span class="lines">@@ -20,8 +20,9 @@ </span><span class="cx"> import javax.faces.application.FacesMessage; import javax.faces.model.DataModel; </span><span class="add">+ +import org.rhq.core.domain.alert.AlertDefinition; </span><span class="cx"> import org.rhq.core.domain.auth.Subject; </span><span class="rem">-import org.rhq.core.domain.alert.AlertDefinition; </span><span class="cx"> import org.rhq.core.domain.resource.Resource; import org.rhq.core.domain.util.PageControl; import org.rhq.core.domain.util.PageList; </span><span class="lines">@@ -138,7 +139,7 @@ </span><span class="cx"> } PageList<AlertDefinition> results = null; </span><span class="rem">- results = manager.getAlertDefinitions(subject, requestResource.getId(), pc); </span><span class="add">+ results = manager.findAlertDefinitions(subject, requestResource.getId(), pc); </span><span class="cx"> return results; } } </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguialertListAlertHistoryUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertHistoryUIBean.java (4310 => 4311)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertHistoryUIBean.java 2009-07-08 20:48:11 UTC (rev 4310) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/ListAlertHistoryUIBean.java 2009-07-08 20:53:02 UTC (rev 4311) </span><span class="lines">@@ -115,7 +115,7 @@ </span><span class="cx"> public SelectItem[] getAlertDefinitionSelectItems() { if (alertDefinitionSelectItems == null) { </span><span class="rem">- List<IntegerOptionItem> optionItems = alertDefinitionManager.getAlertDefinitionOptionItems(getSubject(), </span><span class="add">+ List<IntegerOptionItem> optionItems = alertDefinitionManager.findAlertDefinitionOptionItems(getSubject(), </span><span class="cx"> getResource().getId()); alertDefinitionSelectItems = SelectItemUtils.convertFromListOptionItem(optionItems, true); } </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsconfigDefinitionFormjava"></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/DefinitionForm.java (4310 => 4311)</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/DefinitionForm.java 2009-07-08 20:48:11 UTC (rev 4310) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionForm.java 2009-07-08 20:53:02 UTC (rev 4311) </span><span class="lines">@@ -454,7 +454,7 @@ </span><span class="cx"> AlertDefinitionManagerLocal alertDefinitionManager = LookupUtil.getAlertDefinitionManager(); Integer resourceId = RequestUtils.getResourceId(request); </span><span class="rem">- alertDefinitions = alertDefinitionManager.getAlertDefinitions(subject, resourceId, PageControl </span><span class="add">+ alertDefinitions = alertDefinitionManager.findAlertDefinitions(subject, resourceId, PageControl </span><span class="cx"> .getUnlimitedInstance()); } else { AlertTemplateManagerLocal alertTemplateManager = LookupUtil.getAlertTemplateManager(); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitoralertsconfigListDefinitionsActionjava"></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/ListDefinitionsAction.java (4310 => 4311)</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/ListDefinitionsAction.java 2009-07-08 20:48:11 UTC (rev 4310) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/ListDefinitionsAction.java 2009-07-08 20:53:02 UTC (rev 4311) </span><span class="lines">@@ -20,6 +20,7 @@ </span><span class="cx"> import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; </span><span class="add">+ </span><span class="cx"> import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts.action.ActionForm; </span><span class="lines">@@ -27,8 +28,9 @@ </span><span class="cx"> import org.apache.struts.action.ActionMapping; import org.apache.struts.tiles.ComponentContext; import org.apache.struts.tiles.actions.TilesAction; </span><span class="add">+ +import org.rhq.core.domain.alert.AlertDefinition; </span><span class="cx"> import org.rhq.core.domain.auth.Subject; </span><span class="rem">-import org.rhq.core.domain.alert.AlertDefinition; </span><span class="cx"> import org.rhq.core.domain.util.PageControl; import org.rhq.core.domain.util.PageList; import org.rhq.enterprise.gui.legacy.Constants; </span><span class="lines">@@ -58,7 +60,7 @@ </span><span class="cx"> int resourceId = RequestUtils.getResourceId(request); </span><span class="rem">- PageList<AlertDefinition> alertDefinitions = alertManager.getAlertDefinitions(subject, resourceId, pc); </span><span class="add">+ PageList<AlertDefinition> alertDefinitions = alertManager.findAlertDefinitions(subject, resourceId, pc); </span><span class="cx"> // TODO GH: Deal with when its by type... i guess for the template setup </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveralertAlertDefinitionManagerBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java (4310 => 4311)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java 2009-07-08 20:48:11 UTC (rev 4310) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java 2009-07-08 20:53:02 UTC (rev 4311) </span><span class="lines">@@ -94,7 +94,7 @@ </span><span class="cx"> } @SuppressWarnings("unchecked") </span><span class="rem">- public List<AlertDefinition> getAllAlertDefinitionsWithConditions(int agentId, Subject user) { </span><span class="add">+ public List<AlertDefinition> findAllAlertDefinitionsWithConditions(int agentId, Subject user) { </span><span class="cx"> if (authorizationManager.isOverlord(user) == false) { throw new PermissionException("User [" + user.getName() + "] does not have permission to call " + "getAllAlertDefinitionsWithConditions; only the overlord has that right"); </span><span class="lines">@@ -108,7 +108,7 @@ </span><span class="cx"> } @SuppressWarnings("unchecked") </span><span class="rem">- public PageList<AlertDefinition> getAlertDefinitions(Subject subject, int resourceId, PageControl pageControl) { </span><span class="add">+ public PageList<AlertDefinition> findAlertDefinitions(Subject subject, int resourceId, PageControl pageControl) { </span><span class="cx"> pageControl.initDefaultOrderingField("ctime", PageOrdering.DESC); Query queryCount = PersistenceUtility.createCountQuery(entityManager, AlertDefinition.QUERY_FIND_BY_RESOURCE); </span><span class="lines">@@ -145,7 +145,7 @@ </span><span class="cx"> } @SuppressWarnings("unchecked") </span><span class="rem">- public List<IntegerOptionItem> getAlertDefinitionOptionItems(Subject subject, int resourceId) { </span><span class="add">+ public List<IntegerOptionItem> findAlertDefinitionOptionItems(Subject subject, int resourceId) { </span><span class="cx"> PageControl pageControl = PageControl.getUnlimitedInstance(); pageControl.initDefaultOrderingField("ad.name", PageOrdering.ASC); </span><span class="lines">@@ -354,7 +354,7 @@ </span><span class="cx"> } @SuppressWarnings("unchecked") </span><span class="rem">- public List<AlertDefinition> getAllRecoveryDefinitionsById(Subject subject, Integer alertDefinitionId) { </span><span class="add">+ public List<AlertDefinition> findAllRecoveryDefinitionsById(Subject subject, Integer alertDefinitionId) { </span><span class="cx"> if (authorizationManager.isOverlord(subject) == false) { throw new PermissionException("User [" + subject.getName() + "] does not have permission to call " + "getAllRecoveryDefinitionsById; only the overlord has that right"); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserveralertAlertDefinitionManagerLocaljava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java (4310 => 4311)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java 2009-07-08 20:48:11 UTC (rev 4310) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java 2009-07-08 20:53:02 UTC (rev 4311) </span><span class="lines">@@ -36,13 +36,13 @@ </span><span class="cx"> */ @Local public interface AlertDefinitionManagerLocal { </span><span class="rem">- List<AlertDefinition> getAllAlertDefinitionsWithConditions(int agentId, Subject user); </span><span class="add">+ List<AlertDefinition> findAllAlertDefinitionsWithConditions(int agentId, Subject user); </span><span class="cx"> </span><span class="rem">- PageList<AlertDefinition> getAlertDefinitions(Subject subject, int resourceId, PageControl pageControl); </span><span class="add">+ PageList<AlertDefinition> findAlertDefinitions(Subject subject, int resourceId, PageControl pageControl); </span><span class="cx"> AlertDefinition getAlertDefinitionById(Subject subject, int alertDefinitionId); </span><span class="rem">- List<IntegerOptionItem> getAlertDefinitionOptionItems(Subject subject, int resourceId); </span><span class="add">+ List<IntegerOptionItem> findAlertDefinitionOptionItems(Subject subject, int resourceId); </span><span class="cx"> int createAlertDefinition(Subject subject, AlertDefinition alertDefinition, Integer resourceId) throws InvalidAlertDefinitionException; </span><span class="lines">@@ -57,7 +57,7 @@ </span><span class="cx"> int disableAlertDefinitions(Subject subject, Integer[] alertDefinitionIds); </span><span class="rem">- List<AlertDefinition> getAllRecoveryDefinitionsById(Subject subject, Integer alertDefinitionId); </span><span class="add">+ List<AlertDefinition> findAllRecoveryDefinitionsById(Subject subject, Integer alertDefinitionId); </span><span class="cx"> void copyAlertDefinitions(Subject subject, Integer[] alertDefinitionIds); </span> </pre> </div> </div> </body> </html> |