[jboss-svn-commits] JBL Code SVN: r19551 - in labs/jbosslabs/labs-3.0-build: views/admin and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Apr 14 10:57:43 EDT 2008
Author: wrzep
Date: 2008-04-14 10:57:42 -0400 (Mon, 14 Apr 2008)
New Revision: 19551
Added:
labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/ClearspaceManager.java
Modified:
labs/jbosslabs/labs-3.0-build/pom.xml
labs/jbosslabs/labs-3.0-build/views/admin/pom.xml
labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/project/AcceptProject.java
Log:
clearspace dependences and create space via remote api implementation
Modified: labs/jbosslabs/labs-3.0-build/pom.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/pom.xml 2008-04-14 14:27:28 UTC (rev 19550)
+++ labs/jbosslabs/labs-3.0-build/pom.xml 2008-04-14 14:57:42 UTC (rev 19551)
@@ -89,7 +89,12 @@
<name>sourceforge repo</name>
<url>http://junitee.sourceforge.net/repository</url>
</repository>
- </repositories>
+ <repository>
+ <id>atlassian</id>
+ <name>Atlassioan repo</name>
+ <url>http://repository.atlassian.com/maven2</url>
+ </repository>
+ </repositories>
<dependencies>
<dependency>
<artifactId>log4j</artifactId>
Modified: labs/jbosslabs/labs-3.0-build/views/admin/pom.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/admin/pom.xml 2008-04-14 14:27:28 UTC (rev 19550)
+++ labs/jbosslabs/labs-3.0-build/views/admin/pom.xml 2008-04-14 14:57:42 UTC (rev 19551)
@@ -159,6 +159,77 @@
<version>3.8.1</version>
<scope>test</scope>
</dependency>
+ <!-- Clearsace dependencies -->
+ <dependency>
+ <groupId>com.jivesoftware</groupId>
+ <artifactId>clearspace</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jaxws</artifactId>
+ <version>1.2.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.xfire</groupId>
+ <artifactId>xfire-core</artifactId>
+ <version>1.2.4</version>
+ <exclusions>
+ <!--<exclusion>-->
+ <!--<groupId>jdom</groupId>-->
+ <!--<artifactId>jdom</artifactId>-->
+ <!--</exclusion>-->
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>
+ org.apache.ws.commons</groupId>
+ <artifactId>XmlSchema</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.xfire</groupId>
+ <artifactId>xfire-aegis</artifactId>
+ <version>1.2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.xfire</groupId>
+ <artifactId>xfire-annotations</artifactId>
+ <version>1.2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.xfire</groupId>
+ <artifactId>xfire-java5</artifactId>
+ <version>1.2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.xfire</groupId>
+ <artifactId>xfire-jaxb2</artifactId>
+ <version>1.2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.xfire</groupId>
+ <artifactId>xfire-ws-security</artifactId>
+ <version>1.2.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<!-- Intellij IDEA -->
<dependency>
<groupId>javax.faces</groupId>
Added: labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/ClearspaceManager.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/ClearspaceManager.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/ClearspaceManager.java 2008-04-14 14:57:42 UTC (rev 19551)
@@ -0,0 +1,57 @@
+/*
+* JBoss Labs. http://labs.jboss.com/jbosslabs
+*
+* Copyright © 2008 Red Hat Middleware, LLC. All rights reserved.
+*
+* This copyrighted material is made available to anyone wishing to use,
+* modify, copy, or redistribute it subject to the terms and conditions
+* of the GNU Lesser General Public License, v. 2.1.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+* 02110-1301, USA.
+*
+* Red Hat Author(s): Bob McWhirter, Przemyslaw Dej, Ryszard Kozmik,
+* Tomasz Szymanski, Adam Warski, Pawel Wrzeszcz
+*/
+
+package org.jboss.labs.admin;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.AutoCreate;
+
+import com.jivesoftware.community.webservices.ServiceLocator;
+import com.jivesoftware.community.webservices.DocumentService;
+import com.jivesoftware.community.webservices.CommunityService;
+import com.jivesoftware.community.NameAlreadyExistsException;
+
+import java.io.Serializable;
+
+/**
+ * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ */
+ at Name("clearspaceManager")
+ at AutoCreate
+public class ClearspaceManager implements Serializable {
+
+
+ private static final long serialVersionUID = -5459205655998862680L;
+
+ public void createSpace(String projectId, String name) {
+
+ ServiceLocator locator = new ServiceLocator("http://10.18.66.160:8080/clearspace", "admin", "admin");
+ CommunityService communityService = locator.getCommunityService();
+
+ try {
+ communityService.createCommunity(projectId, name, "description");
+ } catch (NameAlreadyExistsException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ }
+}
\ No newline at end of file
Modified: labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/project/AcceptProject.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/project/AcceptProject.java 2008-04-14 14:27:28 UTC (rev 19550)
+++ labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/project/AcceptProject.java 2008-04-14 14:57:42 UTC (rev 19551)
@@ -24,6 +24,7 @@
package org.jboss.labs.admin.action.project;
import com.google.inject.Inject;
+import org.jboss.labs.admin.ClearspaceManager;
import org.jboss.labs.admin.Mailer;
import org.jboss.labs.admin.Pages;
import org.jboss.labs.core.model.admin.ProjectRequest;
@@ -64,12 +65,13 @@
@In private Mailer mailer;
+ @In private ClearspaceManager clearspaceManager;
+
// Hardcoded inside:
// @StartTask @EndTask(transition = "approve")
// @End
public String accept(ProjectRequest projectRequest) {
- System.out.println("AcceptProject.accept " + projectRequest.getAdminComment());
//entityManager.merge(projectRequest);
try {
@@ -84,6 +86,8 @@
return null;
}
+ clearspaceManager.createSpace(projectRequest.getProjectId(), projectRequest.getName());
+
cleanRequest(projectRequest);
businessProcess.resumeTask(tId);
More information about the jboss-svn-commits
mailing list