EMBJOPR SVN: r39 - trunk/core.
by embjopr-commits@lists.jboss.org
Author: charles.crouch(a)jboss.com
Date: 2008-11-10 12:45:38 -0500 (Mon, 10 Nov 2008)
New Revision: 39
Modified:
trunk/core/pom.xml
Log:
EMBJOPR-21 tell AS5 to ignore any metadata in our WEB-INF/lib jars
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2008-11-10 17:12:28 UTC (rev 38)
+++ trunk/core/pom.xml 2008-11-10 17:45:38 UTC (rev 39)
@@ -308,49 +308,6 @@
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>de-ejb-domain-jar</id>
- <phase>package</phase>
- <goals><goal>run</goal></goals>
- <configuration>
- <tasks>
- <!-- Strip out the ejb-jar.xml and persistence.xml from core domain jar,
- so AS5 will not try to deploy it as an EJB-JAR and dump warnings
- about not being able to find an "RHQDS" datasource. -->
-
- <!-- Extract the domain jar from the war. -->
- <property name="deEjb.tmpDir" location="${basedir}/target/deEjb.tmp"/>
- <delete dir="${deEjb.tmpDir}"/>
- <mkdir dir="${deEjb.tmpDir}"/>
- <unwar src="${basedir}/target/${project.build.finalName}.war"
- dest="${deEjb.tmpDir}">
- <patternset><include name="WEB-INF/lib/rhq-core-domain-${rhq.version}.jar"/></patternset>
- </unwar>
-
- <!-- Delete ejb-jar.xml and persistence.xml from the domain jar. -->
- <property name="domainJar.tmpDir" location="${deEjb.tmpDir}/rhq-core-domain"/>
- <property name="domainJar" location="${deEjb.tmpDir}/WEB-INF/lib/rhq-core-domain-${rhq.version}.jar"/>
- <mkdir dir="${domainJar.tmpDir}"/>
- <unzip dest="${domainJar.tmpDir}" src="${domainJar}"/>
- <delete>
- <fileset dir="${domainJar.tmpDir}" includes="META-INF/ejb-jar.xml,META-INF/persistence.xml"/>
- </delete>
- <delete file="${domainJar}"/>
- <zip destfile="${domainJar}" basedir="${domainJar.tmpDir}"/>
-
- <!-- Stick the updated domain jar in the war. -->
- <war destfile="${basedir}/target/${project.build.finalName}.war"
- basedir="${deEjb.tmpDir}"
- update="true"/>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
15 years, 5 months
EMBJOPR SVN: r38 - trunk/core/src/main/java/org/jboss/on/embedded/ui.
by embjopr-commits@lists.jboss.org
Author: charles.crouch(a)jboss.com
Date: 2008-11-10 12:12:28 -0500 (Mon, 10 Nov 2008)
New Revision: 38
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/ui/NavigationAction.java
Log:
EMBJOPR-15 and EMBJOPR-20 refactored how we generate the base url for the app
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/NavigationAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/NavigationAction.java 2008-11-07 23:57:19 UTC (rev 37)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/NavigationAction.java 2008-11-10 17:12:28 UTC (rev 38)
@@ -113,14 +113,9 @@
FacesContext context = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();
- // Build the base URL
- url.append(request.getProtocol().startsWith("HTTPS") ? "https://" : "http://");
- url.append(request.getServerName());
- url.append(request.getServerPort() == 80 ? null : ":" + request.getServerPort());
- url.append(request.getContextPath());
- url.append("/");
-
- baseUrl = url.toString();
+ int indexAfterContextRoot = request.getRequestURL().indexOf(request.getServletPath());
+ baseUrl = request.getRequestURL().substring(0, indexAfterContextRoot) + "/";
+
log.debug("Base URL: " + url);
}
15 years, 5 months
EMBJOPR SVN: r37 - trunk/core.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-11-07 18:57:19 -0500 (Fri, 07 Nov 2008)
New Revision: 37
Modified:
trunk/core/pom.xml
Log:
upgrade JSF API dep from v1.2_09 to v1.2_10
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2008-11-07 22:25:16 UTC (rev 36)
+++ trunk/core/pom.xml 2008-11-07 23:57:19 UTC (rev 37)
@@ -165,7 +165,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_09</version>
+ <version>1.2_10</version>
<scope>provided</scope>
</dependency>
@@ -355,6 +355,18 @@
</plugins>
</build>
+ <repositories>
+ <!-- If the JBoss repo is down, uncomment this to pull down the JSF jars. -->
+ <!--
+ <repository>
+ <id>java.net</id>
+ <name>java.net Maven 1 Repository</name>
+ <url>https://maven-repository.dev.java.net/repository/</url>
+ <layout>legacy</layout>
+ </repository>
+ -->
+ </repositories>
+
<profiles>
<profile>
<id>dev</id>
15 years, 6 months
EMBJOPR SVN: r36 - trunk.
by embjopr-commits@lists.jboss.org
Author: mazz
Date: 2008-11-07 17:25:16 -0500 (Fri, 07 Nov 2008)
New Revision: 36
Modified:
trunk/.classpath
Log:
attach available source to dependencies
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2008-11-07 21:53:55 UTC (rev 35)
+++ trunk/.classpath 2008-11-07 22:25:16 UTC (rev 36)
@@ -1,58 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="core/src/main/java"/>
- <classpathentry kind="src" path="core/src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" path="core/src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2.jar" sourcepath="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1-jboss/dom4j-1.6.1-jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar" sourcepath="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/el/el-api/1.0/el-api-1.0.jar" sourcepath="M2_REPO/javax/el/el-api/1.0/el-api-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.4.sp1/hibernate-3.2.4.sp1.jar" sourcepath="M2_REPO/org/hibernate/hibernate/3.2.4.sp1/hibernate-3.2.4.sp1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.3.0.ga/hibernate-annotations-3.3.0.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.3.0.ga/hibernate-annotations-3.3.0.ga-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar"/>
+ <classpathentry kind="var" path="M2_REPO/i18nlog/i18nlog/1.0.9/i18nlog-1.0.9.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.5.0.GA/javassist-3.5.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta6/jboss-deployers-core-spi-2.0.0.Beta6.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta6/jboss-deployers-core-spi-2.0.0.Beta6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/el/jboss-el/2.0.1.GA/jboss-el-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/jboss-embedded-all/beta3.SP2/jboss-embedded-all-beta3.SP2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/jboss-embedded-api/beta3.SP2/jboss-embedded-api-beta3.SP2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam/2.0.2.SP1/jboss-seam-2.0.2.SP1.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam/2.0.2.SP1/jboss-seam-2.0.2.SP1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-debug/2.0.2.SP1/jboss-seam-debug-2.0.2.SP1.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam-debug/2.0.2.SP1/jboss-seam-debug-2.0.2.SP1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.0.2.SP1/jboss-seam-ui-2.0.2.SP1.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam-ui/2.0.2.SP1/jboss-seam-ui-2.0.2.SP1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/faces/jsf-api/1.2_09/jsf-api-1.2_09.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1.jar" sourcepath="M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-client-api/1.2.0-SNAPSHOT/rhq-core-client-api-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-client-api/1.2.0-SNAPSHOT/rhq-core-client-api-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-comm-api/1.2.0-SNAPSHOT/rhq-core-comm-api-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-comm-api/1.2.0-SNAPSHOT/rhq-core-comm-api-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-domain/1.2.0-SNAPSHOT/rhq-core-domain-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-domain/1.2.0-SNAPSHOT/rhq-core-domain-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-gui/1.2.0-SNAPSHOT/rhq-core-gui-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-gui/1.2.0-SNAPSHOT/rhq-core-gui-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-native-system/1.2.0-SNAPSHOT/rhq-core-native-system-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-native-system/1.2.0-SNAPSHOT/rhq-core-native-system-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-plugin-api/1.2.0-SNAPSHOT/rhq-core-plugin-api-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-plugin-api/1.2.0-SNAPSHOT/rhq-core-plugin-api-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-plugin-container/1.2.0-SNAPSHOT/rhq-core-plugin-container-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-plugin-container/1.2.0-SNAPSHOT/rhq-core-plugin-container-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-util/1.2.0-SNAPSHOT/rhq-core-util-1.2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/rhq/rhq-core-util/1.2.0-SNAPSHOT/rhq-core-util-1.2.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.2.2.GA/richfaces-api-3.2.2.GA.jar" sourcepath="M2_REPO/org/richfaces/framework/richfaces-api/3.2.2.GA/richfaces-api-3.2.2.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.2.2.GA/richfaces-impl-3.2.2.GA.jar" sourcepath="M2_REPO/org/richfaces/framework/richfaces-impl/3.2.2.GA/richfaces-impl-3.2.2.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.2.2.GA/richfaces-ui-3.2.2.GA.jar" sourcepath="M2_REPO/org/richfaces/ui/richfaces-ui/3.2.2.GA/richfaces-ui-3.2.2.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.7/testng-5.7-jdk15.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/thirdparty-all/beta3.SP2/thirdparty-all-beta3.SP2.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
- <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2.jar" sourcepath="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
- <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
- <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1-jboss/dom4j-1.6.1-jboss.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/el/el-api/1.0/el-api-1.0.jar" sourcepath="M2_REPO/javax/el/el-api/1.0/el-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.4.sp1/hibernate-3.2.4.sp1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.3.0.ga/hibernate-annotations-3.3.0.ga.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar"/>
- <classpathentry kind="var" path="M2_REPO/i18nlog/i18nlog/1.0.9/i18nlog-1.0.9.jar"/>
- <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.5.0.GA/javassist-3.5.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta6/jboss-deployers-core-spi-2.0.0.Beta6.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/el/jboss-el/2.0.1.GA/jboss-el-2.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/jboss-embedded-all/beta3.SP2/jboss-embedded-all-beta3.SP2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/jboss-embedded-api/beta3.SP2/jboss-embedded-api-beta3.SP2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam/2.0.2.SP1/jboss-seam-2.0.2.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-debug/2.0.2.SP1/jboss-seam-debug-2.0.2.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.0.2.SP1/jboss-seam-ui-2.0.2.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/faces/jsf-api/1.2_09/jsf-api-1.2_09.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-client-api/1.2.0-SNAPSHOT/rhq-core-client-api-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-comm-api/1.2.0-SNAPSHOT/rhq-core-comm-api-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-domain/1.2.0-SNAPSHOT/rhq-core-domain-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-gui/1.2.0-SNAPSHOT/rhq-core-gui-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-native-system/1.2.0-SNAPSHOT/rhq-core-native-system-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-plugin-api/1.2.0-SNAPSHOT/rhq-core-plugin-api-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-plugin-container/1.2.0-SNAPSHOT/rhq-core-plugin-container-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-util/1.2.0-SNAPSHOT/rhq-core-util-1.2.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.2.2.GA/richfaces-api-3.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.2.2.GA/richfaces-impl-3.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.2.2.GA/richfaces-ui-3.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.7/testng-5.7-jdk15.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/thirdparty-all/beta3.SP2/thirdparty-all-beta3.SP2.jar"/>
</classpath>
15 years, 6 months
EMBJOPR SVN: r35 - trunk.
by embjopr-commits@lists.jboss.org
Author: mazz
Date: 2008-11-07 16:53:55 -0500 (Fri, 07 Nov 2008)
New Revision: 35
Added:
trunk/.classpath
trunk/.project
Log:
initial checkin of .classpath/.project files. these are going in the top level, even though technically we should have subprojects for the jbas4 and jbas5 builds. but for now, because we build using mvn at command line anyway, these are here just to allow eclipse to compile the code and look/edit source.
Added: trunk/.classpath
===================================================================
--- trunk/.classpath (rev 0)
+++ trunk/.classpath 2008-11-07 21:53:55 UTC (rev 35)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="core/src/main/java"/>
+ <classpathentry kind="src" path="core/src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="eclipse-classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2.jar" sourcepath="M2_REPO/org/jetbrains/annotations/7.0.2/annotations-7.0.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1-jboss/dom4j-1.6.1-jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/el/el-api/1.0/el-api-1.0.jar" sourcepath="M2_REPO/javax/el/el-api/1.0/el-api-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.4.sp1/hibernate-3.2.4.sp1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.3.0.ga/hibernate-annotations-3.3.0.ga.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar"/>
+ <classpathentry kind="var" path="M2_REPO/i18nlog/i18nlog/1.0.9/i18nlog-1.0.9.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.5.0.GA/javassist-3.5.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta6/jboss-deployers-core-spi-2.0.0.Beta6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/el/jboss-el/2.0.1.GA/jboss-el-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/jboss-embedded-all/beta3.SP2/jboss-embedded-all-beta3.SP2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/jboss-embedded-api/beta3.SP2/jboss-embedded-api-beta3.SP2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam/2.0.2.SP1/jboss-seam-2.0.2.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-debug/2.0.2.SP1/jboss-seam-debug-2.0.2.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.0.2.SP1/jboss-seam-ui-2.0.2.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/faces/jsf-api/1.2_09/jsf-api-1.2_09.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.15.B1/jsf-facelets-1.1.15.B1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-client-api/1.2.0-SNAPSHOT/rhq-core-client-api-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-comm-api/1.2.0-SNAPSHOT/rhq-core-comm-api-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-domain/1.2.0-SNAPSHOT/rhq-core-domain-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-gui/1.2.0-SNAPSHOT/rhq-core-gui-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-native-system/1.2.0-SNAPSHOT/rhq-core-native-system-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-plugin-api/1.2.0-SNAPSHOT/rhq-core-plugin-api-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-plugin-container/1.2.0-SNAPSHOT/rhq-core-plugin-container-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/rhq/rhq-core-util/1.2.0-SNAPSHOT/rhq-core-util-1.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.2.2.GA/richfaces-api-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.2.2.GA/richfaces-impl-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.2.2.GA/richfaces-ui-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/5.7/testng-5.7-jdk15.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/seam/embedded/thirdparty-all/beta3.SP2/thirdparty-all-beta3.SP2.jar"/>
+</classpath>
Property changes on: trunk/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/.project
===================================================================
--- trunk/.project (rev 0)
+++ trunk/.project 2008-11-07 21:53:55 UTC (rev 35)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>embjopr</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
EMBJOPR SVN: r34 - in trunk/core/src/main: webapp/WEB-INF/classes and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-11-06 15:35:25 -0500 (Thu, 06 Nov 2008)
New Revision: 34
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java
trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
Log:
improve error reporting in GUI for failed EAR/WAR updates
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java 2008-11-05 22:37:07 UTC (rev 33)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java 2008-11-06 20:35:25 UTC (rev 34)
@@ -139,7 +139,7 @@
return SUCCESS_OUTCOME;
default:
String cause = (createResourceResponse.getErrorMessage() != null) ?
- createResourceResponse.getErrorMessage() : "unknown";
+ createResourceResponse.getErrorMessage() : "unknown";
facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.failure",
getFileName(), cause);
return FAILURE_OUTCOME;
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java 2008-11-05 22:37:07 UTC (rev 33)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java 2008-11-06 20:35:25 UTC (rev 34)
@@ -43,6 +43,8 @@
import org.rhq.core.domain.content.transfer.ContentDiscoveryReport;
import org.rhq.core.domain.content.transfer.DeployPackagesRequest;
import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
+import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pc.PluginContainer;
@@ -106,7 +108,7 @@
// NOTE: This check is necessary, because the "required" attribute of the Seam FileUpload component doesn't
// work.
facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
- "content.resourceInstance.create.noFileSelected");
+ "content.resourceInstance.update.noFileSelected");
return FAILURE_OUTCOME;
}
if (!getFileName().equals(this.packageDetails.getFileName())) {
@@ -139,20 +141,32 @@
DeployPackagesRequest deployPackagesRequest = new DeployPackagesRequest(1, this.resource.getId(), packageDetails);
ContentManager contentManager = PluginContainer.getInstance().getContentManager();
+ DeployIndividualPackageResponse deployPackageResponse;
try {
- contentManager.deployPackagesImmediately(deployPackagesRequest);
+ DeployPackagesResponse deployPackagesResponse = contentManager.deployPackagesImmediately(deployPackagesRequest);
+ deployPackageResponse = deployPackagesResponse.getPackageResponses().iterator().next();
}
- catch (PluginContainerException e) {
- facesMessages.add(FacesMessage.SEVERITY_ERROR, e.getLocalizedMessage());
+ catch (Exception e) {
+ facesMessages.add(FacesMessage.SEVERITY_FATAL, e.getLocalizedMessage());
return FAILURE_OUTCOME;
}
- facesMessages.add(FacesMessage.SEVERITY_INFO, "{0} {1} updated.", this.packageType.getDisplayName(),
- this.packageDetails.getFileName());
- return SUCCESS_OUTCOME;
+ switch (deployPackageResponse.getResult())
+ {
+ case SUCCESS:
+ facesMessages.add(FacesMessage.SEVERITY_INFO, "{0} {1} updated.", this.packageType.getDisplayName(),
+ this.packageDetails.getFileName());
+ return SUCCESS_OUTCOME;
+ default:
+ String cause = (deployPackageResponse.getErrorMessage() != null) ?
+ deployPackageResponse.getErrorMessage() : "unknown";
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.update.failure",
+ getFileName(), cause);
+ return FAILURE_OUTCOME;
+ }
}
- public ResourcePackageDetails getBackingPackage() throws Exception {
+ private ResourcePackageDetails getBackingPackage() throws Exception {
ContentDiscoveryReport report = null;
try {
report = PluginContainer.getInstance().getContentManager().executeResourcePackageDiscoveryImmediately(
Modified: trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-11-05 22:37:07 UTC (rev 33)
+++ trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-11-06 20:35:25 UTC (rev 34)
@@ -160,7 +160,10 @@
content.resourceInstance.create.failure=Failed to create Resource {0} - cause: {1}
#Messages for resourceInstanceContent.xhtml
+content.resourceInstance.update.noFileSelected=Please enter a file to upload.
content.resourceInstance.update.wrongFileName=The specified file must have the same name as the existing deployed {0} ({1}).
+content.resourceInstance.update.success={0} {1} updated.
+content.resourceInstance.update.failure=Failed to update {0} ({1}).
exception.heading=Internal Error
exception.paragraph1=The application has encountered an error.
15 years, 6 months
EMBJOPR SVN: r33 - trunk/jbas4.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-11-05 17:37:07 -0500 (Wed, 05 Nov 2008)
New Revision: 33
Modified:
trunk/jbas4/pom.xml
Log:
include the hibernate plugin (https://jira.jboss.org/jira/browse/EMBJOPR-26)
Modified: trunk/jbas4/pom.xml
===================================================================
--- trunk/jbas4/pom.xml 2008-11-05 17:03:27 UTC (rev 32)
+++ trunk/jbas4/pom.xml 2008-11-05 22:37:07 UTC (rev 33)
@@ -66,14 +66,19 @@
<outputDirectory>${warDir}/plugins</outputDirectory>
<artifactItems>
<artifactItem>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>rhq-jmx-plugin</artifactId>
+ <version>${rhq.version}</version>
+ </artifactItem>
+ <artifactItem>
<groupId>${jon.groupId}</groupId>
- <artifactId>jopr-jboss-as-plugin</artifactId>
+ <artifactId>jopr-hibernate-plugin</artifactId>
<version>${jon.version}</version>
</artifactItem>
<artifactItem>
- <groupId>${rhq.groupId}</groupId>
- <artifactId>rhq-jmx-plugin</artifactId>
- <version>${rhq.version}</version>
+ <groupId>${jon.groupId}</groupId>
+ <artifactId>jopr-jboss-as-plugin</artifactId>
+ <version>${jon.version}</version>
</artifactItem>
<artifactItem>
<groupId>${jon.groupId}</groupId>
15 years, 6 months
EMBJOPR SVN: r32 - trunk.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-11-05 12:03:27 -0500 (Wed, 05 Nov 2008)
New Revision: 32
Modified:
trunk/pom.xml
Log:
remove enforcer and buildnumber plugin blocks, so those plugins will be inherited from the rhq-parent pom
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-11-04 15:53:35 UTC (rev 31)
+++ trunk/pom.xml 2008-11-05 17:03:27 UTC (rev 32)
@@ -79,32 +79,6 @@
<plugins>
<plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-alpha-3</version>
- <executions>
- <execution>
- <id>enforce-versions</id>
- <goals>
- <!-- IMPORTANT: Use enforce goal, rather than enforce-once goal, otherwise reactor
- builds will fail due to http://jira.codehaus.org/browse/MENFORCER-11 -->
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireMavenVersion>
- <version>2.0</version>
- </requireMavenVersion>
- <requireJavaVersion>
- <version>(1.5,1.6]</version>
- <!-- 1.5.x -->
- </requireJavaVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<useCache>false</useCache>
@@ -122,24 +96,6 @@
</configuration>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <version>1.0-beta-1-jboss-1</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <doCheck>false</doCheck>
- <doUpdate>false</doUpdate>
- </configuration>
- </plugin>
-
</plugins>
</build>
15 years, 6 months
EMBJOPR SVN: r31 - in trunk/core/src/main: java/org/jboss/on/embedded/bean/history/content and 8 other directories.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2008-11-04 10:53:35 -0500 (Tue, 04 Nov 2008)
New Revision: 31
Added:
trunk/core/src/main/java/org/jboss/on/embedded/EmbeddedInventoryEventListener.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/AbstractFileUploadAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java
trunk/core/src/main/java/org/jboss/on/embedded/util/
trunk/core/src/main/java/org/jboss/on/embedded/util/ContentUtility.java
Removed:
trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java
trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/DiscoveryAction.java
trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
trunk/core/src/main/webapp/WEB-INF/pages.xml
trunk/core/src/main/webapp/error.xhtml
trunk/core/src/main/webapp/include/tabMenu.xhtml
trunk/core/src/main/webapp/layout.xhtml
trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml
trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml
trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml
Log:
add support for EAR/WAR update via the Content tab (https://jira.jboss.org/jira/browse/EMBJOPR-22)
Modified: trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/java/org/jboss/on/embedded/BootstrapAction.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -117,6 +117,8 @@
configureMockScenarioLoader();
pluginContainer.initialize();
logLoadedPlugins(pluginContainer);
+ // Add our inventory listener BEFORE initiating Resource discovery.
+ pluginContainer.getInventoryManager().addInventoryEventListener(new EmbeddedInventoryEventListener());
ResourceManager resourceManager = ResourceManagerFactory.resourceManager();
resourceManager.discoverResources();
LOG.info("Done bootstrapping Administration Console.");
Added: trunk/core/src/main/java/org/jboss/on/embedded/EmbeddedInventoryEventListener.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/EmbeddedInventoryEventListener.java (rev 0)
+++ trunk/core/src/main/java/org/jboss/on/embedded/EmbeddedInventoryEventListener.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -0,0 +1,95 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jboss.on.embedded;
+
+import java.util.Set;
+
+import org.jetbrains.annotations.Nullable;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.pc.inventory.InventoryEventListener;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.ResourceCreationDataType;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.clientapi.agent.PluginContainerException;
+
+/**
+ * @author Ian Springer
+ */
+public class EmbeddedInventoryEventListener implements InventoryEventListener
+{
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ public void resourcesAdded(Set<Resource> resources)
+ {
+ for (Resource resource : resources)
+ {
+ ResourceType resourceType = resource.getResourceType();
+ if (isContentBacked(resourceType))
+ {
+ PackageType creationPackageType = getCreationPackageType(resourceType);
+ if (creationPackageType != null)
+ {
+ try
+ {
+ PluginContainer.getInstance().getContentManager().executeResourcePackageDiscoveryImmediately(
+ resource.getId(), creationPackageType.getName());
+ }
+ catch (PluginContainerException e)
+ {
+ log.error("Failed to discover underlying " + creationPackageType.getName() + " package for "
+ + resourceType.getName() + " Resource.", e);
+ }
+ }
+ }
+ }
+ }
+
+ public void resourcesRemoved(Set<Resource> resources)
+ {
+ return;
+ }
+
+ public void resourceActivated(Resource resource)
+ {
+ return;
+ }
+
+ private static boolean isContentBacked(ResourceType resourceType)
+ {
+ return resourceType.isCreatable() && resourceType.getCreationDataType() == ResourceCreationDataType.CONTENT;
+ }
+
+ @Nullable
+ private static PackageType getCreationPackageType(ResourceType resourceType)
+ {
+ Set<PackageType> packageTypes = resourceType.getPackageTypes();
+ for (PackageType packageType : packageTypes)
+ {
+ if (packageType.isCreationData())
+ {
+ return packageType;
+ }
+ }
+ return null;
+ }
+}
Property changes on: trunk/core/src/main/java/org/jboss/on/embedded/EmbeddedInventoryEventListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Author Id Revision HeadURL
Name: svn:eol-style
+ LF
Modified: trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/java/org/jboss/on/embedded/bean/history/content/ContentServerServiceImpl.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -44,7 +44,6 @@
public class ContentServerServiceImpl implements ContentServerService
{
-
private final Log log = LogFactory.getLog(ContentServerServiceImpl.class);
private ContentHistoryManager historyBean;
@@ -76,42 +75,12 @@
public long downloadPackageBitsForChildResource(int parentResourceId, String resourceTypeName, PackageDetailsKey packageDetailsKey, OutputStream outputStream)
{
- log.debug("In downloadPackageBitsForChildResource()");
- long bitSize;
- String fileName = packageDetailsKey.getName();
- File file = new File(fileName);
- InputStream inputStream = null;
- try
- {
- inputStream = new BufferedInputStream(new FileInputStream(file));
- byte[] fileBytes = new byte[(int)file.length()];
- bitSize = inputStream.read(fileBytes);
- inputStream.close();
- outputStream.write(fileBytes);
- }
- catch (IOException e)
- {
- log.error("Unable to download package bits for " + resourceTypeName + " child Resource.", e);
- bitSize = -1;
- }
- finally
- {
- if (inputStream != null)
- try
- {
- inputStream.close();
- }
- catch (IOException e)
- {
- log.error("Failed to close input stream.", e);
- }
- }
- return bitSize;
+ return downloadPackageBits(packageDetailsKey, outputStream);
}
public long downloadPackageBitsGivenResource(int resourceId, PackageDetailsKey packageDetailsKey, OutputStream outputStream)
{
- return 0;
+ return downloadPackageBits(packageDetailsKey, outputStream);
}
public long downloadPackageBitsRangeGivenResource(int resourceId, PackageDetailsKey packageDetailsKey, OutputStream outputStream, long startByte, long endByte)
@@ -155,4 +124,37 @@
{
historyBean.addContentHistory(report);
}
+
+ private long downloadPackageBits(PackageDetailsKey packageDetailsKey, OutputStream outputStream) {
+ log.debug("Downloading package bits for " + packageDetailsKey + "...");
+ long bitSize;
+ String fileName = packageDetailsKey.getName();
+ File file = new File(fileName);
+ InputStream inputStream = null;
+ try
+ {
+ inputStream = new BufferedInputStream(new FileInputStream(file));
+ byte[] fileBytes = new byte[(int)file.length()];
+ bitSize = inputStream.read(fileBytes);
+ inputStream.close();
+ outputStream.write(fileBytes);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Unable to download package bits for " + "" + " child Resource.", e);
+ }
+ finally
+ {
+ if (inputStream != null)
+ try
+ {
+ inputStream.close();
+ }
+ catch (IOException e)
+ {
+ log.error("Failed to close input stream.", e);
+ }
+ }
+ return bitSize;
+ }
}
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/DiscoveryAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/DiscoveryAction.java 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/DiscoveryAction.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -34,7 +34,7 @@
*
* @author Charles Crouch
*/
-// Make this application scoped so each user doesn't trigger their own discovery
+// Make this application-scoped so each user doesn't trigger their own discovery.
@Scope(ScopeType.APPLICATION)
@Name("discoveryAction")
public class DiscoveryAction {
@@ -73,7 +73,6 @@
private void doAutodiscovery() {
log.debug("DiscoveryAction doAutodiscovery");
-
ResourceManagerFactory.resourceManager().discoverServicesAsync();
- }
+ }
}
Added: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/AbstractFileUploadAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/AbstractFileUploadAction.java (rev 0)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/AbstractFileUploadAction.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -0,0 +1,117 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jboss.on.embedded.ui.content;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileOutputStream;
+
+import javax.faces.application.FacesMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.faces.FacesMessages;
+
+import org.jboss.on.embedded.ui.NavigationAction;
+import org.jboss.on.embedded.BootstrapAction;
+
+/**
+ * @author Ian Springer
+ */
+public abstract class AbstractFileUploadAction {
+ protected static final String SUCCESS_OUTCOME = "success";
+ protected static final String FAILURE_OUTCOME = "failure";
+
+ protected static final String PACKAGE_ARCHITECTURE = "no-arch";
+
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ private String fileName;
+ private byte[] file;
+ private String fileContentType;
+
+ /**
+ * FacesMessages is a Seam Component that will handle the success/fail messages across a page redirect.
+ */
+ @In
+ protected transient FacesMessages facesMessages;
+
+ @In
+ protected NavigationAction navigationAction;
+
+ @In
+ private BootstrapAction bootstrapAction;
+
+ protected File writeTempFile()
+ throws IOException
+ {
+ File tempFile;
+ File tempDir = this.bootstrapAction.getTempDir();
+ try {
+
+ tempDir.mkdirs(); // just in case the temp dir got deleted since this webapp was last deployed
+ tempFile = new File(tempDir, this.fileName);
+ log.debug("Writing temp file to " + tempFile + "...");
+ if (tempFile.exists())
+ tempFile.delete();
+ FileOutputStream fos = new FileOutputStream(tempFile);
+ fos.write(this.file);
+ fos.close();
+ }
+ catch (IOException e) {
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
+ "content.resourceInstance.create.unableToCreateTempFile");
+ log.error("Unable to save uploaded file to temp directory " + tempDir + ".", e);
+ throw e;
+ }
+ return tempFile;
+ }
+
+ public String getFileName()
+ {
+ return fileName;
+ }
+
+ public void setFileName(String fileName)
+ {
+ this.fileName = fileName;
+ }
+
+ public byte[] getFile()
+ {
+ return file;
+ }
+
+ public void setFile(byte[] file)
+ {
+ this.file = file;
+ }
+
+ public String getFileContentType()
+ {
+ return fileContentType;
+ }
+
+ public void setFileContentType(String fileContentType)
+ {
+ this.fileContentType = fileContentType;
+ }
+}
Property changes on: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/AbstractFileUploadAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Author Id Revision HeadURL
Name: svn:eol-style
+ LF
Copied: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java (from rev 27, trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java)
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java (rev 0)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/CreateContentBackedResourceAction.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -0,0 +1,148 @@
+/*
+ * Embedded Jopr Project
+ * Copyright (C) 2006-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jboss.on.embedded.ui.content;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.faces.application.FacesMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+
+import org.rhq.core.clientapi.agent.inventory.CreateResourceResponse;
+import org.rhq.core.clientapi.server.plugin.content.ContentSourcePackageDetailsKey;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+
+import org.jboss.on.embedded.manager.ResourceManager;
+import org.jboss.on.embedded.manager.ResourceManagerFactory;
+import org.jboss.on.embedded.ui.nav.JONTreeNode;
+import org.jboss.on.embedded.ui.nav.ResourceTypeTreeNode;
+import org.jboss.on.embedded.util.ContentUtility;
+
+/**
+ * A Seam action for creating a content-backed Resource (e.g. a WAR or an EAR).
+ *
+ * @author Ian Springer
+ */
+@Name("createContentBackedResourceAction")
+(a)Scope(ScopeType.CONVERSATION)
+public class CreateContentBackedResourceAction extends AbstractFileUploadAction {
+ private static final String INITIAL_PACKAGE_VERSION = "1.0";
+
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ private final ResourceManager resourceManager = ResourceManagerFactory.resourceManager();
+
+ @Out
+ private ConfigurationDefinition configurationDefinition;
+
+ @Out
+ private Configuration configuration;
+
+ @Out
+ private ResourceType resourceType;
+
+ private PackageType packageType;
+
+ @Begin(join = true)
+ public String init()
+ {
+ JONTreeNode selectedNode = this.navigationAction.getSelectedNode();
+ ResourceTypeTreeNode resourceTypeTreeNode = (ResourceTypeTreeNode)selectedNode;
+ this.resourceType = resourceTypeTreeNode.getResourceType();
+
+ this.packageType = ContentUtility.getCreationPackageType(this.resourceType);
+ if (this.packageType == null)
+ {
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.resourceTypeHasNoCreationPackageType");
+ return FAILURE_OUTCOME;
+ }
+
+ this.configurationDefinition = this.packageType.getDeploymentConfigurationDefinition();
+ this.configuration = ContentUtility.getDefaultDeploymentConfiguration(this.packageType);
+
+ return SUCCESS_OUTCOME;
+ }
+
+ @End(ifOutcome={"success"})
+ public String createContentBackedResource()
+ {
+ if (getFileName() == null)
+ {
+ // NOTE: This check is necessary, because the "required" attribute of the Seam FileUpload component doesn't
+ // work.
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
+ "content.resourceInstance.create.noFileSelected");
+ return FAILURE_OUTCOME;
+ }
+ log.debug("Creating content-backed " + this.resourceType + " Resource " + getFileName() + "...");
+
+ File tempFile;
+ try
+ {
+ tempFile = writeTempFile();
+ }
+ catch (IOException e)
+ {
+ return FAILURE_OUTCOME;
+ }
+
+ PackageDetailsKey key = new ContentSourcePackageDetailsKey(tempFile.getPath(), INITIAL_PACKAGE_VERSION, this.packageType.getName(),
+ PACKAGE_ARCHITECTURE, this.resourceType.getName(), this.resourceType.getPlugin());
+ ResourcePackageDetails detail = new ResourcePackageDetails(key);
+ detail.setDeploymentTimeConfiguration(this.configuration);
+
+ Configuration pluginConfiguration = null;
+
+ JONTreeNode currentNode = navigationAction.getSelectedNode();
+ Resource ancestorResource = currentNode.getClosestResource();
+
+ final String resourceName = getFileName();
+ CreateResourceResponse createResourceResponse = this.resourceManager.createResource(resourceName,
+ this.resourceType, ancestorResource, pluginConfiguration, detail);
+ switch (createResourceResponse.getStatus())
+ {
+ case SUCCESS:
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "content.resourceInstance.create.success",
+ getFileName());
+ return SUCCESS_OUTCOME;
+ default:
+ String cause = (createResourceResponse.getErrorMessage() != null) ?
+ createResourceResponse.getErrorMessage() : "unknown";
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.failure",
+ getFileName(), cause);
+ return FAILURE_OUTCOME;
+ }
+ }
+}
Deleted: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -1,245 +0,0 @@
-/*
- * Embedded Jopr Project
- * Copyright (C) 2006-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.jboss.on.embedded.ui.content;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Set;
-
-import javax.faces.application.FacesMessage;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jetbrains.annotations.Nullable;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.faces.FacesMessages;
-
-import org.rhq.core.clientapi.server.plugin.content.ContentSourcePackageDetailsKey;
-import org.rhq.core.clientapi.agent.inventory.CreateResourceResponse;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.content.PackageDetailsKey;
-import org.rhq.core.domain.content.PackageType;
-import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceType;
-
-import org.jboss.on.embedded.manager.ResourceManager;
-import org.jboss.on.embedded.manager.ResourceManagerFactory;
-import org.jboss.on.embedded.ui.NavigationAction;
-import org.jboss.on.embedded.ui.nav.JONTreeNode;
-import org.jboss.on.embedded.ui.nav.ResourceTypeTreeNode;
-import org.jboss.on.embedded.BootstrapAction;
-
-/**
- * A Seam action for creating a content-backed Resource (e.g. a WAR or an EAR).
- *
- * @author Ian Springer
- */
-@Name("resourceTypeContentAction")
-(a)Scope(ScopeType.CONVERSATION)
-public class ResourceTypeContentAction
-{
- private static final String SUCCESS_OUTCOME = "success";
- private static final String FAILURE_OUTCOME = "failure";
-
- private final Log log = LogFactory.getLog(ResourceTypeContentAction.class);
-
- private final ResourceManager resourceManager = ResourceManagerFactory.resourceManager();
-
- private String fileName;
-
- private byte[] file;
-
- private String fileContentType;
-
- @Out
- private ConfigurationDefinition configurationDefinition;
-
- @Out
- private Configuration configuration;
-
- @In
- NavigationAction navigationAction;
-
- @In
- BootstrapAction bootstrapAction;
-
- /**
- * facesMessages is a Seam Component that will handle the success/fail messages across a page redirect
- */
- @In
- private transient FacesMessages facesMessages;
-
- @RequestParameter
- String selectedResourceTypeName;
-
- private ResourceType resourceType;
-
- private PackageType packageType;
-
- @Begin(join = true)
- public String init()
- {
- ResourceTypeTreeNode resourceTypeTreeNode = (ResourceTypeTreeNode)this.navigationAction.getSelectedNode();
- this.resourceType = resourceTypeTreeNode.getResourceType();
- this.packageType = getCreationPackageType(this.resourceType);
- if (this.packageType == null)
- {
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.resourceTypeHasNoCreationPackageType");
- return FAILURE_OUTCOME;
- }
- this.configurationDefinition = this.packageType.getDeploymentConfigurationDefinition();
- if (this.configurationDefinition != null)
- {
- if (this.configurationDefinition.getDefaultTemplate() != null)
- //noinspection ConstantConditions
- this.configuration = this.configurationDefinition.getDefaultTemplate().getConfiguration();
- else
- this.configuration = new Configuration();
- }
- return SUCCESS_OUTCOME;
- }
-
- @End(ifOutcome={"success"})
- public String createContentBackedResource()
- {
- if (this.fileName == null)
- {
- // NOTE: This check is necessary, because the "required" attribute of the Seam FileUpload component doesn't
- // work.
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
- "content.resourceInstance.create.noFileSelected");
- return FAILURE_OUTCOME;
- }
- log.debug("Creating content-backed " + this.resourceType + " Resource " + this.fileName + "...");
- File tempDir = this.bootstrapAction.getTempDir();
- tempDir.mkdirs(); // just in case the temp dir got deleted since this webapp was last deployed
-
- File tempFile;
- try
- {
- tempFile = writeTempFile(tempDir);
- }
- catch (IOException e)
- {
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
- "content.resourceInstance.create.unableToCreateTempFile");
- log.error("Unable to save uploaded file to temp directory " + tempDir + ".", e);
- return FAILURE_OUTCOME;
- }
-
- final String version = "1.0";
- final String architectureName = "no-arch";
-
- PackageDetailsKey key = new ContentSourcePackageDetailsKey(tempFile.getPath(), version, this.packageType.getName(),
- architectureName, this.resourceType.getName(), this.resourceType.getPlugin());
- ResourcePackageDetails detail = new ResourcePackageDetails(key);
- detail.setDeploymentTimeConfiguration(this.configuration);
-
- Configuration pluginConfiguration = null;
-
- JONTreeNode currentNode = navigationAction.getSelectedNode();
- Resource ancestorResource = currentNode.getClosestResource();
-
- final String resourceName = this.fileName;
- CreateResourceResponse createResourceResponse = this.resourceManager.createResource(resourceName,
- this.resourceType, ancestorResource, pluginConfiguration, detail);
- switch (createResourceResponse.getStatus())
- {
- case SUCCESS:
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "content.resourceInstance.create.success",
- this.fileName);
- return SUCCESS_OUTCOME;
- default:
- String cause = (createResourceResponse.getErrorMessage() != null) ?
- createResourceResponse.getErrorMessage() : "unknown";
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.failure",
- this.fileName, cause);
- return FAILURE_OUTCOME;
- }
- }
-
- private File writeTempFile(File tempDir)
- throws IOException
- {
- File tempFile = new File(tempDir, this.fileName);
- log.debug("Writing temp file to " + tempFile + "...");
- if (tempFile.exists())
- tempFile.delete();
- FileOutputStream fos = new FileOutputStream(tempFile);
- fos.write(this.file);
- fos.close();
- return tempFile;
- }
-
- @Nullable
- private static PackageType getCreationPackageType(ResourceType resourceType)
- {
- Set<PackageType> packageTypes = resourceType.getPackageTypes();
- for (PackageType packageType : packageTypes)
- {
- if (packageType.isCreationData())
- {
- return packageType;
- }
- }
- return null;
- }
-
- public String getFileName()
- {
- return fileName;
- }
-
- public void setFileName(String fileName)
- {
- this.fileName = fileName;
- }
-
- public byte[] getFile()
- {
- return file;
- }
-
- public void setFile(byte[] file)
- {
- this.file = file;
- }
-
- public String getFileContentType()
- {
- return fileContentType;
- }
-
- public void setFileContentType(String fileContentType)
- {
- this.fileContentType = fileContentType;
- }
-}
Copied: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java (from rev 27, trunk/core/src/main/java/org/jboss/on/embedded/ui/content/ResourceTypeContentAction.java)
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java (rev 0)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -0,0 +1,170 @@
+/*
+ * Embedded Jopr Project
+ * Copyright (C) 2006-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jboss.on.embedded.ui.content;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.faces.application.FacesMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+
+import org.rhq.core.clientapi.agent.PluginContainerException;
+import org.rhq.core.clientapi.server.plugin.content.ContentSourcePackageDetailsKey;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.ContentDiscoveryReport;
+import org.rhq.core.domain.content.transfer.DeployPackagesRequest;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.content.ContentManager;
+
+import org.jboss.on.embedded.ui.nav.JONTreeNode;
+import org.jboss.on.embedded.ui.nav.ResourceTreeNode;
+import org.jboss.on.embedded.util.ContentUtility;
+
+/**
+ * A Seam action for updating the file backing a content-backed Resource (e.g. a WAR or an EAR).
+ *
+ * @author Ian Springer
+ */
+@Name("updateBackingContentAction")
+(a)Scope(ScopeType.CONVERSATION)
+public class UpdateBackingContentAction extends AbstractFileUploadAction {
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ @Out
+ private ResourceType resourceType;
+
+ @Out
+ private Resource resource;
+
+ @Out
+ private PackageType packageType;
+
+ @Out
+ private ResourcePackageDetails packageDetails;
+
+ @Begin(join = true)
+ public String init()
+ {
+ JONTreeNode selectedNode = this.navigationAction.getSelectedNode();
+ ResourceTreeNode resourceTreeNode = (ResourceTreeNode)selectedNode;
+ this.resource = resourceTreeNode.getResource();
+ this.resourceType = resource.getResourceType();
+
+ this.packageType = ContentUtility.getCreationPackageType(this.resourceType);
+ if (this.packageType == null)
+ {
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "content.resourceInstance.create.resourceTypeHasNoCreationPackageType");
+ return FAILURE_OUTCOME;
+ }
+
+ try {
+ this.packageDetails = getBackingPackage();
+ }
+ catch (Exception e) {
+ facesMessages.add(FacesMessage.SEVERITY_ERROR, e.getLocalizedMessage());
+ return FAILURE_OUTCOME;
+ }
+
+ return SUCCESS_OUTCOME;
+ }
+
+ @End(ifOutcome={"success"})
+ public String updateBackingContent() {
+ if (getFileName() == null) {
+ // NOTE: This check is necessary, because the "required" attribute of the Seam FileUpload component doesn't
+ // work.
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR,
+ "content.resourceInstance.create.noFileSelected");
+ return FAILURE_OUTCOME;
+ }
+ if (!getFileName().equals(this.packageDetails.getFileName())) {
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_WARN,
+ "content.resourceInstance.update.wrongFileName", this.packageType.getDisplayName(),
+ this.packageDetails.getFileName());
+ return FAILURE_OUTCOME;
+ }
+ log.debug("Updating content-backed " + this.resourceType + " Resource " + getFileName() + "...");
+
+ File tempFile;
+ try
+ {
+ tempFile = writeTempFile();
+ }
+ catch (IOException e)
+ {
+ return FAILURE_OUTCOME;
+ }
+
+ // TODO: Allow user to specify version?
+ String version = String.valueOf(System.currentTimeMillis());
+ PackageDetailsKey key = new ContentSourcePackageDetailsKey(tempFile.getPath(), version, this.packageType.getName(),
+ PACKAGE_ARCHITECTURE, this.resourceType.getName(), this.resourceType.getPlugin());
+ ResourcePackageDetails detail = new ResourcePackageDetails(key);
+ //detail.setDeploymentTimeConfiguration(this.packageDetails.getDeploymentTimeConfiguration());
+
+ Set<ResourcePackageDetails> packageDetails = new HashSet<ResourcePackageDetails>();
+ packageDetails.add(detail);
+ DeployPackagesRequest deployPackagesRequest = new DeployPackagesRequest(1, this.resource.getId(), packageDetails);
+
+ ContentManager contentManager = PluginContainer.getInstance().getContentManager();
+ try {
+ contentManager.deployPackagesImmediately(deployPackagesRequest);
+ }
+ catch (PluginContainerException e) {
+ facesMessages.add(FacesMessage.SEVERITY_ERROR, e.getLocalizedMessage());
+ return FAILURE_OUTCOME;
+ }
+
+ facesMessages.add(FacesMessage.SEVERITY_INFO, "{0} {1} updated.", this.packageType.getDisplayName(),
+ this.packageDetails.getFileName());
+ return SUCCESS_OUTCOME;
+ }
+
+ public ResourcePackageDetails getBackingPackage() throws Exception {
+ ContentDiscoveryReport report = null;
+ try {
+ report = PluginContainer.getInstance().getContentManager().executeResourcePackageDiscoveryImmediately(
+ this.resource.getId(), this.packageType.getName());
+ if (report.getDeployedPackages().size() != 1) {
+ throw new Exception("ContentManager.executeResourcePackageDiscoveryImmediately() returned more than one package.");
+ }
+ }
+ catch (PluginContainerException e) {
+ log.error("Failed to discover underlying " + this.packageType.getName() + " package for "
+ + this.resourceType.getName() + " Resource.", e);
+ }
+ return report.getDeployedPackages().iterator().next();
+ }
+}
\ No newline at end of file
Property changes on: trunk/core/src/main/java/org/jboss/on/embedded/ui/content/UpdateBackingContentAction.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added: trunk/core/src/main/java/org/jboss/on/embedded/util/ContentUtility.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/util/ContentUtility.java (rev 0)
+++ trunk/core/src/main/java/org/jboss/on/embedded/util/ContentUtility.java 2008-11-04 15:53:35 UTC (rev 31)
@@ -0,0 +1,73 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.jboss.on.embedded.util;
+
+import java.util.Set;
+
+import org.jetbrains.annotations.Nullable;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.ResourceCreationDataType;
+
+/**
+ * @author Ian Springer
+ */
+public abstract class ContentUtility
+{
+ private ContentUtility()
+ {
+ }
+
+ public static boolean isContentBacked(ResourceType resourceType)
+ {
+ return resourceType.isCreatable() && resourceType.getCreationDataType() == ResourceCreationDataType.CONTENT;
+ }
+
+ @Nullable
+ public static PackageType getCreationPackageType(ResourceType resourceType)
+ {
+ Set<PackageType> packageTypes = resourceType.getPackageTypes();
+ for (PackageType packageType : packageTypes)
+ {
+ if (packageType.isCreationData())
+ {
+ return packageType;
+ }
+ }
+ return null;
+ }
+
+ @Nullable
+ public static Configuration getDefaultDeploymentConfiguration(PackageType packageType){
+ ConfigurationDefinition configurationDefinition = packageType.getDeploymentConfigurationDefinition();
+ Configuration configuration = null;
+ if (configurationDefinition != null)
+ {
+ if (configurationDefinition.getDefaultTemplate() != null)
+ //noinspection ConstantConditions
+ configuration = configurationDefinition.getDefaultTemplate().getConfiguration();
+ else
+ configuration = new Configuration();
+ }
+ return configuration;
+ }
+}
Property changes on: trunk/core/src/main/java/org/jboss/on/embedded/util/ContentUtility.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Author Id Revision HeadURL
Name: svn:eol-style
+ LF
Modified: trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-11-04 15:53:35 UTC (rev 31)
@@ -74,6 +74,8 @@
resource.add.button.save=Save
resource.add.button.cancel=Cancel
+resource.content.button.update=Update
+
component.dataPaginator.firstpage=First
component.dataPaginator.lastpage=Last
component.dataPaginator.previouspage=Prev
@@ -150,13 +152,16 @@
content.resourceInstance.version=Version
#Messages for resourceContentCreate.xhtml
-content.resourceInstance.create=Enter the filename you wish to deploy:
+content.resourceInstance.create=Enter the absolute path to the local file you wish to deploy, specify deployment options, then click Continue.
content.resourceInstance.create.noFileSelected=Please enter a file to upload.
content.resourceInstance.create.resourceTypeHasNoCreationPackageType=Unable to create resources of this type. The resource type does not define a creation package type.
content.resourceInstance.create.unableToCreateTempFile=Unable to create temp file from file upload.
content.resourceInstance.create.success=Resource {0} created successfully!
content.resourceInstance.create.failure=Failed to create Resource {0} - cause: {1}
+#Messages for resourceInstanceContent.xhtml
+content.resourceInstance.update.wrongFileName=The specified file must have the same name as the existing deployed {0} ({1}).
+
exception.heading=Internal Error
exception.paragraph1=The application has encountered an error.
exception.paragraph2a=Please return to the
Modified: trunk/core/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/pages.xml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/WEB-INF/pages.xml 2008-11-04 15:53:35 UTC (rev 31)
@@ -70,7 +70,7 @@
</page>
<page view-id="/secure/resourceTypeSummary.xhtml">
- <navigation from-action="#{resourceTypeContentAction.init()}">
+ <navigation from-action="#{createContentBackedResourceAction.init()}">
<rule if-outcome="success">
<redirect view-id="/secure/resourceContentCreate.xhtml"/>
</rule>
@@ -159,17 +159,6 @@
</navigation>
</page>
- <page view-id="/secure/viewContent.xhtml">
- <param name="path" value="#{navigationAction.currentPath}"/>
-
- <!-- run this method before rendering the page-->
- <action execute="#{contentDisplayAction.getContent()}"/>
-
- <navigation from-action="#{contentDisplayAction.getContent()}">
- <render view-id="/secure/resourceInstanceContent.xhtml"/>
- </navigation>
- </page>
-
<page view-id="/secure/resourceInstanceMetrics.xhtml">
<param name="path" value="#{navigationAction.currentPath}"/>
@@ -181,6 +170,11 @@
</navigation>
</page>
+ <page view-id="/secure/resourceInstanceContent.xhtml">
+ <!-- Run this method before rendering the page. -->
+ <action execute="#{updateBackingContentAction.init()}"/>
+ </page>
+
<page view-id="*">
<action execute="#{debugAction.init()}"/>
<action execute="#{discoveryAction.checkAutodiscovery()}"/>
Modified: trunk/core/src/main/webapp/error.xhtml
===================================================================
--- trunk/core/src/main/webapp/error.xhtml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/error.xhtml 2008-11-04 15:53:35 UTC (rev 31)
@@ -32,7 +32,7 @@
<div id="errorbox">
<h1>#{messages['exception.heading']}</h1>
<p>#{messages['exception.paragraph1']}</p>
- <p>#{messages['exception.paragraph2a']} <a href="index.xhtml">#{messages['exception.paragraph2b']}</a> #{messages['exception.paragraph2c']}</p>
+ <p>#{messages['exception.paragraph2a']} <a href="index.html">#{messages['exception.paragraph2b']}</a> #{messages['exception.paragraph2c']}</p>
<h3 style="padding-top: 12px; border-bottom: 1px solid #e6eaef;">Error details:</h3>
<div id="codebox">
<a4j:repeat value="#{org.jboss.seam.debug.contexts.exceptionCauses}" var="cause" rowKeyVar="rowKey">
Modified: trunk/core/src/main/webapp/include/tabMenu.xhtml
===================================================================
--- trunk/core/src/main/webapp/include/tabMenu.xhtml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/include/tabMenu.xhtml 2008-11-04 15:53:35 UTC (rev 31)
@@ -147,7 +147,7 @@
<h:panelGroup layout="block"
rendered="#{activeTab ne 'content' and navigationAction.enabledTabs.contains('content')}">
<li>
- <s:link styleClass="" view="/secure/viewContent.xhtml" propagation="end">
+ <s:link styleClass="" view="/secure/resourceInstanceContent.xhtml" propagation="end">
#{messages['tab.menu.content']}
</s:link>
</li>
Modified: trunk/core/src/main/webapp/layout.xhtml
===================================================================
--- trunk/core/src/main/webapp/layout.xhtml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/layout.xhtml 2008-11-04 15:53:35 UTC (rev 31)
@@ -1,5 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
~ Embedded Jopr Project
~ Copyright (C) 2006-2008 Red Hat, Inc.
Modified: trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/secure/resourceContentCreate.xhtml 2008-11-04 15:53:35 UTC (rev 31)
@@ -30,7 +30,7 @@
<ui:composition template="/layout.xhtml">
<!-- page title -->
- <ui:define name="pagetitle">#{messages['resource.add.pageTitlePrefix']} #{param.selectedResourceTypeName}</ui:define>
+ <ui:define name="pagetitle">#{messages['resource.add.pageTitlePrefix']} #{resourceType.name}</ui:define>
<!-- body -->
<ui:define name="body">
<div class="notabmenubox">
@@ -41,12 +41,11 @@
<hr/>
<h:form enctype="multipart/form-data">
<h:panelGrid styleClass="formstyle">
- <input type="hidden" name="selectedResourceTypeName" value="#{param.selectedResourceTypeName}"/>
<s:fileUpload id="file"
- data="#{resourceTypeContentAction.file}"
- fileName="#{resourceTypeContentAction.fileName}"
+ data="#{createContentBackedResourceAction.file}"
+ fileName="#{createContentBackedResourceAction.fileName}"
accept="application/zip,application/war,application/ear,application/jar"
- contentType="#{resourceTypeContentAction.fileContentType}"
+ contentType="#{createContentBackedResourceAction.fileContentType}"
required="true"/>
<onc:config configurationDefinition="#{configurationDefinition}"
configuration="#{configuration}"
@@ -54,7 +53,7 @@
nullConfigurationMessage="null Configuration!"/>
<h:panelGrid columns="2" cellspacing="9">
<h:commandButton value="#{messages['resource.add.button.continue']}"
- action="#{resourceTypeContentAction.createContentBackedResource()}"
+ action="#{createContentBackedResourceAction.createContentBackedResource()}"
styleClass="buttonmed"/>
<s:button value="#{messages['resource.add.button.cancel']}"
view="/secure/summary.xhtml"
Modified: trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml 2008-11-04 15:53:35 UTC (rev 31)
@@ -32,7 +32,7 @@
<f:view>
<ui:composition template="/layout.xhtml">
- <ui:define name="pagetitle">#{resource.resource.name}</ui:define>
+ <ui:define name="pagetitle">#{resource.name}</ui:define>
<ui:define name="tabmenu">
<ui:include src="/include/tabMenu.xhtml">
@@ -40,50 +40,36 @@
</ui:include>
</ui:define>
+ <!-- body -->
<ui:define name="body">
- <div class="tabmenubox">
+ <div class="notabmenubox">
<ui:include src="../include/displayGlobalMessages.xhtml"/>
-
+ <h:panelGroup layout="block" rendered="#{not empty packageDetails.location}"
+ styleClass="instructionalText">
+ <b>File Path:</b> #{packageDetails.location}
+ </h:panelGroup>
+ <h:panelGroup layout="block" rendered="#{not empty packageDetails.fileSize}"
+ styleClass="instructionalText">
+ <b>File Size:</b> #{packageDetails.fileSize} bytes
+ </h:panelGroup>
+ <hr/>
<div class="instructionalText">
- #{messages['content.resourceInstance.pageDescription']}
+ To update the #{packageType.displayName}, specify a local file path then click Update. Note, the
+ specified file must be named #{packageDetails.fileName}.
</div>
-
- <rich:dataTable
- styleClass="internalTable"
- width="100%"
- id="dataTable"
- rowClasses="oddRow,evenRow"
- columnClasses="rich-table-cell"
- var="content"
- value="#{contentDetails}">
-
- <f:facet name="header">
- <rich:columnGroup>
- <rich:column>#{messages['content.resourceInstance.name']}</rich:column>
- <rich:column>#{messages['content.resourceInstance.architecture']}</rich:column>
- <rich:column>#{messages['content.resourceInstance.packagetype']}</rich:column>
- <rich:column>#{messages['content.resourceInstance.version']}</rich:column>
- </rich:columnGroup>
- </f:facet>
-
- <rich:columnGroup styleClass="">
- <rich:column>
- <h:outputText value="#{content.name}"/>
- </rich:column>
- <rich:column>
- <h:outputText value="#{content.architectureName}"/>
- </rich:column>
- <rich:column>
- <h:outputText value="#{content.packageTypeName}"/>
- </rich:column>
- <rich:column>
- <h:outputText value="#{content.version}"/>
- </rich:column>
- </rich:columnGroup>
- <f:facet name="footer"><h:graphicImage value="images/spacer.gif"/>
- </f:facet>
- </rich:dataTable>
-
+ <h:form enctype="multipart/form-data">
+ <h:panelGrid styleClass="formstyle">
+ <s:fileUpload id="file"
+ data="#{updateBackingContentAction.file}"
+ fileName="#{updateBackingContentAction.fileName}"
+ accept="application/zip,application/war,application/ear,application/jar"
+ contentType="#{updateBackingContentAction.fileContentType}"
+ required="true"/>
+ <h:commandButton value="#{messages['resource.content.button.update']}"
+ action="#{updateBackingContentAction.updateBackingContent()}"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+ </h:form>
</div>
</ui:define>
Modified: trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml 2008-10-31 13:53:01 UTC (rev 30)
+++ trunk/core/src/main/webapp/secure/resourceTypeSummary.xhtml 2008-11-04 15:53:35 UTC (rev 31)
@@ -59,10 +59,8 @@
</s:button>
<s:button rendered="#{resourceType.creationDataType eq 'CONTENT'}"
- action="#{resourceTypeContentAction.init()}"
- value="#{messages['summary.resourceType.addNew']}" styleClass="buttonmed">
- <f:param name="selectedResourceTypeName" value="#{resourceType.name}"/>
- </s:button>
+ action="#{createContentBackedResourceAction.init()}"
+ value="#{messages['summary.resourceType.addNew']}" styleClass="buttonmed"/>
</h:form>
<h:outputLabel rendered="#{!resourceType.creatable}"
value="#{messages['resourcetype.no.action']}"/>
15 years, 6 months