[jboss-svn-commits] JBL Code SVN: r9210 - in labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common: ejb3 and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jan 31 13:03:23 EST 2007
Author: adamw
Date: 2007-01-31 13:03:23 -0500 (Wed, 31 Jan 2007)
New Revision: 9210
Added:
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/LabsServices.java
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PrimatesService.java
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectPagesService.java
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectsService.java
labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PropertyService.java
Log:
Labs EJB3 components
Added: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/LabsServices.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/LabsServices.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/LabsServices.java 2007-01-31 18:03:23 UTC (rev 9210)
@@ -0,0 +1,55 @@
+/*
+* 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;
+
+import javax.management.MalformedObjectNameException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.forge.common.ejb3.PropertyService;
+import org.jboss.forge.common.ejb3.PrimatesService;
+import org.jboss.forge.common.ejb3.ProjectsService;
+import org.jboss.mx.util.MBeanProxyExt;
+import org.jboss.mx.util.MBeanServerLocator;
+
+/**
+ * @author <a href="mailto:tomasz.szymanski at jboss.com">Tomasz Szymanski</a>
+ * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
+ * @author <a href="mailto:adamw at aster.pl">Adam Warski</a>
+ */
+
+public class LabsServices {
+ public static PrimatesService getPrimatesService() throws MalformedObjectNameException {
+ return (PrimatesService) MBeanProxyExt.create(PrimatesService.class,
+ PrimatesService.PRIMATES_SERVICE, MBeanServerLocator.locate());
+ }
+
+ public static PropertyService getPropertyService() throws NamingException {
+ return (PropertyService)(new InitialContext()).lookup(PropertyService.PROPERTY_SERVICE);
+ }
+
+ public static ProjectsService getProjectsService() throws MalformedObjectNameException {
+ return (ProjectsService) MBeanProxyExt.create(ProjectsService.class,
+ ProjectsService.PROJECTS_SERVICE, MBeanServerLocator.locate());
+ }
+}
Added: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PrimatesService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PrimatesService.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PrimatesService.java 2007-01-31 18:03:23 UTC (rev 9210)
@@ -0,0 +1,49 @@
+ /*
+ * 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;
+
+import org.jboss.portal.identity.User;
+
+ /**
+ * @author <a href="mailto:tomasz.szymanski at jboss.com">Tomasz Szymanski</a>
+ */
+
+public interface PrimatesService {
+
+ public static final String PRIMATES_SERVICE = "labs:service=primates";
+
+ public PrimateDTO getPrimate(String name, String lastName, String portalName);
+
+ public PrimateDTO getPrimate(String nickname, String portalName);
+
+ public User getUser(String username);
+
+ void create() throws Exception;
+
+ void start() throws Exception;
+
+ void stop();
+
+ void destroy();
+
+}
Added: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectPagesService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectPagesService.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectPagesService.java 2007-01-31 18:03:23 UTC (rev 9210)
@@ -0,0 +1,8 @@
+package org.jboss.forge.common.ejb3;
+
+/**
+ * @author <a href="mailto:adamw at aster.pl">Adam Warski</a>
+ */
+public interface ProjectPagesService {
+ public static final String PROJECT_PAGES_SERVICE = "labs:service=projectpages";
+}
Added: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectsService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectsService.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/ProjectsService.java 2007-01-31 18:03:23 UTC (rev 9210)
@@ -0,0 +1,132 @@
+ /*
+ * 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;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.jboss.forge.common.projects.project.BuildResult;
+import org.jboss.forge.common.projects.project.Developers;
+import org.jboss.forge.common.projects.project.Documentation;
+import org.jboss.forge.common.projects.project.Downloads;
+import org.jboss.forge.common.projects.project.Forum;
+import org.jboss.forge.common.projects.project.IssueTracker;
+import org.jboss.forge.common.projects.project.Menu;
+import org.jboss.forge.common.projects.project.Polls;
+import org.jboss.forge.common.projects.project.Project;
+import org.jboss.forge.common.projects.project.RepoMonitor;
+import org.jboss.forge.common.projects.project.Repository;
+import org.jboss.forge.common.projects.project.SupportService;
+
+/**
+ * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
+ * @author <a href="mailto:adamw at aster.pl">Adam Warski</a>
+ */
+public interface ProjectsService {
+
+ public static final String PROJECTS_SERVICE = "labs:service=projects";
+
+ public Collection<Project> getProjects();
+
+ public Collection<String> getProjectsIds();
+
+ public Project getProjectByName (String projectId);
+
+ public Polls getProjectPolls (String projectId);
+
+ public Downloads getProjectDownloads (String projectId);
+
+ public Menu getProjectMenu (String projectId);
+
+ public Developers getProjectDevelopers (String projectId);
+
+ public List<String> getProjectJems (String projectId);
+
+ public List<Repository> getProjectRepositories (String projectId);
+
+ public List<RepoMonitor> getProjectRepoMonitors (String projectId);
+
+ public List<IssueTracker> getProjectIssueTrackers (String projectId);
+
+ public List<BuildResult> getProjectBuildresults (String projectId);
+
+ public List<SupportService> getProjectSupportServices (String projectId);
+
+ public List<Forum> getProjectForums (String projectId);
+
+ public List<Documentation> getProjectDocumentation (String projectId);
+
+ public long getOverallDownloadsForProject(String projectId, String portalName);
+
+ public boolean getPackagedForDownload(String projectId);
+
+ /**
+ * Gets a unique stamp of the current version of projects; this should change
+ * on a change in descriptor files.
+ * @return A stamp of the current version of projects configuration.
+ */
+ public long getStamp();
+
+ /**
+ * This method will overwrite existing project definition in xml file
+ * with a new one generated from data contained in given Project object.
+ * Be aware, data is NOT merged but overwritten!
+ */
+ public void persistProject(Project project);
+
+ /**
+ * This method will overwrite existing project Polls definition in xml file
+ * with a new one generated from data contained in given Polls object.
+ * Be aware, data is NOT merged but overwritten!
+ */
+ public void persistPolls(Polls polls, String projectId);
+
+ /**
+ * This method will overwrite existing project Downloads definition in xml file
+ * with a new one generated from data contained in given Downloads object.
+ * Be aware, data is NOT merged but overwritten!
+ */
+ public void persistDownloads (Downloads downloads, String projectId);
+
+ /**
+ * This method will overwrite existing project Menu definition in xml file
+ * with a new one generated from data contained in given Menu object.
+ * Be aware, data is NOT merged but overwritten!
+ */
+ public void persistMenu (Menu menu, String projectId);
+
+ /**
+ * This method will overwrite existing project Developers definition
+ * in xml file with a new one generated from data contained in given Developers object.
+ * Be aware, data is NOT merged but overwritten!
+ */
+ public void persistDevelopers (Developers developers, String projectId);
+
+
+ // Life cycle methods
+
+ public void start () throws Exception;
+
+ public void stop () throws Exception;
+
+}
Added: labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PropertyService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PropertyService.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions-newprj/forge-common/src/java/org/jboss/forge/common/ejb3/PropertyService.java 2007-01-31 18:03:23 UTC (rev 9210)
@@ -0,0 +1,11 @@
+package org.jboss.forge.common.ejb3;
+
+public interface PropertyService {
+ public static final String PROPERTY_SERVICE = "PropertyServiceBean/local";
+
+ public void setProperty(String id, String key, String value);
+
+ public String getProperty(String id, String key);
+
+ public void removeProperty(String id, String key);
+}
More information about the jboss-svn-commits
mailing list