From: <jbo...@li...> - 2005-12-07 20:47:50
|
Author: wrzep Date: 2005-12-07 15:47:42 -0500 (Wed, 07 Dec 2005) New Revision: 1728 Added: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/ trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/JiraStatusPlugin.java trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/ResolvedIssuesStatusPlugin.java Removed: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/JiraStatusPlugin.java trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/ResolvedIssuesStatusPlugin.java Modified: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java Log: separate dir for jira plugins http://jira.jboss.com/jira/browse/JBLAB-415 Pawel Modified: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java =================================================================== --- trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java 2005-12-07 20:25:30 UTC (rev 1727) +++ trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/Status.java 2005-12-07 20:47:42 UTC (rev 1728) @@ -90,7 +90,7 @@ private void initPluginElements() { pluginsElements = new HashSet<String>(); - pluginsElements.add(PLUGIN_ID_ELEMENT); //TODO currently id is NOT used!! + pluginsElements.add(PLUGIN_ID_ELEMENT); pluginsElements.add(PLUGIN_NAME_ELEMENT); pluginsElements.add(PLUGIN_CLASS_ELEMENT); pluginsElements.add(PLUGIN_WEIGHT_ELEMENT); Deleted: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/JiraStatusPlugin.java =================================================================== --- trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/JiraStatusPlugin.java 2005-12-07 20:25:30 UTC (rev 1727) +++ trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/JiraStatusPlugin.java 2005-12-07 20:47:42 UTC (rev 1728) @@ -1,96 +0,0 @@ -/* - * 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.status.plugins; - -import java.util.Iterator; -import java.util.Collection; -import java.util.List; - -import org.jboss.forge.common.projects.Projects; - -import com.caucho.hessian.client.HessianProxyFactory; - -import hu.midori.kosmos.protocol.JiraService; -import hu.midori.kosmos.protocol.SvnService; -import hu.midori.kosmos.server.jira.JiraServiceImpl; -import hu.midori.kosmos.model.JiraProject; - -/** -* @author Pawel Wrzeszcz -*/ - -public abstract class JiraStatusPlugin extends StatusPlugin { - - public JiraStatusPlugin() { - super(); - } - - protected Collection<JiraProject> getJiraProjects() { - //Get the projects from kosmo server - - Collection<JiraProject> jiraProjects = null; - - System.out.println("KOSMOS 00"); - JiraService service = null; - - HessianProxyFactory factory = new HessianProxyFactory(); - - String serviceUrl = "http://localhost:8080/kosmos-server/kosmos-services/jira-service"; - - - try { - - System.out.println("KOSMOS 01"); - service = (JiraService) factory.create(JiraService.class, serviceUrl); - if (service != null) { - System.out.println("KOSMOS service: " + service.toString()); - } else { - System.out.println("KOSMOS service == null"); - } - /* - System.out.println("***\nKOSMOS atlassian\n***"); - jiraProjects = service.getProjects("http://jira.atlassian.com"); - - - System.out.println("***\nKOSMOS jboss\n***"); - jiraProjects = service.getProjects("http://jira.jboss.com"); - */ - - System.out.println("***\nKOSMOS jblab\n***"); - jiraProjects = service.getProjects("http://jira.jboss.com/jira/browse/JBLAB"); - - System.out.println("class: " + service.getProjects("http://jira.jboss.com/jira/browse/JBLAB").getClass()); - System.out.println("KOSMOS FF"); - - for (JiraProject project : jiraProjects) { - - System.out.println("project " + project.getName() + " / " + project.getKey()); - } - } catch (Exception e) { - e.printStackTrace(); - } - - return jiraProjects; - } - -} Deleted: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/ResolvedIssuesStatusPlugin.java =================================================================== --- trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/ResolvedIssuesStatusPlugin.java 2005-12-07 20:25:30 UTC (rev 1727) +++ trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/ResolvedIssuesStatusPlugin.java 2005-12-07 20:47:42 UTC (rev 1728) @@ -1,44 +0,0 @@ -/* - * 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.status.plugins; - -/** -* @author Pawel Wrzeszcz -*/ - -public class ResolvedIssuesStatusPlugin extends JiraStatusPlugin { - - protected static String PLUGIN_NAME = "Resolved issues"; - protected static String PLUGIN_ID = "resoved"; - - public String getId() { return PLUGIN_ID; }; - public String getName() { return PLUGIN_NAME; }; - - public ResolvedIssuesStatusPlugin() { - super(); - getJiraProjects(); - } - - public int getValue(String projectId) { return 0;} ; - -} \ No newline at end of file Copied: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/JiraStatusPlugin.java (from rev 1726, trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/JiraStatusPlugin.java) =================================================================== --- trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/JiraStatusPlugin.java 2005-12-07 18:53:45 UTC (rev 1726) +++ trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/JiraStatusPlugin.java 2005-12-07 20:47:42 UTC (rev 1728) @@ -0,0 +1,97 @@ +/* + * 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.status.plugins.jira; + +import java.util.Iterator; +import java.util.Collection; +import java.util.List; + +import org.jboss.forge.common.projects.Projects; +import org.jboss.forge.status.plugins.StatusPlugin; + +import com.caucho.hessian.client.HessianProxyFactory; + +import hu.midori.kosmos.protocol.JiraService; +import hu.midori.kosmos.protocol.SvnService; +import hu.midori.kosmos.server.jira.JiraServiceImpl; +import hu.midori.kosmos.model.JiraProject; + +/** +* @author Pawel Wrzeszcz +*/ + +public abstract class JiraStatusPlugin extends StatusPlugin { + + public JiraStatusPlugin() { + super(); + } + + protected Collection<JiraProject> getJiraProjects() { + //Get the projects from kosmo server + + Collection<JiraProject> jiraProjects = null; + + System.out.println("KOSMOS 00"); + JiraService service = null; + + HessianProxyFactory factory = new HessianProxyFactory(); + + String serviceUrl = "http://localhost:8080/kosmos-server/kosmos-services/jira-service"; + + + try { + + System.out.println("KOSMOS 01"); + service = (JiraService) factory.create(JiraService.class, serviceUrl); + if (service != null) { + System.out.println("KOSMOS service: " + service.toString()); + } else { + System.out.println("KOSMOS service == null"); + } + /* + System.out.println("***\nKOSMOS atlassian\n***"); + jiraProjects = service.getProjects("http://jira.atlassian.com"); + + + System.out.println("***\nKOSMOS jboss\n***"); + jiraProjects = service.getProjects("http://jira.jboss.com"); + */ + + System.out.println("***\nKOSMOS jblab\n***"); + jiraProjects = service.getProjects("http://jira.jboss.com/jira/browse/JBLAB"); + + System.out.println("class: " + service.getProjects("http://jira.jboss.com/jira/browse/JBLAB").getClass()); + System.out.println("KOSMOS FF"); + + for (JiraProject project : jiraProjects) { + + System.out.println("project " + project.getName() + " / " + project.getKey()); + } + } catch (Exception e) { + e.printStackTrace(); + } + + return jiraProjects; + } + +} Copied: trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/ResolvedIssuesStatusPlugin.java (from rev 1726, trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/ResolvedIssuesStatusPlugin.java) =================================================================== --- trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/ResolvedIssuesStatusPlugin.java 2005-12-07 18:53:45 UTC (rev 1726) +++ trunk/forge/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/jira/ResolvedIssuesStatusPlugin.java 2005-12-07 20:47:42 UTC (rev 1728) @@ -0,0 +1,44 @@ +/* + * 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.status.plugins.jira; + +/** +* @author Pawel Wrzeszcz +*/ + +public class ResolvedIssuesStatusPlugin extends JiraStatusPlugin { + + protected static String PLUGIN_NAME = "Resolved issues"; + protected static String PLUGIN_ID = "resoved"; + + public String getId() { return PLUGIN_ID; }; + public String getName() { return PLUGIN_NAME; }; + + public ResolvedIssuesStatusPlugin() { + super(); + getJiraProjects(); + } + + public int getValue(String projectId) { return 0;} ; + +} \ No newline at end of file |