From: <jsh...@rh...> - 2009-08-20 02:47:37
|
<!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] [4952] added remote method to get deployTime configDef for a package type</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>4952</dd> <dt>Author</dt> <dd>jshaughn</dd> <dt>Date</dt> <dd>2009-08-19 21:47:26 -0500 (Wed, 19 Aug 2009)</dd> </dl> <h3>Log Message</h3> <pre>added remote method to get deployTime configDef for a package type</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverconfigurationConfigurationManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverconfigurationConfigurationManagerLocaljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerLocal.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverconfigurationConfigurationManagerRemotejava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerRemote.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverconfigurationConfigurationManagerBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java (4951 => 4952)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java 2009-08-20 02:46:08 UTC (rev 4951) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java 2009-08-20 02:47:26 UTC (rev 4952) </span><span class="lines">@@ -60,6 +60,7 @@ </span><span class="cx"> import org.rhq.core.domain.configuration.group.AbstractGroupConfigurationUpdate; import org.rhq.core.domain.configuration.group.GroupPluginConfigurationUpdate; import org.rhq.core.domain.configuration.group.GroupResourceConfigurationUpdate; </span><span class="add">+import org.rhq.core.domain.content.PackageType; </span><span class="cx"> import org.rhq.core.domain.measurement.AvailabilityType; import org.rhq.core.domain.resource.Agent; import org.rhq.core.domain.resource.Resource; </span><span class="lines">@@ -1195,6 +1196,22 @@ </span><span class="cx"> return; } </span><span class="add">+ public ConfigurationDefinition getPackageTypeConfigurationDefinition(Subject subject, int packageTypeId) { + Query query = entityManager.createNamedQuery(ConfigurationDefinition.QUERY_FIND_DEPLOYMENT_BY_PACKAGE_TYPE_ID); + query.setParameter("packageTypeId", packageTypeId); + ConfigurationDefinition configurationDefinition = null; + try { + configurationDefinition = (ConfigurationDefinition) query.getSingleResult(); + } catch (NoResultException e) { + PackageType packageType = entityManager.find(PackageType.class, packageTypeId); + if (packageType == null) { + throw new EntityNotFoundException("A package type with id " + packageTypeId + " does not exist."); + } + } + + return configurationDefinition; + } + </span><span class="cx"> @Nullable public ConfigurationDefinition getResourceConfigurationDefinitionForResourceType(Subject subject, int resourceTypeId) { Query query = entityManager.createNamedQuery(ConfigurationDefinition.QUERY_FIND_RESOURCE_BY_RESOURCE_TYPE_ID); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverconfigurationConfigurationManagerLocaljava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerLocal.java (4951 => 4952)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerLocal.java 2009-08-20 02:46:08 UTC (rev 4951) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerLocal.java 2009-08-20 02:47:26 UTC (rev 4952) </span><span class="lines">@@ -466,4 +466,10 @@ </span><span class="cx"> Configuration newConfiguration) throws ResourceNotFoundException, ConfigurationUpdateStillInProgressException; Configuration getResourceConfiguration(Subject subject, int resourceId); </span><span class="add">+ + /** + * @see ConfigurationManagerRemote#getPackageTypeConfigurationDefinition(Subject,int) + */ + ConfigurationDefinition getPackageTypeConfigurationDefinition(Subject subject, int packageTypeId); + </span><span class="cx"> } \ No newline at end of file </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverconfigurationConfigurationManagerRemotejava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerRemote.java (4951 => 4952)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerRemote.java 2009-08-20 02:46:08 UTC (rev 4951) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerRemote.java 2009-08-20 02:47:26 UTC (rev 4952) </span><span class="lines">@@ -19,6 +19,7 @@ </span><span class="cx"> package org.rhq.enterprise.server.configuration; import java.util.Map; </span><span class="add">+ </span><span class="cx"> import javax.ejb.Remote; import javax.jws.WebMethod; import javax.jws.WebParam; </span><span class="lines">@@ -235,4 +236,19 @@ </span><span class="cx"> ConfigurationDefinition getPluginConfigurationDefinitionForResourceType( @WebParam(name = "subject") Subject subject, @WebParam(name = "resourceTypeId") int resourceTypeId); </span><span class="add">+ /** + * Return the deploy configuration definition for the {@link org.rhq.core.domain.content.PackageType} with the + * specified id. + * + * @param subject the user who is requesting the plugin configuration definition + * @param packageTypeId identifies the package type whose configuration definition is being requested + * + * @return the the deploy configuration definition for the {@link org.rhq.core.domain.content.PackageType} with the + * specified id. + */ + @WebMethod + ConfigurationDefinition getPackageTypeConfigurationDefinition( // + @WebParam(name = "subject") Subject subject, // + @WebParam(name = "packageTypeId") int packageTypeId); + </span><span class="cx"> } \ No newline at end of file </span> </pre> </div> </div> </body> </html> |