[jboss-svn-commits] JBL Code SVN: r9208 - in labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common: primates and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jan 31 13:01:19 EST 2007
Author: adamw
Date: 2007-01-31 13:01:19 -0500 (Wed, 31 Jan 2007)
New Revision: 9208
Added:
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/primates/
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/primates/PrimateDTO.java
Modified:
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/projects/ProjectsHelper.java
Log:
Labs EJB3 components
Added: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/primates/PrimateDTO.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/primates/PrimateDTO.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/primates/PrimateDTO.java 2007-01-31 18:01:19 UTC (rev 9208)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.forge.common.ejb3.primates;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+import java.util.Set;
+
+import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
+
+/**
+ * @author <a href="mailto:tomasz.szymanski at jboss.com">Tomasz Szymanski</a>
+ * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
+ */
+
+public class PrimateDTO {
+ private Set<String> logins=new HashSet<String>();
+ private String name;
+ private String title;
+ private Set<String> projects=new HashSet<String>();
+ private String mugshot;
+ private String status;
+ private String bio;
+ private String country;
+
+ public String getBio() {
+ return bio;
+ }
+
+ public void setBio(String bio) {
+ this.bio = bio;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ public String getMugshot() {
+ return mugshot;
+ }
+
+ public void setMugshot(String mugshot) {
+ this.mugshot = mugshot;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Set<String> getProjects() {
+ return projects;
+ }
+
+ public void setProjects(Set<String> projects) {
+ this.projects = projects;
+ }
+
+
+ public Set<String> getLogins() {
+ return logins;
+ }
+
+ public void setLogins(Set<String> logins) {
+ this.logins = logins;
+ }
+
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public PrimateDTO(DelegateContext primate) {
+ bio = primate.get("bio");
+ country = primate.get("country");
+ mugshot = primate.get("mugshot");
+ name = primate.get("name");
+ Iterator it = primate.childIterator("projects");
+ while (it!= null && it.hasNext()) {
+ projects.add(((DelegateContext)it.next()).get("project"));
+ }
+ it = primate.childIterator("logins");
+ while (it!= null && it.hasNext()) {
+ logins.add(((DelegateContext)it.next()).get("login"));
+ }
+ status = primate.get("status");
+ title = primate.get("title");
+ }
+
+}
Modified: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/projects/ProjectsHelper.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/projects/ProjectsHelper.java 2007-01-31 17:58:31 UTC (rev 9207)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/projects/ProjectsHelper.java 2007-01-31 18:01:19 UTC (rev 9208)
@@ -32,7 +32,7 @@
import org.jboss.forge.common.ForgeHelper;
import org.jboss.forge.common.projects.permissions.ActionRequestPermissionsChecker;
import org.jboss.forge.common.projects.permissions.RenderRequestPermissionsChecker;
-import org.jboss.forge.ejb3.ProjectsService;
+import org.jboss.forge.common.ejb3.ProjectsService;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanProxyExt;
import org.jboss.mx.util.MBeanServerLocator;
More information about the jboss-svn-commits
mailing list