ejtools-cvs Mailing List for EJTools (Page 7)
Brought to you by:
letiemble
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(471) |
May
(303) |
Jun
(176) |
Jul
(67) |
Aug
(64) |
Sep
(84) |
Oct
(148) |
Nov
(57) |
Dec
(272) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(356) |
Feb
(304) |
Mar
(214) |
Apr
(22) |
May
(7) |
Jun
(25) |
Jul
|
Aug
(5) |
Sep
(106) |
Oct
|
Nov
(95) |
Dec
(193) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: <let...@us...> - 2003-12-14 09:46:38
|
Update of /cvsroot/ejtools/xdocs/stylesheets In directory sc8-pr-cvs1:/tmp/cvs-serv2776/stylesheets Modified Files: site.jsl Log Message: More fun on the website : - sublink for library - download page - correct links Index: site.jsl =================================================================== RCS file: /cvsroot/ejtools/xdocs/stylesheets/site.jsl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** site.jsl 15 Sep 2003 21:17:24 -0000 1.4 --- site.jsl 13 Dec 2003 20:54:07 -0000 1.5 *************** *** 152,160 **** <div> <small> - <a href="${relativePath}/index.html">Front Page</a> - </small> - </div> - <div> - <small> <a href="${relativePath}/project-info.html">Project Info</a> </small> --- 152,155 ---- *************** *** 194,233 **** </j:forEach> </div> - <div> - <small> - <a href="${relativePath}/maven-reports.html">Project Reports</a> - </small> - <!-- - Check to see if we need to include the report - links in this document. The only time we - need to do this is when the current document - either the maven-reports.xml doc (the page - is displayed when clicking on Project - Reports) or when the current document is one - of the actual reports (in which case we want - to leave the project report links expanded. - --> - <j:set var="includeReportLinks" value="false"/> - <j:forEach var="report" items="${reports}"> - <j:set var="linkWithXmlExt" value="${report.link}.xml"/> - <j:if test="${relativePath == '.' and (fileName.endsWith('maven-reports.xml') or fileName.endsWith(linkWithXmlExt))}"> - <j:set var="includeReportLinks" value="true"/> - </j:if> - </j:forEach> - <!-- - If we need to include the report links, then - do so. This is determined by the above - block. - --> - <j:if test="${includeReportLinks == 'true'}"> - <j:forEach var="report" items="${reports}"> - <div> - <small> - <a href="${relativePath}/${report.link}.html">${report.name}</a> - </small> - </div> - </j:forEach> - </j:if> - </div> <j:if test="${pom.reports.isEmpty()}"> <j:if test="${sourcesPresent}"> --- 189,192 ---- *************** *** 251,254 **** --- 210,214 ---- </j:if> </j:if> + <!-- Skip it <j:set var="devProcess" value="false"/> <util:available file="${maven.docs.src}/development-process.xml"> *************** *** 270,275 **** --- 230,242 ---- </div> </j:if> + --> </div> </j:if> + <div style="margin-top: 20px; width: 100%; text-align: center;"> + <a href="http://sourceforge.net/" title="SourceForge"> + <img src="http://sourceforge.net/sflogo.php?group_id=49088&type=1" border="0" alt="SourceForge Logo"/> + </a> + </div> + <!-- <j:set var="poweredbyimage">${maven.xdoc.poweredby.image}</j:set> <j:set var="poweredbytitle">${maven.xdoc.poweredby.title}</j:set> *************** *** 282,285 **** --- 249,253 ---- </div> </j:if> + --> <j:if test="${date == 'navigation-bottom'}"> <div> *************** *** 318,325 **** </j:if> <j:if test="${date == 'bottom'}"> - Last published: ${build.date}</j:if> - <br/> - <a href="http://sourceforge.net"> - <img src="http://sourceforge.net/sflogo.php?group_id=49088&type=1" border="0" alt="SourceForge Logo"/> - </a> </td> <j:if test="${date == 'bottom-right'}"> --- 286,289 ---- *************** *** 367,374 **** <small> <j:if test="${navbean.isSelected(item.get(0))}"> ! <b><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}"/></b> </j:if> <j:if test="${!navbean.isSelected(item.get(0))}"> ! <doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}"/> </j:if> </small> --- 331,338 ---- <small> <j:if test="${navbean.isSelected(item.get(0))}"> ! <b><a href="${relativePath}${_link}">${_name}</a></b> </j:if> <j:if test="${!navbean.isSelected(item.get(0))}"> ! <a href="${relativePath}${_link}">${_name}</a> </j:if> </small> *************** *** 386,390 **** <j:set var="_name"><x:expr select="@name"/></j:set> <j:set var="_link"><x:expr select="@href"/></j:set> ! <doc:itemLink name="${_name}" link="${_link}"/> <j:set var="linkCount" value="${1+linkCount}"/> </x:forEach> --- 350,354 ---- <j:set var="_name"><x:expr select="@name"/></j:set> <j:set var="_link"><x:expr select="@href"/></j:set> ! <a href="${relativePath}${_link}">${_name}</a> <j:set var="linkCount" value="${1+linkCount}"/> </x:forEach> |
From: <let...@us...> - 2003-12-14 09:46:27
|
Update of /cvsroot/ejtools/thirdparty/dreambean/licenses In directory sc8-pr-cvs1:/tmp/cvs-serv29834/dreambean/licenses Added Files: LICENSE.txt Log Message: Add licenses for each used library. --- NEW FILE: LICENSE.txt --- Copyright 1999 (C) dreamBean Software. All Rights Reserved. Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name "dreamBean" must not be used to endorse or promote products derived from this Software without prior written permission of dreamBean Software. For written permission, please contact in...@dr.... 4. Products derived from this Software may not be called "EJX" nor may "EJX" appear in their names without prior written permission of dreamBean Software. 5. Due credit should be given to dreamBean Software (http://www.dreambean.com/). THIS SOFTWARE IS PROVIDED BY DREAMBEAN SOFTWARE ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DREAMBEAN SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
From: <let...@us...> - 2003-12-14 09:46:27
|
Update of /cvsroot/ejtools/xdocs In directory sc8-pr-cvs1:/tmp/cvs-serv32298 Modified Files: .cvsignore Log Message: Adjust list of ignored files. Index: .cvsignore =================================================================== RCS file: /cvsroot/ejtools/xdocs/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 5 Apr 2003 13:26:46 -0000 1.3 --- .cvsignore 13 Dec 2003 20:52:08 -0000 1.4 *************** *** 1,2 **** --- 1,3 ---- index.xml + download.xml navigation.xml |
From: <let...@us...> - 2003-12-14 09:46:25
|
Update of /cvsroot/ejtools/thirdparty/ejtools/licenses In directory sc8-pr-cvs1:/tmp/cvs-serv29630/ejtools/licenses Log Message: Directory /cvsroot/ejtools/thirdparty/ejtools/licenses added to the repository |
From: <let...@us...> - 2003-12-14 09:46:23
|
Update of /cvsroot/ejtools/thirdparty/ejtools In directory sc8-pr-cvs1:/tmp/cvs-serv29479/ejtools Log Message: Directory /cvsroot/ejtools/thirdparty/ejtools added to the repository |
From: <let...@us...> - 2003-12-14 08:40:59
|
Update of /cvsroot/ejtools In directory sc8-pr-cvs1:/tmp/cvs-serv21629 Modified Files: project.properties project.xml Log Message: Add more options. Factorize common libraries. Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/project.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** project.xml 27 Nov 2003 00:34:26 -0000 1.5 --- project.xml 13 Dec 2003 22:33:42 -0000 1.6 *************** *** 11,132 **** --> <project> ! <pomVersion>3</pomVersion> ! <id>ejtools</id> ! <name>ETJools</name> ! <groupId>ejtools</groupId> ! <currentVersion>1.0.0</currentVersion> ! <organization> ! <name>EJTools Org.</name> ! <url>http://www.ejtools.org/</url> ! <logo>/images/ejtools_logo.png</logo> ! </organization> ! <inceptionYear>2002</inceptionYear> ! <package>org.ejtools</package> ! <logo>/images/gear.png</logo> ! <description>The Enterprise Java Tools</description> ! <shortDescription>The Enterprise Java Tools</shortDescription> ! <url>http://www.sourceforge.net/projects/ejtools/</url> ! <issueTrackingUrl>http://sourceforge.net/tracker/?group_id=49088</issueTrackingUrl> ! <siteAddress>shell.sourceforge.net</siteAddress> ! <siteDirectory>/home/groups/e/ej/ejtools/htdocs</siteDirectory> ! <distributionDirectory>/home/groups/e/ej/ejtools/htdocs/distrib</distributionDirectory> ! <licenses> ! <license> ! <name>LGPL</name> ! <url>http://www.opensource.org/licenses/lgpl-license.php</url> ! <distribution>manual</distribution> ! </license> ! </licenses> ! <repository> ! <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/ejtools</connection> ! <developerConnection>scm:cvs:ext:dev...@cv...:/cvsroot/ejtools</developerConnection> ! <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ejtools/</url> ! </repository> ! <mailingLists> ! <mailingList> ! <name>EJTools User List</name> ! <subscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-users</subscribe> ! <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-users</unsubscribe> ! <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=16631</archive> ! </mailingList> ! <mailingList> ! <name>EJTools Developer List</name> ! <subscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-developers</subscribe> ! <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-developers</unsubscribe> ! <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=9772</archive> ! </mailingList> ! <mailingList> ! <name>EJTools CVS List</name> ! <subscribe>http://lists.sourceforge.net/lists/listinfo/ejtools-cvs</subscribe> ! <unsubscribe>http://lists.sourceforge.net/lists/listinfo/ejtools-cvs</unsubscribe> ! <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=8795</archive> ! </mailingList> ! </mailingLists> ! <developers> ! <developer> ! <name>Laurent Etiemble</name> ! <id>letiemble</id> ! <email>let...@us...</email> ! </developer> ! </developers> ! <dependencies> ! <!-- Generic dependencies --> ! <dependency> ! <id>junit</id> ! <version>3.8.1</version> ! </dependency> ! <!-- XDoclet dependencies --> ! <dependency> ! <id>xdoclet-xdoclet-module</id> ! <groupId>xdoclet</groupId> ! <version>1.2b2</version> ! </dependency> ! <dependency> ! <id>xdoclet-java-module</id> ! <groupId>xdoclet</groupId> ! <version>1.2b2</version> ! </dependency> ! <dependency> ! <id>xdoclet-web-module</id> ! <groupId>xdoclet</groupId> ! <version>1.2b2</version> ! </dependency> ! </dependencies> ! <build> ! <nagEmailAddress>ejt...@so...</nagEmailAddress> ! <!-- Source dirs --> ! <sourceDirectory>${basedir}/src/main</sourceDirectory> ! <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory> ! <integrationUnitTestSourceDirectory>${basedir}/src/test</integrationUnitTestSourceDirectory> ! <aspectSourceDirectory/> ! <!-- Unit test classes --> ! <unitTest> ! <includes> ! <include>**/*Test.java</include> ! </includes> ! </unitTest> ! <!-- Resources --> ! <resources> ! <resource> ! <directory>${basedir}/src/resources</directory> ! </resource> ! </resources> ! </build> ! <reports> ! <!-- ! <report>maven-checkstyle-plugin</report> ! <report>maven-jdepend-plugin</report> ! --> ! <report>maven-junit-report-plugin</report> ! <!-- ! <report>maven-javadoc-plugin</report> ! <report>maven-jxr-plugin</report> ! <report>maven-tasklist-plugin</report> ! --> ! <!-- ! <report>maven-changelog-plugin</report> ! <report>maven-file-activity-plugin</report> ! <report>maven-developer-activity-plugin</report> --> ! </reports> </project> --- 11,129 ---- --> <project> ! <pomVersion>3</pomVersion> ! <id>ejtools</id> ! <name>ETJools</name> ! <groupId>ejtools</groupId> ! <currentVersion>1.0.0</currentVersion> ! <organization> ! <name>EJTools Org.</name> ! <url>http://www.ejtools.org/</url> ! <logo>/images/ejtools_logo.png</logo> ! </organization> ! <inceptionYear>2002</inceptionYear> ! <package>org.ejtools</package> ! <logo>/images/gear.png</logo> ! <description>The Enterprise Java Tools</description> ! <shortDescription>The Enterprise Java Tools</shortDescription> ! <url>http://www.sourceforge.net/projects/ejtools/</url> ! <issueTrackingUrl>http://sourceforge.net/tracker/?group_id=49088</issueTrackingUrl> ! <siteAddress>shell.sourceforge.net</siteAddress> ! <siteDirectory>/home/groups/e/ej/ejtools/htdocs</siteDirectory> ! <distributionDirectory>/home/groups/e/ej/ejtools/htdocs/distrib</distributionDirectory> ! <licenses> ! <license> ! <name>LGPL</name> ! <url>http://www.opensource.org/licenses/lgpl-license.php</url> ! <distribution>manual</distribution> ! </license> ! </licenses> ! <repository> ! <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/ejtools</connection> ! <developerConnection>scm:cvs:ext:dev...@cv...:/cvsroot/ejtools</developerConnection> ! <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ejtools/</url> ! </repository> ! <mailingLists> ! <mailingList> ! <name>EJTools User List</name> ! <subscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-users</subscribe> ! <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-users</unsubscribe> ! <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=16631</archive> ! </mailingList> ! <mailingList> ! <name>EJTools Developer List</name> ! <subscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-developers</subscribe> ! <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/ejtools-developers</unsubscribe> ! <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=9772</archive> ! </mailingList> ! <mailingList> ! <name>EJTools CVS List</name> ! <subscribe>http://lists.sourceforge.net/lists/listinfo/ejtools-cvs</subscribe> ! <unsubscribe>http://lists.sourceforge.net/lists/listinfo/ejtools-cvs</unsubscribe> ! <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=8795</archive> ! </mailingList> ! </mailingLists> ! <developers> ! <developer> ! <name>Laurent Etiemble</name> ! <id>letiemble</id> ! <email>let...@us...</email> ! </developer> ! </developers> ! <dependencies> ! <!-- Generic dependencies --> ! <dependency> ! <id>junit</id> ! <version>3.8.1</version> ! </dependency> ! <dependency> ! <id>log4j</id> ! <version>1.2.8</version> ! </dependency> ! <!-- XDoclet dependencies --> ! <dependency> ! <id>xdoclet-xdoclet-module</id> ! <groupId>xdoclet</groupId> ! <version>1.2b2</version> ! </dependency> ! <dependency> ! <id>xdoclet-java-module</id> ! <groupId>xdoclet</groupId> ! <version>1.2b2</version> ! </dependency> ! <dependency> ! <id>xdoclet-web-module</id> ! <groupId>xdoclet</groupId> ! <version>1.2b2</version> ! </dependency> ! </dependencies> ! <build> ! <nagEmailAddress>ejt...@so...</nagEmailAddress> ! <!-- Source dirs --> ! <sourceDirectory>${basedir}/src/main</sourceDirectory> ! <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory> ! <integrationUnitTestSourceDirectory>${basedir}/src/test</integrationUnitTestSourceDirectory> ! <aspectSourceDirectory/> ! <!-- Unit test classes --> ! <unitTest> ! <includes> ! <include>**/*Test.java</include> ! </includes> ! </unitTest> ! <!-- Resources --> ! <resources> ! <resource> ! <directory>${basedir}/src/resources</directory> ! </resource> ! </resources> ! </build> ! <reports> ! <report>maven-javadoc-plugin</report> ! <report>maven-jxr-plugin</report> ! <report>maven-junit-report-plugin</report> ! <report>maven-clover-plugin</report> ! <report>maven-tasklist-plugin</report> ! <!-- ! <report>maven-jdepend-plugin</report> --> ! </reports> </project> |
From: <let...@us...> - 2003-12-14 08:40:57
|
Update of /cvsroot/ejtools/applications/management.browser/src/resources/org/ejtools/management/browser In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/resources/org/ejtools/management/browser Modified Files: Resources.properties Resources_fr_FR.properties Log Message: Add more javadocs. Adjust workspace persistence. Index: Resources.properties =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/resources/org/ejtools/management/browser/Resources.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Resources.properties 27 Nov 2003 01:39:48 -0000 1.2 --- Resources.properties 13 Dec 2003 22:31:57 -0000 1.3 *************** *** 102,105 **** --- 102,107 ---- file.dialog.title.load=Load Workspace file.dialog.title.save=Save Workspace + file.dialog.button.load=Load + file.dialog.button.save=Save Index: Resources_fr_FR.properties =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/resources/org/ejtools/management/browser/Resources_fr_FR.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Resources_fr_FR.properties 27 Nov 2003 01:39:48 -0000 1.2 --- Resources_fr_FR.properties 13 Dec 2003 22:31:57 -0000 1.3 *************** *** 101,105 **** # Text for open/save dialog box file.dialog.title.load=Ouvrir Configuration ! file.dialog.title.save=Save Configuration --- 101,107 ---- # Text for open/save dialog box file.dialog.title.load=Ouvrir Configuration ! file.dialog.title.save=Sauver Configuration ! file.dialog.button.load=Ouvrir ! file.dialog.button.save=Sauver |
From: <let...@us...> - 2003-12-14 08:40:55
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser/model/service Modified Files: CacheService.java CacheServiceProvider.java ConnectionMetaData.java ConnectionService.java ConnectionServiceProvider.java MEJBConnectionService.java NotificationService.java NotificationServiceProvider.java Log Message: Add more javadocs. Adjust workspace persistence. Index: CacheService.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/CacheService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CacheService.java 27 Nov 2003 01:39:48 -0000 1.3 --- CacheService.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,67 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Enumeration; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CacheService extends Serializable ! { ! /** Description of the Field */ ! public final int DOMAIN_TYPE = 0; ! /** Description of the Field */ ! public final int RESOURCE_TYPE = 1; ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheService object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type); ! ! ! /** Description of the Method */ ! public void clear(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key); ! } --- 1,67 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Enumeration; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CacheService extends Serializable ! { ! /** Description of the Field */ ! public final int DOMAIN_TYPE = 0; ! /** Description of the Field */ ! public final int RESOURCE_TYPE = 1; ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheService object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type); ! ! ! /** Description of the Method */ ! public void clear(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key); ! } Index: CacheServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/CacheServiceProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CacheServiceProvider.java 27 Nov 2003 01:39:48 -0000 1.3 --- CacheServiceProvider.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,167 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CacheServiceProvider extends CustomBeanContextServiceProvider implements CacheService ! { ! /** Description of the Field */ ! protected Hashtable domains = new Hashtable(); ! /** Description of the Field */ ! protected Hashtable resources = new Hashtable(); ! /** Description of the Field */ ! protected CacheService service = null; ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public CacheServiceProvider() ! { ! service = this; ! } ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value) ! { ! this.getTable(type).put(key, value); ! // logger.debug("Entity added " + type + ", " + key); ! } ! ! ! /** Description of the Method */ ! public void clear() ! { ! super.clear(); ! this.getTable(CacheService.DOMAIN_TYPE).clear(); ! this.getTable(CacheService.RESOURCE_TYPE).clear(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key) ! { ! return this.getTable(type).get(key); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type) ! { ! return this.getTable(type).keys(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key) ! { ! this.getTable(type).remove(key); ! // logger.debug("Entity removed " + type + ", " + key); ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CacheService.class}; ! } ! ! ! /** ! * Gets the table attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @return The table value ! * @paramtype Description of the Parameter ! * @paramtype Description of the Parameter ! * @paramtype Description of the Parameter ! */ ! protected Hashtable getTable(int type) ! { ! if (type == CacheService.DOMAIN_TYPE) ! { ! return this.domains; ! } ! return this.resources; ! } ! } --- 1,167 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CacheServiceProvider extends CustomBeanContextServiceProvider implements CacheService ! { ! /** Description of the Field */ ! protected Hashtable domains = new Hashtable(); ! /** Description of the Field */ ! protected Hashtable resources = new Hashtable(); ! /** Description of the Field */ ! protected CacheService service = null; ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public CacheServiceProvider() ! { ! service = this; ! } ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value) ! { ! this.getTable(type).put(key, value); ! // logger.debug("Entity added " + type + ", " + key); ! } ! ! ! /** Description of the Method */ ! public void clear() ! { ! super.clear(); ! this.getTable(CacheService.DOMAIN_TYPE).clear(); ! this.getTable(CacheService.RESOURCE_TYPE).clear(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key) ! { ! return this.getTable(type).get(key); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type) ! { ! return this.getTable(type).keys(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key) ! { ! this.getTable(type).remove(key); ! // logger.debug("Entity removed " + type + ", " + key); ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CacheService.class}; ! } ! ! ! /** ! * Gets the table attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @return The table value ! * @paramtype Description of the Parameter ! * @paramtype Description of the Parameter ! * @paramtype Description of the Parameter ! */ ! protected Hashtable getTable(int type) ! { ! if (type == CacheService.DOMAIN_TYPE) ! { ! return this.domains; ! } ! return this.resources; ! } ! } Index: ConnectionMetaData.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/ConnectionMetaData.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConnectionMetaData.java 27 Nov 2003 01:39:48 -0000 1.3 --- ConnectionMetaData.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,93 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import org.ejtools.util.service.ProfileMetaData; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ConnectionMetaData implements ProfileMetaData ! { ! /** Description of the Field */ ! protected String[] keys = new String[]{ ! ConnectionMetaData.CLASS_NAME, ! ConnectionMetaData.FACTORY, ! ConnectionMetaData.PACKAGES, ! ConnectionMetaData.URL, ! ConnectionMetaData.CONTEXT, ! ConnectionMetaData.PRINCIPAL, ! ConnectionMetaData.CREDENTIALS ! }; ! /** Description of the Field */ ! public final static String CLASS_NAME = "classname"; ! /** Description of the Field */ ! public final static String CONTEXT = "context"; ! /** Description of the Field */ ! public final static String CREDENTIALS = "credentials"; ! /** Description of the Field */ ! public final static String FACTORY = "factory"; ! /** Description of the Field */ ! public final static String PACKAGES = "packages"; ! /** Description of the Field */ ! public final static String PRINCIPAL = "principal"; ! /** Description of the Field */ ! public final static String URL = "url"; ! ! ! /** Constructor for ConnectionMetaData. */ ! public ConnectionMetaData() ! { ! super(); ! } ! ! ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName() ! { ! return "/management.connection.properties"; ! } ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index) ! { ! return this.keys[index]; ! } ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys() ! { ! return this.keys; ! } ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix() ! { ! return "connection"; ! } ! } --- 1,93 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import org.ejtools.util.service.ProfileMetaData; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ConnectionMetaData implements ProfileMetaData ! { ! /** Description of the Field */ ! protected String[] keys = new String[]{ ! ConnectionMetaData.CLASS_NAME, ! ConnectionMetaData.FACTORY, ! ConnectionMetaData.PACKAGES, ! ConnectionMetaData.URL, ! ConnectionMetaData.CONTEXT, ! ConnectionMetaData.PRINCIPAL, ! ConnectionMetaData.CREDENTIALS ! }; ! /** Description of the Field */ ! public final static String CLASS_NAME = "classname"; ! /** Description of the Field */ ! public final static String CONTEXT = "context"; ! /** Description of the Field */ ! public final static String CREDENTIALS = "credentials"; ! /** Description of the Field */ ! public final static String FACTORY = "factory"; ! /** Description of the Field */ ! public final static String PACKAGES = "packages"; ! /** Description of the Field */ ! public final static String PRINCIPAL = "principal"; ! /** Description of the Field */ ! public final static String URL = "url"; ! ! ! /** Constructor for ConnectionMetaData. */ ! public ConnectionMetaData() ! { ! super(); ! } ! ! ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName() ! { ! return "/management.connection.properties"; ! } ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index) ! { ! return this.keys[index]; ! } ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys() ! { ! return this.keys; ! } ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix() ! { ! return "connection"; ! } ! } Index: ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/ConnectionService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConnectionService.java 27 Nov 2003 01:39:48 -0000 1.3 --- ConnectionService.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,51 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.io.Serializable; ! ! import javax.management.j2ee.Management; ! ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface ConnectionService extends Serializable ! { ! /** ! * Gets the mBeanServer attribute of the ConnectionService object ! * ! * @return The mBeanServer value ! */ ! public Management getMEJB(); ! ! ! /** ! * Gets the connected attribute of the ConnectionService object ! * ! * @return The connected value ! */ ! public boolean isConnected(); ! ! ! /** ! * Description of the Method ! * ! * @param profile Description of the Parameter ! */ ! public void connect(Profile profile); ! ! ! /** Description of the Method */ ! public void disconnect(); ! } ! --- 1,51 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.io.Serializable; ! ! import javax.management.j2ee.Management; ! ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface ConnectionService extends Serializable ! { ! /** ! * Gets the mBeanServer attribute of the ConnectionService object ! * ! * @return The mBeanServer value ! */ ! public Management getMEJB(); ! ! ! /** ! * Gets the connected attribute of the ConnectionService object ! * ! * @return The connected value ! */ ! public boolean isConnected(); ! ! ! /** ! * Description of the Method ! * ! * @param profile Description of the Parameter ! */ ! public void connect(Profile profile); ! ! ! /** Description of the Method */ ! public void disconnect(); ! } ! Index: ConnectionServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/ConnectionServiceProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConnectionServiceProvider.java 27 Nov 2003 01:39:48 -0000 1.3 --- ConnectionServiceProvider.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,80 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ConnectionServiceProvider extends CustomBeanContextServiceProvider ! { ! /** Description of the Field */ ! protected ConnectionService service = null; ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public ConnectionServiceProvider() ! { ! this.service = new MEJBConnectionService(); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{ConnectionService.class}; ! } ! } --- 1,80 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ConnectionServiceProvider extends CustomBeanContextServiceProvider ! { ! /** Description of the Field */ ! protected ConnectionService service = null; ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public ConnectionServiceProvider() ! { ! this.service = new MEJBConnectionService(); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{ConnectionService.class}; ! } ! } Index: MEJBConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/MEJBConnectionService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MEJBConnectionService.java 27 Nov 2003 01:39:48 -0000 1.3 --- MEJBConnectionService.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,146 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.util.Hashtable; ! ! import javax.management.j2ee.Management; ! import javax.management.j2ee.ManagementHome; ! import javax.naming.Context; ! import javax.naming.InitialContext; ! import javax.rmi.PortableRemoteObject; ! ! import org.apache.log4j.Logger; ! import org.ejtools.util.service.Profile; ! ! /** ! * MEJB connection that holds the EJB handle to the J2EE server ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class MEJBConnectionService implements ConnectionService ! { ! /** Connected state */ ! protected boolean connected = false; ! /** Description of the Field */ ! protected Management mejb = null; ! /** The connection profile */ ! protected Profile profile = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(MEJBConnectionService.class); ! ! ! /** Constructor for MEJBConnectionService. */ ! public MEJBConnectionService() ! { ! super(); ! } ! ! ! /** ! * Connect to the MBean server with this profile ! * ! * @param profile Connection profile ! */ ! public void connect(Profile profile) ! { ! this.profile = profile; ! try ! { ! this.createMEJB(); ! this.setConnected(true); ! } ! catch (Exception e) ! { ! logger.error("Error while connecting to MEJB", e); ! this.setConnected(false); ! } ! } ! ! ! /** Disconnect from the MBean server */ ! public void disconnect() ! { ! try ! { ! this.mejb.remove(); ! } ! catch (Exception e) ! { ! logger.warn("Error while disconnecting from MEJB", e); ! // Do nothing ! } ! this.setConnected(false); ! } ! ! ! /** ! * Gets the proxied MBean server ! * ! * @return The MBeanServer proxy ! */ ! public Management getMEJB() ! { ! if (!this.connected) ! { ! logger.warn("Service is not connected"); ! throw new IllegalStateException("The service is not connected. Call 'connect' method before."); ! } ! if (this.mejb == null) ! { ! logger.warn("MEJB reference is null"); ! throw new IllegalStateException("The server is null. Call 'connect' method before."); ! } ! return this.mejb; ! } ! ! ! /** ! * Return whether the connector is connector ! * ! * @return true if connected ! */ ! public boolean isConnected() ! { ! return this.connected; ! } ! ! ! /** ! * Sets the connection state value ! * ! * @param connected The connection state ! */ ! public void setConnected(boolean connected) ! { ! this.connected = connected; ! } ! ! ! /** ! * Create the proxy to the MBean server. This method must set the MBean server after a successful creation. ! * ! * @exception Exception Description of the Exception ! */ ! protected void createMEJB() ! throws Exception ! { ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! InitialContext context = new InitialContext(props); ! Object ref = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! ! ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(ref, ManagementHome.class); ! this.mejb = home.create(); ! } ! } --- 1,146 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.util.Hashtable; ! ! import javax.management.j2ee.Management; ! import javax.management.j2ee.ManagementHome; ! import javax.naming.Context; ! import javax.naming.InitialContext; ! import javax.rmi.PortableRemoteObject; ! ! import org.apache.log4j.Logger; ! import org.ejtools.util.service.Profile; ! ! /** ! * MEJB connection that holds the EJB handle to the J2EE server ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class MEJBConnectionService implements ConnectionService ! { ! /** Connected state */ ! protected boolean connected = false; ! /** Description of the Field */ ! protected Management mejb = null; ! /** The connection profile */ ! protected Profile profile = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(MEJBConnectionService.class); ! ! ! /** Constructor for MEJBConnectionService. */ ! public MEJBConnectionService() ! { ! super(); ! } ! ! ! /** ! * Connect to the MBean server with this profile ! * ! * @param profile Connection profile ! */ ! public void connect(Profile profile) ! { ! this.profile = profile; ! try ! { ! this.createMEJB(); ! this.setConnected(true); ! } ! catch (Exception e) ! { ! logger.error("Error while connecting to MEJB", e); ! this.setConnected(false); ! } ! } ! ! ! /** Disconnect from the MBean server */ ! public void disconnect() ! { ! try ! { ! this.mejb.remove(); ! } ! catch (Exception e) ! { ! logger.warn("Error while disconnecting from MEJB", e); ! // Do nothing ! } ! this.setConnected(false); ! } ! ! ! /** ! * Gets the proxied MBean server ! * ! * @return The MBeanServer proxy ! */ ! public Management getMEJB() ! { ! if (!this.connected) ! { ! logger.warn("Service is not connected"); ! throw new IllegalStateException("The service is not connected. Call 'connect' method before."); ! } ! if (this.mejb == null) ! { ! logger.warn("MEJB reference is null"); ! throw new IllegalStateException("The server is null. Call 'connect' method before."); ! } ! return this.mejb; ! } ! ! ! /** ! * Return whether the connector is connector ! * ! * @return true if connected ! */ ! public boolean isConnected() ! { ! return this.connected; ! } ! ! ! /** ! * Sets the connection state value ! * ! * @param connected The connection state ! */ ! public void setConnected(boolean connected) ! { ! this.connected = connected; ! } ! ! ! /** ! * Create the proxy to the MBean server. This method must set the MBean server after a successful creation. ! * ! * @exception Exception Description of the Exception ! */ ! protected void createMEJB() ! throws Exception ! { ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! InitialContext context = new InitialContext(props); ! Object ref = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! ! ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(ref, ManagementHome.class); ! this.mejb = home.create(); ! } ! } Index: NotificationService.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/NotificationService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NotificationService.java 27 Nov 2003 01:39:48 -0000 1.3 --- NotificationService.java 13 Dec 2003 22:31:57 -0000 1.4 *************** *** 1,56 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import javax.management.ObjectName; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface NotificationService extends Serializable ! { ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! */ ! public void removeObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! */ ! public boolean hasObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll(); ! ! ! /** Description of the Method */ ! public void clearAll(); ! } --- 1,56 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import javax.management.ObjectName; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface NotificationService extends Serializable ! { ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! */ ! public void removeObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! */ ! public boolean hasObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll(); ! ! ! /** Description of the Method */ ! public void clearAll(); ! } Index: NotificationServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/model/service/NotificationServiceProvider.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NotificationServiceProvider.java 27 Nov 2003 01:39:48 -0000 1.4 --- NotificationServiceProvider.java 13 Dec 2003 22:31:57 -0000 1.5 *************** *** 1,384 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.awt.Component; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.beans.beancontext.BeanContextServices; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.management.Notification; ! import javax.management.NotificationListener; ! import javax.management.ObjectName; ! import javax.management.j2ee.ListenerRegistration; ! import javax.swing.JTable; ! import javax.swing.table.AbstractTableModel; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.swing.table.TableModelSorter; ! import org.ejtools.util.LimitedStack; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class NotificationServiceProvider extends CustomBeanContextServiceProvider implements BeanContextChildComponentProxy, NotificationService, NotificationListener ! { ! /** Description of the Field */ ! protected NotificationTableModel model = null; ! /** Description of the Field */ ! protected LimitedStack notifications = new LimitedStack(500); ! /** Description of the Field */ ! protected Vector objectNames = new Vector(); ! /** Description of the Field */ ! protected NotificationService service = null; ! /** Description of the Field */ ! protected JTable table = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(NotificationServiceProvider.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public NotificationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! ListenerRegistration registration = service.getMEJB().getListenerRegistry(); ! logger.debug("ListenerRegistration " + registration); ! registration.addNotificationListener(object, this, null, "EJTOOLS Management BROWSER"); ! this.objectNames.add(object.getCanonicalName()); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! } ! } ! ! ! /** Description of the Method */ ! public void clearAll() ! { ! this.notifications.clear(); ! } ! ! ! /** ! * @return The component value ! */ ! public Component getComponent() ! { ! if (this.table == null) ! { ! this.model = new NotificationServiceProvider.NotificationTableModel(); ! TableModelSorter sorter = new TableModelSorter(this.model); ! this.table = new JTable(sorter); ! sorter.addMouseListenerToHeaderInTable(this.table); ! } ! return this.table; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param notification Description of the Parameter ! * @param handback Description of the Parameter ! */ ! public void handleNotification(Notification notification, java.lang.Object handback) ! { ! logger.debug("Notification received (" + handback + ")"); ! this.notifications.push(notification); ! if (this.model != null) ! { ! this.model.fireTableRowsInserted(this.notifications.size(), this.notifications.size()); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! */ ! public boolean hasObjectName(ObjectName object) ! { ! return this.objectNames.contains(object.getCanonicalName()); ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll() ! { ! return this.reverse(notifications); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! */ ! public void removeObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (!this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! ListenerRegistration registration = service.getMEJB().getListenerRegistry(); ! logger.debug("ListenerRegistration " + registration); ! registration.removeNotificationListener(object, this); ! this.objectNames.remove(object.getCanonicalName()); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! } ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{NotificationService.class}; ! } ! ! ! /** ! * Description of the Method ! * ! * @param collection Description of the Parameter ! * @return Description of the Return Value ! * @todo Move elsewhere ! */ ! protected Collection reverse(Collection collection) ! { ! Vector result = new Vector(); ! ! Iterator it = collection.iterator(); ! while (it.hasNext()) ! { ! result.insertElementAt(it.next(), 0); ! } ! ! return result; ! } ! ! ! /** ! * Description of the Class ! * ! * @author letiembl ! * @version $Revision$ ! * @created 18 septembre 2002 ! * @todo I18N ! */ ! private class NotificationTableModel extends AbstractTableModel ! { ! /** Description of the Field */ ! private String COLUMN_MESSAGE = resources.getString("notification.table.column.message"); ! /** Description of the Field */ ! private String COLUMN_SEQUENCE = resources.getString("notification.table.column.sequence"); ! /** Description of the Field */ ! private String COLUMN_SOURCE = resources.getString("notification.table.column.source"); ! /** Description of the Field */ ! private String COLUMN_TIMESTAMP = resources.getString("notification.table.column.timestamp"); ! /** Description of the Field */ ! private String COLUMN_TYPE = resources.getString("notification.table.column.type"); ! ! ! /** ! * @param columnIndex Description of the Parameter ! * @return The columnClass value ! */ ! public Class getColumnClass(int columnIndex) ! { ! switch (columnIndex) ! { ! case 0: ! return Object.class; ! case 1: ! return String.class; ! case 2: ! return String.class; ! case 3: ! return String.class; ! case 4: ! return String.class; ! } ! return Object.class; ! } ! ! ! /** ! * @return The columnCount value ! */ ! public int getColumnCount() ! { ! return 5; ! } ! ! ! /** ! * @param columnIndex Description of the Parameter ! * @return The columnName value ! */ ! public String getColumnName(int columnIndex) ! { ! switch (columnIndex) ! { ! case 0: ! return COLUMN_SOURCE; ! case 1: ! return COLUMN_TIMESTAMP; ! case 2: ! return COLUMN_SEQUENCE; ! case 3: ! return COLUMN_TYPE; ! case 4: ! return COLUMN_MESSAGE; ! } ! return super.getColumnName(columnIndex); ! } ! ! ! /** ! * @return The rowCount value ! */ ! public int getRowCount() ! { ! return NotificationServiceProvider.this.notifications.size(); ! } ! ! ! /** ! * @param rowIndex Description of the Parameter ! * @param columnIndex Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int rowIndex, int columnIndex) ! { ! Object o = null; ! if (rowIndex < NotificationServiceProvider.this.notifications.size()) ! { ! Notification notif = (Notification) NotificationServiceProvider.this.notifications.elementAt(rowIndex); ! switch (columnIndex) ! { ! case 0: ! o = notif.getSource(); ! break; ! case 1: ! o = new String("" + notif.getTimeStamp()); ! break; ! case 2: ! o = new String("" + notif.getSequenceNumber()); ! break; ! case 3: ! o = notif.getType(); ! break; ! case 4: ! o = notif.getMessage(); ! break; ! } ! } ! if (o == null) ! { ! o = new String(); ! } ! return o; ! } ! } ! } --- 1,384 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.model.service; ! ! import java.awt.Component; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.beans.beancontext.BeanContextServices; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.management.Notification; ! import javax.management.NotificationListener; ! import javax.management.ObjectName; ! import javax.management.j2ee.ListenerRegistration; ! import javax.swing.JTable; ! import javax.swing.table.AbstractTableModel; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.swing.table.TableModelSorter; ! import org.ejtools.util.LimitedStack; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class NotificationServiceProvider extends CustomBeanContextServiceProvider implements BeanContextChildComponentProxy, NotificationService, NotificationListener ! { ! /** Description of the Field */ ! protected NotificationTableModel model = null; ! /** Description of the Field */ ! protected LimitedStack notifications = new LimitedStack(500); ! /** Description of the Field */ ! protected Vector objectNames = new Vector(); ! /** Description of the Field */ ! protected NotificationService service = null; ! /** Description of the Field */ ! protected JTable table = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(NotificationServiceProvider.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public NotificationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! ListenerRegistration registration = service.getMEJB().getListenerRegistry(); ! logger.debug("ListenerRegistration " + registration); ! registration.addNotificationListener(object, this, null, "EJTOOLS Management BROWSER"); ! this.objectNames.add(object.getCanonicalName()); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! } ! } ! ! ! /** Description of the Method */ ! public void clearAll() ! { ! this.notifications.clear(); ! } ! ! ! /** ! * @return The component value ! */ ! public Component getComponent() ! { ! if (this.table == null) ! { ! this.model = new NotificationServiceProvider.NotificationTableModel(); ! TableModelSorter sorter = new TableModelSorter(this.model); ! this.table = new JTable(sorter); ! sorter.addMouseListenerToHeaderInTable(this.table); ! } ! return this.table; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param notification Description of the Parameter ! * @param handback Description of the Parameter ! */ ! public void handleNotification(Notification notification, java.lang.Object handback) ! { ! logger.debug("Notification received (" + handback + ")"); ! this.notifications.push(notification); ! if (this.model != null) ! { ! this.model.fireTableRowsInserted(this.notifications.size(), this.notifications.size()); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! */ ! public boolean hasObjectName(ObjectName object) ! { ! return this.objectNames.contains(object.getCanonicalName()); ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll() ! { ! return this.reverse(notifications); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! */ ! public void removeObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (!this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! ListenerRegistration registration = service.getMEJB().getListenerRegistry(); ! logger.debug("ListenerRegistration " + registration); ! registration.removeNotificationListener(object, this); ! this.objectNames.remove(object.getCanonicalName()); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! } ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{NotificationService.class}; ! } ! ! ! /** ! * Description of the Method ! * ! * @param collection Description of the Parameter ! * @return Description of the Return Value ! * @todo Move elsewhere ! */ ! protected Collection reverse(Collection collection) ! { ! Vector result = new Vector(); ! ! Iterator it = collection.iterator(); ! while (it.hasNext()) ! { ! result.insertElementAt(it.next(), 0); ! } ! ! return result; ! } ! ! ! /** ! * Description of the Class ! * ! * @author letiembl ! * @version $Revision$ ! * @created 18 septembre 2002 ! * @todo I18N ! */ ! private class NotificationTableModel extends AbstractTableModel ! { ! /** Description of the Field */ ! private String COLUMN_MESSAGE = resources.getString("notification.table.column.message"); ! /** Description of the Field */ ! private String COLUMN_SEQUENCE = resources.getString... [truncated message content] |
From: <let...@us...> - 2003-12-14 08:40:54
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser/state Modified Files: WorkbenchState.java WorkbenchStoreVisitor.java Log Message: Add more javadocs. Adjust workspace persistence. Index: WorkbenchState.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/WorkbenchState.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkbenchState.java 27 Nov 2003 01:39:48 -0000 1.1 --- WorkbenchState.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,159 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.state; ! ! import java.beans.beancontext.BeanContext; ! import java.io.File; ! import java.net.URL; ! ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import javax.xml.parsers.SAXParser; ! import javax.xml.parsers.SAXParserFactory; ! import javax.xml.transform.Result; ! import javax.xml.transform.Source; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.dom.DOMSource; ! import javax.xml.transform.stream.StreamResult; ! ! import org.ejtools.graph.frame.GraphInternalFrame; ! import org.ejtools.management.browser.Browser; ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.management.browser.state.rules.GraphInternalFrameRule; ! import org.ejtools.management.browser.state.rules.ManagementGraphRule; ! import org.ejtools.management.browser.state.rules.ManagedObjectRule; ! import org.ejtools.management.browser.state.rules.ServerInternalFrameRule; ! import org.ejtools.management.browser.state.rules.ServerRule; ! import org.ejtools.util.service.ProfileRule; ! import org.ejtools.util.state.LoadHandler; ! import org.ejtools.util.state.StoreVisitor; ! import org.w3c.dom.Document; ! ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! * @created 3 juin 2003 ! */ ! public class WorkbenchState ! { ! /** Description of the Field */ ! private BeanContext context; ! /** Description of the Field */ ! private Document document; ! /** Description of the Field */ ! private URL workbenchURL; ! ! ! /** ! *Constructor for the FilePersistenceStore object ! * ! * @param context Description of the Parameter ! */ ! public WorkbenchState(BeanContext context) ! { ! this.context = context; ! } ! ! ! /** ! * Gets the workbenchFile attribute of the WorkbenchStore object ! * ! * @return The workbenchFile value ! */ ! public URL getWorkbenchURL() ! { ! return this.workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void load() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! LoadHandler handler = new LoadHandler(); ! handler.getContext().put("CONTAINER", this.context); ! ! handler.addRule("/workbench/graph-frame", new GraphInternalFrameRule()); ! handler.addRule("/workbench/management-frame", new ServerInternalFrameRule()); ! handler.addRule("/workbench/management-frame/profile", new ProfileRule()); ! handler.addRule("/workbench/management-frame/profile/property", new ProfileRule.ProfilePropertyRule()); ! handler.addRule("/workbench/management-frame/management-server", new ServerRule()); ! handler.addRule("/workbench/management-frame/management-server/management-object", new ManagedObjectRule()); ! handler.addRule("/workbench/management-frame/management-server/management-object/management-graph", new ManagementGraphRule()); ! ! SAXParserFactory factory = SAXParserFactory.newInstance(); ! SAXParser parser = factory.newSAXParser(); ! File file = new File(this.workbenchURL.getFile()); ! parser.parse(file, handler); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** ! * Sets the workbenchFile attribute of the WorkbenchStore object ! * ! * @param workbenchURL The new workbenchURL value ! */ ! public void setWorkbenchURL(URL workbenchURL) ! { ! this.workbenchURL = workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void store() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ! DocumentBuilder builder = dbFactory.newDocumentBuilder(); ! this.document = builder.newDocument(); ! ! StoreVisitor visitor = new WorkbenchStoreVisitor(this.document); ! visitor.registerForPersistence(Browser.class); ! visitor.registerForPersistence(ServerInternalFrame.class); ! visitor.registerForPersistence(GraphInternalFrame.class); ! visitor.registerForPersistence(Server.class); ! visitor.registerForPersistence(ManagedObject.class); ! visitor.persist(this.context); ! ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer = tFactory.newTransformer(); ! transformer.setOutputProperty("indent", "true"); ! ! Source source = new DOMSource(this.document); ! File file = new File(this.workbenchURL.getFile()); ! Result result = new StreamResult(file); ! transformer.transform(source, result); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! } --- 1,159 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.state; ! ! import java.beans.beancontext.BeanContext; ! import java.io.File; ! import java.net.URL; ! ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import javax.xml.parsers.SAXParser; ! import javax.xml.parsers.SAXParserFactory; ! import javax.xml.transform.Result; ! import javax.xml.transform.Source; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.dom.DOMSource; ! import javax.xml.transform.stream.StreamResult; ! ! import org.ejtools.graph.frame.GraphInternalFrame; ! import org.ejtools.management.browser.Browser; ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.management.browser.state.rules.GraphInternalFrameRule; ! import org.ejtools.management.browser.state.rules.ManagementGraphRule; ! import org.ejtools.management.browser.state.rules.ManagedObjectRule; ! import org.ejtools.management.browser.state.rules.ServerInternalFrameRule; ! import org.ejtools.management.browser.state.rules.ServerRule; ! import org.ejtools.util.service.ProfileRule; ! import org.ejtools.util.state.LoadHandler; ! import org.ejtools.util.state.StoreVisitor; ! import org.w3c.dom.Document; ! ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! * @created 3 juin 2003 ! */ ! public class WorkbenchState ! { ! /** Description of the Field */ ! private BeanContext context; ! /** Description of the Field */ ! private Document document; ! /** Description of the Field */ ! private URL workbenchURL; ! ! ! /** ! *Constructor for the FilePersistenceStore object ! * ! * @param context Description of the Parameter ! */ ! public WorkbenchState(BeanContext context) ! { ! this.context = context; ! } ! ! ! /** ! * Gets the workbenchFile attribute of the WorkbenchStore object ! * ! * @return The workbenchFile value ! */ ! public URL getWorkbenchURL() ! { ! return this.workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void load() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! LoadHandler handler = new LoadHandler(); ! handler.getContext().put("CONTAINER", this.context); ! ! handler.addRule("/workbench/graph-frame", new GraphInternalFrameRule()); ! handler.addRule("/workbench/management-frame", new ServerInternalFrameRule()); ! handler.addRule("/workbench/management-frame/profile", new ProfileRule()); ! handler.addRule("/workbench/management-frame/profile/property", new ProfileRule.ProfilePropertyRule()); ! handler.addRule("/workbench/management-frame/management-server", new ServerRule()); ! handler.addRule("/workbench/management-frame/management-server/management-object", new ManagedObjectRule()); ! handler.addRule("/workbench/management-frame/management-server/management-object/management-graph", new ManagementGraphRule()); ! ! SAXParserFactory factory = SAXParserFactory.newInstance(); ! SAXParser parser = factory.newSAXParser(); ! File file = new File(this.workbenchURL.getFile()); ! parser.parse(file, handler); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** ! * Sets the workbenchFile attribute of the WorkbenchStore object ! * ! * @param workbenchURL The new workbenchURL value ! */ ! public void setWorkbenchURL(URL workbenchURL) ! { ! this.workbenchURL = workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void store() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ! DocumentBuilder builder = dbFactory.newDocumentBuilder(); ! this.document = builder.newDocument(); ! ! StoreVisitor visitor = new WorkbenchStoreVisitor(this.document); ! visitor.registerForPersistence(Browser.class); ! visitor.registerForPersistence(ServerInternalFrame.class); ! visitor.registerForPersistence(GraphInternalFrame.class); ! visitor.registerForPersistence(Server.class); ! visitor.registerForPersistence(ManagedObject.class); ! visitor.persist(this.context); ! ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer = tFactory.newTransformer(); ! transformer.setOutputProperty("indent", "true"); ! ! Source source = new DOMSource(this.document); ! File file = new File(this.workbenchURL.getFile()); ! Result result = new StreamResult(file); ! transformer.transform(source, result); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! } Index: WorkbenchStoreVisitor.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/WorkbenchStoreVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkbenchStoreVisitor.java 27 Nov 2003 01:39:48 -0000 1.1 --- WorkbenchStoreVisitor.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,184 **** ! /* ! * ianRR, is a new RR ! * ! * Distributable under LGPL license. ! * See terms at http://opensource.org/licenses/lgpl-license.php ! */ ! package org.ejtools.management.browser.state; ! ! import java.util.Iterator; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.Sort; ! import org.ejtools.graph.frame.GraphInternalFrame; ! import org.ejtools.graph.service.GraphConsumer; ! import org.ejtools.graph.service.GraphProducer; ! import org.ejtools.management.browser.Browser; ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.state.DefaultStoreVisitor; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; ! ! ! /** ! * @version $Revision$ ! * @author Laurent Etiemble ! * @created 3 juin 2003 ! */ ! public class WorkbenchStoreVisitor extends DefaultStoreVisitor { ! private Document document; ! private static Logger logger = Logger.getLogger(WorkbenchStoreVisitor.class); ! ! ! /** ! * Constructor for the WorkbenchStoreVisitor object ! * ! * @param document Description of the Parameter ! */ ! public WorkbenchStoreVisitor(Document document) { ! this.document = document; ! this.pushCurrentNode(this.document); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(ServerInternalFrame o) { ! logger.debug("ServerInternalFrame"); ! ! Element eFrame = this.document.createElement("management-frame"); ! eFrame.setAttribute("title", o.getTitle()); ! Element eProfile = this.document.createElement("profile"); ! eFrame.appendChild(eProfile); ! ! Profile profile = o.getProfile(); ! for (Iterator iterator = profile.keySet().iterator(); iterator.hasNext(); ) { ! String key = (String) iterator.next(); ! Element property = this.document.createElement("property"); ! property.setAttribute("key", key); ! property.appendChild(this.document.createTextNode(profile.getProperty(key))); ! eProfile.appendChild(property); ! } ! ! this.peekCurrentNode().appendChild(eFrame); ! this.pushCurrentNode(eFrame); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(GraphInternalFrame o) { ! logger.debug("GraphInternalFrame"); ! ! Element eFrame = this.document.createElement("graph-frame"); ! eFrame.setAttribute("name", o.getName()); ! eFrame.setAttribute("delay", String.valueOf(o.getDelay())); ! eFrame.setAttribute("scale", String.valueOf(o.getScale())); ! ! this.peekCurrentNode().appendChild(eFrame); ! this.pushCurrentNode(eFrame); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Server o) { ! logger.debug("Server"); ! ! Element server = this.document.createElement("management-server"); ! server.setAttribute("name", o.getName()); ! server.setAttribute("connected", "" + o.isConnected()); ! ! this.peekCurrentNode().appendChild(server); ! this.pushCurrentNode(server); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Browser o) { ! logger.debug("Browser"); ! ! Element workbench = this.document.createElement("workbench"); ! ! this.peekCurrentNode().appendChild(workbench); ! this.pushCurrentNode(workbench); ! this.persist(Sort.getChildrenByClass(o.iterator(), GraphInternalFrame.class)); ! this.persist(Sort.getChildrenByClass(o.iterator(), ServerInternalFrame.class)); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(ManagedObject o) { ! try { ! int g = o.getGraphProducers().size(); ! boolean notif = o.isRegisteredForNotifications(); ! ! if ((g > 0) || notif) { ! Element resource = this.document.createElement("management-object"); ! resource.setAttribute("objectName", o.getCanonicalName()); ! ! if (notif) { ! resource.setAttribute("listen", "true"); ! } ! if (g > 0) { ! GraphConsumer[] consumers = o.getGraphConsumers(); ! ! for (Iterator iterator = o.getGraphProducers().keySet().iterator(); iterator.hasNext(); ) { ! String attribute = (String) iterator.next(); ! GraphProducer producer = (GraphProducer) o.getGraphProducers().get(attribute); ! ! GraphConsumer consumer = null; ! for (int i = 0; i < consumers.length; i++) { ! GraphConsumer gc = consumers[i]; ! if (gc.containsGraphProducer(producer)) { ! consumer = gc; ! } ! } ! if (consumer != null) { ! Element graph = this.document.createElement("management-graph"); ! graph.setAttribute("attribute", attribute); ! graph.setAttribute("target", consumer.toString()); ! resource.appendChild(graph); ! } ! //else ! //{ ! // logger.warn("A graph producer is not linked to a graph consumer !!!"); ! //} ! } ! } ! this.peekCurrentNode().appendChild(resource); ! this.pushCurrentNode(resource); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! } catch (Exception e) { ! e.printStackTrace(); ! } ! } ! } --- 1,184 ---- ! /* ! * ianRR, is a new RR ! * ! * Distributable under LGPL license. ! * See terms at http://opensource.org/licenses/lgpl-license.php ! */ ! package org.ejtools.management.browser.state; ! ! import java.util.Iterator; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.Sort; ! import org.ejtools.graph.frame.GraphInternalFrame; ! import org.ejtools.graph.service.GraphConsumer; ! import org.ejtools.graph.service.GraphProducer; ! import org.ejtools.management.browser.Browser; ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.state.DefaultStoreVisitor; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; ! ! ! /** ! * @version $Revision$ ! * @author Laurent Etiemble ! * @created 3 juin 2003 ! */ ! public class WorkbenchStoreVisitor extends DefaultStoreVisitor { ! private Document document; ! private static Logger logger = Logger.getLogger(WorkbenchStoreVisitor.class); ! ! ! /** ! * Constructor for the WorkbenchStoreVisitor object ! * ! * @param document Description of the Parameter ! */ ! public WorkbenchStoreVisitor(Document document) { ! this.document = document; ! this.pushCurrentNode(this.document); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(ServerInternalFrame o) { ! logger.debug("ServerInternalFrame"); ! ! Element eFrame = this.document.createElement("management-frame"); ! eFrame.setAttribute("title", o.getTitle()); ! Element eProfile = this.document.createElement("profile"); ! eFrame.appendChild(eProfile); ! ! Profile profile = o.getProfile(); ! for (Iterator iterator = profile.keySet().iterator(); iterator.hasNext(); ) { ! String key = (String) iterator.next(); ! Element property = this.document.createElement("property"); ! property.setAttribute("key", key); ! property.appendChild(this.document.createTextNode(profile.getProperty(key))); ! eProfile.appendChild(property); ! } ! ! this.peekCurrentNode().appendChild(eFrame); ! this.pushCurrentNode(eFrame); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(GraphInternalFrame o) { ! logger.debug("GraphInternalFrame"); ! ! Element eFrame = this.document.createElement("graph-frame"); ! eFrame.setAttribute("name", o.getName()); ! eFrame.setAttribute("delay", String.valueOf(o.getDelay())); ! eFrame.setAttribute("scale", String.valueOf(o.getScale())); ! ! this.peekCurrentNode().appendChild(eFrame); ! this.pushCurrentNode(eFrame); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Server o) { ! logger.debug("Server"); ! ! Element server = this.document.createElement("management-server"); ! server.setAttribute("name", o.getName()); ! server.setAttribute("connected", "" + o.isConnected()); ! ! this.peekCurrentNode().appendChild(server); ! this.pushCurrentNode(server); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Browser o) { ! logger.debug("Browser"); ! ! Element workbench = this.document.createElement("workbench"); ! ! this.peekCurrentNode().appendChild(workbench); ! this.pushCurrentNode(workbench); ! this.persist(Sort.getChildrenByClass(o.iterator(), GraphInternalFrame.class)); ! this.persist(Sort.getChildrenByClass(o.iterator(), ServerInternalFrame.class)); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(ManagedObject o) { ! try { ! int g = o.getGraphProducers().size(); ! boolean notif = o.isRegisteredForNotifications(); ! ! if ((g > 0) || notif) { ! Element resource = this.document.createElement("management-object"); ! resource.setAttribute("objectName", o.getCanonicalName()); ! ! if (notif) { ! resource.setAttribute("listen", "true"); ! } ! if (g > 0) { ! GraphConsumer[] consumers = o.getGraphConsumers(); ! ! for (Iterator iterator = o.getGraphProducers().keySet().iterator(); iterator.hasNext(); ) { ! String attribute = (String) iterator.next(); ! GraphProducer producer = (GraphProducer) o.getGraphProducers().get(attribute); ! ! GraphConsumer consumer = null; ! for (int i = 0; i < consumers.length; i++) { ! GraphConsumer gc = consumers[i]; ! if (gc.containsGraphProducer(producer)) { ! consumer = gc; ! } ! } ! if (consumer != null) { ! Element graph = this.document.createElement("management-graph"); ! graph.setAttribute("attribute", attribute); ! graph.setAttribute("target", consumer.toString()); ! resource.appendChild(graph); ! } ! //else ! //{ ! // logger.warn("A graph producer is not linked to a graph consumer !!!"); ! //} ! } ! } ! this.peekCurrentNode().appendChild(resource); ! this.pushCurrentNode(resource); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! } catch (Exception e) { ! e.printStackTrace(); ! } ! } ! } |
From: <let...@us...> - 2003-12-14 08:40:53
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser Modified Files: AboutDialog.java Browser.java Main.java Log Message: Add more javadocs. Adjust workspace persistence. Index: AboutDialog.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/AboutDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AboutDialog.java 27 Nov 2003 01:39:47 -0000 1.3 --- AboutDialog.java 13 Dec 2003 22:31:56 -0000 1.4 *************** *** 1,107 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser; ! ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Container; ! import java.awt.GridLayout; ! import java.util.ResourceBundle; ! ! import javax.swing.ImageIcon; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.SwingConstants; ! import javax.swing.UIManager; ! ! import org.ejtools.adwt.service.AboutService; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public final class AboutDialog implements AboutService ! { ! /** Description of the Field */ ! private JPanel panel = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** Constructor for the AboutServiceProvider object */ ! public AboutDialog() { } ! ! ! /** ! * Gets the panel attribute of the AboutDialog object ! * ! * @return The panel value ! */ ! public Container getPanel() ! { ! if (this.panel == null) ! { ! this.createPanel(); ! } ! return this.panel; ! } ! ! ! /** ! * Description of the Method ! * ! * @return The title value ! */ ! public String getTitle() ! { ! return resources.getString("about.dialog.title"); ! } ! ! ! /** Creation of the panel to show */ ! protected void createPanel() ! { ! this.panel = new JPanel(new BorderLayout()); ! ! // North part of the panel ! this.panel.add("North", new JLabel(new ImageIcon(getClass().getResource("/images/logo.png")))); ! ! // Center part of the panel ! this.panel.add("Center", new JLabel(" ")); ! ! // South part of the panel ! JPanel info = new JPanel(new GridLayout(3, 1)); ! ! JLabel java = new JLabel( ! resources.getString("about.dialog.text.javaVersion") ! + " : " ! + System.getProperty("java.version"), SwingConstants.LEADING); ! java.setForeground(Color.black); ! info.add(java); ! ! JLabel vm = new JLabel( ! resources.getString("about.dialog.text.virtualMachine") ! + " : " ! + System.getProperty("java.vm.name") ! + ", " ! + System.getProperty("java.vm.version"), SwingConstants.LEADING); ! vm.setForeground(Color.black); ! info.add(vm); ! ! JLabel laf = new JLabel( ! resources.getString("about.dialog.text.lookAndFeel") ! + " : " ! + UIManager.getLookAndFeel().getName(), SwingConstants.LEADING); ! vm.setForeground(Color.black); ! info.add(laf); ! this.panel.add("South", info); ! } ! } ! --- 1,107 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser; ! ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Container; ! import java.awt.GridLayout; ! import java.util.ResourceBundle; ! ! import javax.swing.ImageIcon; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.SwingConstants; ! import javax.swing.UIManager; ! ! import org.ejtools.adwt.service.AboutService; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public final class AboutDialog implements AboutService ! { ! /** Description of the Field */ ! private JPanel panel = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** Constructor for the AboutServiceProvider object */ ! public AboutDialog() { } ! ! ! /** ! * Gets the panel attribute of the AboutDialog object ! * ! * @return The panel value ! */ ! public Container getPanel() ! { ! if (this.panel == null) ! { ! this.createPanel(); ! } ! return this.panel; ! } ! ! ! /** ! * Description of the Method ! * ! * @return The title value ! */ ! public String getTitle() ! { ! return resources.getString("about.dialog.title"); ! } ! ! ! /** Creation of the panel to show */ ! protected void createPanel() ! { ! this.panel = new JPanel(new BorderLayout()); ! ! // North part of the panel ! this.panel.add("North", new JLabel(new ImageIcon(getClass().getResource("/images/logo.png")))); ! ! // Center part of the panel ! this.panel.add("Center", new JLabel(" ")); ! ! // South part of the panel ! JPanel info = new JPanel(new GridLayout(3, 1)); ! ! JLabel java = new JLabel( ! resources.getString("about.dialog.text.javaVersion") ! + " : " ! + System.getProperty("java.version"), SwingConstants.LEADING); ! java.setForeground(Color.black); ! info.add(java); ! ! JLabel vm = new JLabel( ! resources.getString("about.dialog.text.virtualMachine") ! + " : " ! + System.getProperty("java.vm.name") ! + ", " ! + System.getProperty("java.vm.version"), SwingConstants.LEADING); ! vm.setForeground(Color.black); ! info.add(vm); ! ! JLabel laf = new JLabel( ! resources.getString("about.dialog.text.lookAndFeel") ! + " : " ! + UIManager.getLookAndFeel().getName(), SwingConstants.LEADING); ! vm.setForeground(Color.black); ! info.add(laf); ! this.panel.add("South", info); ! } ! } ! Index: Browser.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/Browser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Browser.java 27 Nov 2003 01:39:47 -0000 1.4 --- Browser.java 13 Dec 2003 22:31:56 -0000 1.5 *************** *** 9,12 **** --- 9,13 ---- import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; + import java.io.File; import java.net.URL; import java.util.Arrays; *************** *** 18,22 **** import org.apache.log4j.Logger; - import org.ejtools.adwt.FileUtil; import org.ejtools.adwt.LookAndFeelUtil; import org.ejtools.adwt.action.Command; --- 19,22 ---- *************** *** 39,44 **** --- 39,46 ---- import org.ejtools.management.browser.model.service.ConnectionMetaData; import org.ejtools.management.browser.state.WorkbenchState; + import org.ejtools.util.FileTools; import org.ejtools.util.service.Profile; import org.ejtools.util.service.ProfileServiceProvider; + import org.ejtools.util.state.WorkspaceFileTools; /** *************** *** 46,51 **** * * @author Laurent Etiemble - * @created 17 novembre 2003 * @version $Revision$ * @todo Javadoc to complete */ --- 48,53 ---- * * @author Laurent Etiemble * @version $Revision$ + * @created 17 novembre 2003 * @todo Javadoc to complete */ *************** *** 150,157 **** try { ! URL selectedURL = FileUtil.selectWorkspaceFile(resources.getString("file.dialog.title.load"), JFileChooser.OPEN_DIALOG); ! if (selectedURL != null) { ! loadResource(selectedURL, null); } } --- 152,159 ---- try { ! File selectedFile = FileTools.selectFile(resources.getString("file.dialog.title.load"), resources.getString("file.dialog.button.load"), JFileChooser.OPEN_DIALOG, WorkspaceFileTools.WORKSPACE_FILE_FILTER); ! if (selectedFile != null) { ! Browser.this.loadResource(selectedFile.toURL(), null); } } *************** *** 174,181 **** if (Browser.this.stateManager.getWorkbenchURL() == null) { ! URL selectedURL = FileUtil.selectWorkspaceFile(resources.getString("file.dialog.title.save"), JFileChooser.SAVE_DIALOG); ! if (selectedURL != null) { ! Browser.this.stateManager.setWorkbenchURL(selectedURL); } } --- 176,183 ---- if (Browser.this.stateManager.getWorkbenchURL() == null) { ! File selectedFile = FileTools.selectFile(resources.getString("file.dialog.title.save"), resources.getString("file.dialog.button.save"), JFileChooser.SAVE_DIALOG, WorkspaceFileTools.WORKSPACE_FILE_FILTER); ! if (selectedFile != null) { ! Browser.this.stateManager.setWorkbenchURL(selectedFile.toURL()); } } *************** *** 200,207 **** try { ! URL selectedURL = FileUtil.selectWorkspaceFile(resources.getString("file.dialog.title.save"), JFileChooser.SAVE_DIALOG); ! if (selectedURL != null) { ! Browser.this.stateManager.setWorkbenchURL(selectedURL); Browser.this.stateManager.store(); } --- 202,209 ---- try { ! File selectedFile = FileTools.selectFile(resources.getString("file.dialog.title.save"), resources.getString("file.dialog.button.save"), JFileChooser.SAVE_DIALOG, WorkspaceFileTools.WORKSPACE_FILE_FILTER); ! if (selectedFile != null) { ! Browser.this.stateManager.setWorkbenchURL(selectedFile.toURL()); Browser.this.stateManager.store(); } Index: Main.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/Main.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.java 27 Nov 2003 01:39:47 -0000 1.4 --- Main.java 13 Dec 2003 22:31:56 -0000 1.5 *************** *** 1,117 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser; ! ! import java.beans.Beans; ! import java.io.File; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.security.AccessController; ! import java.security.Permission; ! import java.security.PrivilegedExceptionAction; ! import java.util.LinkedList; ! ! import org.apache.log4j.Logger; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class Main ! { ! /** Default logger */ ! private static Logger logger = Logger.getLogger(Main.class); ! ! ! /** ! * The main program for the Main class ! * ! * @param args The command line arguments ! * @exception Exception Description of the Exception ! */ ! public static void main(String[] args) ! throws Exception ! { ! logger.debug("========================================"); ! logger.debug("JAVA_HOME : " + System.getProperty("java.home")); ! logger.debug("Vendor : " + System.getProperty("java.vendor")); ! logger.debug("Version : " + System.getProperty("java.version")); ! logger.debug("Operating Sys. : " + System.getProperty("os.name")); ! logger.debug("Architecture : " + System.getProperty("os.arch")); ! logger.debug("Version : " + System.getProperty("os.version")); ! logger.debug("========================================"); ! ! File pluginDir; ! File[] plugins; ! LinkedList list = new LinkedList(); ! ! logger.debug("Building classpath..."); ! ! // Store the files from lib directory ! logger.debug("Scanning lib directory..."); ! pluginDir = new File("../lib"); ! plugins = pluginDir.listFiles(); ! if (plugins != null) ! { ! for (int i = 0; i < plugins.length; i++) ! { ! logger.debug("Found " + plugins[i].toURL()); ! list.add(plugins[i].toURL()); ! } ! } ! ! // Store the files from lib/ext directory ! logger.debug("Scanning lib/ext directory..."); ! pluginDir = new File("../lib/ext"); ! plugins = pluginDir.listFiles(); ! if (plugins != null) ! { ! for (int i = 0; i < plugins.length; i++) ! { ! logger.debug("Found " + plugins[i].toURL()); ! list.add(plugins[i].toURL()); ! } ! } ! logger.debug("========================================"); ! ! // Create a custom classloader ! URL[] pluginURLs = (URL[]) list.toArray(new URL[list.size()]); ! Thread.currentThread().setContextClassLoader( ! new URLClassLoader(pluginURLs, Thread.currentThread().getContextClassLoader()) ! ); ! ! // Custom security manager ! System.setSecurityManager( ! new SecurityManager() ! { ! public void checkPermission(Permission p) { } ! ! ! public void checkPermission(Permission perm, Object context) { } ! }); ! ! // Create the Management Browser JavaBean ! logger.debug("Launching EJTools Management Browser"); ! AccessController.doPrivileged( ! new PrivilegedExceptionAction() ! { ! public Object run() ! throws Exception ! { ! Beans.instantiate( ! Thread.currentThread().getContextClassLoader(), ! "org.ejtools.management.browser.Browser" ! ); ! return null; ! } ! }); ! } ! } ! --- 1,117 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser; ! ! import java.beans.Beans; ! import java.io.File; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.security.AccessController; ! import java.security.Permission; ! import java.security.PrivilegedExceptionAction; ! import java.util.LinkedList; ! ! import org.apache.log4j.Logger; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class Main ! { ! /** Default logger */ ! private static Logger logger = Logger.getLogger(Main.class); ! ! ! /** ! * The main program for the Main class ! * ! * @param args The command line arguments ! * @exception Exception Description of the Exception ! */ ! public static void main(String[] args) ! throws Exception ! { ! logger.debug("========================================"); ! logger.debug("JAVA_HOME : " + System.getProperty("java.home")); ! logger.debug("Vendor : " + System.getProperty("java.vendor")); ! logger.debug("Version : " + System.getProperty("java.version")); ! logger.debug("Operating Sys. : " + System.getProperty("os.name")); ! logger.debug("Architecture : " + System.getProperty("os.arch")); ! logger.debug("Version : " + System.getProperty("os.version")); ! logger.debug("========================================"); ! ! File pluginDir; ! File[] plugins; ! LinkedList list = new LinkedList(); ! ! logger.debug("Building classpath..."); ! ! // Store the files from lib directory ! logger.debug("Scanning lib directory..."); ! pluginDir = new File("../lib"); ! plugins = pluginDir.listFiles(); ! if (plugins != null) ! { ! for (int i = 0; i < plugins.length; i++) ! { ! logger.debug("Found " + plugins[i].toURL()); ! list.add(plugins[i].toURL()); ! } ! } ! ! // Store the files from lib/ext directory ! logger.debug("Scanning lib/ext directory..."); ! pluginDir = new File("../lib/ext"); ! plugins = pluginDir.listFiles(); ! if (plugins != null) ! { ! for (int i = 0; i < plugins.length; i++) ! { ! logger.debug("Found " + plugins[i].toURL()); ! list.add(plugins[i].toURL()); ! } ! } ! logger.debug("========================================"); ! ! // Create a custom classloader ! URL[] pluginURLs = (URL[]) list.toArray(new URL[list.size()]); ! Thread.currentThread().setContextClassLoader( ! new URLClassLoader(pluginURLs, Thread.currentThread().getContextClassLoader()) ! ); ! ! // Custom security manager ! System.setSecurityManager( ! new SecurityManager() ! { ! public void checkPermission(Permission p) { } ! ! ! public void checkPermission(Permission perm, Object context) { } ! }); ! ! // Create the Management Browser JavaBean ! logger.debug("Launching EJTools Management Browser"); ! AccessController.doPrivileged( ! new PrivilegedExceptionAction() ! { ! public Object run() ! throws Exception ! { ! Beans.instantiate( ! Thread.currentThread().getContextClassLoader(), ! "org.ejtools.management.browser.Browser" ! ); ! return null; ! } ! }); ! } ! } ! |
From: <let...@us...> - 2003-12-14 08:40:52
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/action In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser/action Modified Files: ShowNotificationsAction.java Log Message: Add more javadocs. Adjust workspace persistence. Index: ShowNotificationsAction.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/action/ShowNotificationsAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ShowNotificationsAction.java 27 Nov 2003 01:39:47 -0000 1.3 --- ShowNotificationsAction.java 13 Dec 2003 22:31:56 -0000 1.4 *************** *** 1,41 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ShowNotificationsAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** ! * Constructor for the CopyAction object ! * ! * @param command Description of Parameter ! */ ! public ShowNotificationsAction(Command command) ! { ! super(command, resources, "action.view.notifications"); ! this.setMenu("action.view"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/History16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/History24.gif"); ! } ! } ! --- 1,41 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ShowNotificationsAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** ! * Constructor for the CopyAction object ! * ! * @param command Description of Parameter ! */ ! public ShowNotificationsAction(Command command) ! { ! super(command, resources, "action.view.notifications"); ! this.setMenu("action.view"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/History16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/History24.gif"); ! } ! } ! |
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser/frame Modified Files: NotificationsInternalFrame.java ResourceIndexer.java ResourceRenderer.java ServerInternalFrame.java Log Message: Add more javadocs. Adjust workspace persistence. Index: NotificationsInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/NotificationsInternalFrame.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NotificationsInternalFrame.java 27 Nov 2003 01:39:47 -0000 1.3 --- NotificationsInternalFrame.java 13 Dec 2003 22:31:56 -0000 1.4 *************** *** 1,59 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JScrollPane; ! ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.management.browser.model.service.NotificationServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class NotificationsInternalFrame extends BeanContextInternalFrame ! { ! /** Description of the Field */ ! protected NotificationServiceProvider provider = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** ! * Constructor for GraphInternalFrame. ! * ! * @param provider Description of the Parameter ! */ ! public NotificationsInternalFrame(NotificationServiceProvider provider) ! { ! super(); ! ! this.provider = provider; ! ! JScrollPane pane = new JScrollPane(this.provider.getComponent()); ! this.frame.getContentPane().add(BorderLayout.CENTER, pane); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("notification.text.prefix") + " : " + newName); ! } ! } ! } --- 1,59 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JScrollPane; ! ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.management.browser.model.service.NotificationServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class NotificationsInternalFrame extends BeanContextInternalFrame ! { ! /** Description of the Field */ ! protected NotificationServiceProvider provider = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** ! * Constructor for GraphInternalFrame. ! * ! * @param provider Description of the Parameter ! */ ! public NotificationsInternalFrame(NotificationServiceProvider provider) ! { ! super(); ! ! this.provider = provider; ! ! JScrollPane pane = new JScrollPane(this.provider.getComponent()); ! this.frame.getContentPane().add(BorderLayout.CENTER, pane); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("notification.text.prefix") + " : " + newName); ! } ! } ! } Index: ResourceIndexer.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/ResourceIndexer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ResourceIndexer.java 27 Nov 2003 01:39:47 -0000 1.4 --- ResourceIndexer.java 13 Dec 2003 22:31:56 -0000 1.5 *************** *** 1,49 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import org.ejtools.adwt.util.DefaultObjectIndexer; ! import org.ejtools.management.browser.model.ManagedObject; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ResourceIndexer extends DefaultObjectIndexer ! { ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object put(Object key, Object value) ! { ! if (key instanceof ManagedObject) ! { ! return super.put(((ManagedObject) key).getCanonicalName(), value); ! } ! return super.put(key, value); ! } ! ! ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object remove(Object key) ! { ! if (key instanceof ManagedObject) ! { ! return super.remove(((ManagedObject) key).getCanonicalName()); ! } ! return super.remove(key); ! } ! } --- 1,49 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import org.ejtools.adwt.util.DefaultObjectIndexer; ! import org.ejtools.management.browser.model.ManagedObject; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ResourceIndexer extends DefaultObjectIndexer ! { ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object put(Object key, Object value) ! { ! if (key instanceof ManagedObject) ! { ! return super.put(((ManagedObject) key).getCanonicalName(), value); ! } ! return super.put(key, value); ! } ! ! ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object remove(Object key) ! { ! if (key instanceof ManagedObject) ! { ! return super.remove(((ManagedObject) key).getCanonicalName()); ! } ! return super.remove(key); ! } ! } Index: ResourceRenderer.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/ResourceRenderer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ResourceRenderer.java 27 Nov 2003 01:39:47 -0000 1.5 --- ResourceRenderer.java 13 Dec 2003 22:31:56 -0000 1.6 *************** *** 1,95 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import java.awt.Image; ! import java.io.IOException; ! import java.io.InputStream; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Properties; ! ! import javax.swing.Icon; ! import javax.swing.ImageIcon; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.util.DefaultObjectRenderer; ! import org.ejtools.management.browser.model.ManagedObject; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ResourceRenderer extends DefaultObjectRenderer ! { ! /** Description of the Field */ ! private static Hashtable icons = new Hashtable(); ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ResourceRenderer.class); ! ! ! /** ! * Gets the icon attribute of the ResourceRenderer object ! * ! * @param o Description of the Parameter ! * @return The icon value ! */ ! public Icon getIcon(Object o) ! { ! if (o instanceof ManagedObject) ! { ! ManagedObject resource = (ManagedObject) o; ! String type = resource.getJ2EEType(); ! Icon icon = (Icon) icons.get(type); ! if (icon == null) ! { ! if (type.endsWith("Module")) ! { ! icon = (Icon) icons.get("J2EEModule"); ! } ! else ! { ! icon = (Icon) icons.get("J2EEDeployedObject"); ! } ! } ! return icon; ! } ! ! return super.getIcon(o); ! } ! ! /** Static block to load the icons */ ! static ! { ! try ! { ! InputStream in = ResourceRenderer.class.getResourceAsStream("/org/ejtools/management/browser/Icons.properties"); ! Properties props = new Properties(); ! props.load(in); ! in.close(); ! ! for (Iterator iterator = props.keySet().iterator(); iterator.hasNext(); ) ! { ! String type = (String) iterator.next(); ! String resource = props.getProperty(type); ! Image image = loadImage(resource); ! if (image != null) ! { ! icons.put(type, new ImageIcon(image)); ! } ! } ! } ! catch (IOException ioe) ! { ! logger.error("Error while loading Icons.properties", ioe); ! } ! catch (Exception e) ! { ! logger.error("Error while loading Icons.properties", e); ! } ! } ! } --- 1,95 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import java.awt.Image; ! import java.io.IOException; ! import java.io.InputStream; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Properties; ! ! import javax.swing.Icon; ! import javax.swing.ImageIcon; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.util.DefaultObjectRenderer; ! import org.ejtools.management.browser.model.ManagedObject; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ResourceRenderer extends DefaultObjectRenderer ! { ! /** Description of the Field */ ! private static Hashtable icons = new Hashtable(); ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ResourceRenderer.class); ! ! ! /** ! * Gets the icon attribute of the ResourceRenderer object ! * ! * @param o Description of the Parameter ! * @return The icon value ! */ ! public Icon getIcon(Object o) ! { ! if (o instanceof ManagedObject) ! { ! ManagedObject resource = (ManagedObject) o; ! String type = resource.getJ2EEType(); ! Icon icon = (Icon) icons.get(type); ! if (icon == null) ! { ! if (type.endsWith("Module")) ! { ! icon = (Icon) icons.get("J2EEModule"); ! } ! else ! { ! icon = (Icon) icons.get("J2EEDeployedObject"); ! } ! } ! return icon; ! } ! ! return super.getIcon(o); ! } ! ! /** Static block to load the icons */ ! static ! { ! try ! { ! InputStream in = ResourceRenderer.class.getResourceAsStream("/org/ejtools/management/browser/Icons.properties"); ! Properties props = new Properties(); ! props.load(in); ! in.close(); ! ! for (Iterator iterator = props.keySet().iterator(); iterator.hasNext(); ) ! { ! String type = (String) iterator.next(); ! String resource = props.getProperty(type); ! Image image = loadImage(resource); ! if (image != null) ! { ! icons.put(type, new ImageIcon(image)); ! } ! } ! } ! catch (IOException ioe) ! { ! logger.error("Error while loading Icons.properties", ioe); ! } ! catch (Exception e) ! { ! logger.error("Error while loading Icons.properties", e); ! } ! } ! } Index: ServerInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/ServerInternalFrame.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ServerInternalFrame.java 27 Nov 2003 01:39:47 -0000 1.3 --- ServerInternalFrame.java 13 Dec 2003 22:31:56 -0000 1.4 *************** *** 1,215 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.management.browser.action.ShowNotificationsAction; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.management.browser.model.service.CacheService; ! import org.ejtools.management.browser.model.service.CacheServiceProvider; ! import org.ejtools.management.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.management.browser.model.service.NotificationServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected NotificationsInternalFrame notificationFrame; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** ! * Constructor for ServerInternalFrame. ! * ! * @param profile Description of the Parameter ! */ ! public ServerInternalFrame() ! { ! super(); ! } ! ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public ManagedObject queryMBean(String objectName) ! { ! ManagedObject resource = (ManagedObject) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! logger.warn("Cannot find ObjectName " + objectName, e); ! } ! return null; ! } ! ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the server attribute of the ServerInternalFrame object ! * ! * @param server The new server value ! */ ! public void setServer(Server server) ! { ! this.connectionProvider = new ConnectionServiceProvider(); ! this.cacheProvider = new CacheServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = new Server(); ! this.server.setProfile(profile); ! ! this.add(this.connectionProvider); ! this.add(this.cacheProvider); ! this.add(this.notificationProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.notificationFrame = new NotificationsInternalFrame(this.notificationProvider); ! ! this.server.addPropertyChangeListener("name", this); ! this.server.addPropertyChangeListener("name", this.notificationFrame); ! ! this.add(new RefreshAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new ShowNotificationsAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.showNotificationFrame(); ! } ! })); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.setIndexer(new ResourceIndexer()); ! panel.setRenderer(new ResourceRenderer()); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.NORTH, this.toolbarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.CENTER, panel); ! } ! ! ! /** ! * Gets the profile attribute of the ServerInternalFrame object ! * ! * @return The profile value ! */ ! public Profile getProfile() ! { ! return this.profile; ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** Description of the Method */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** Description of the Method */ ! protected void releaseBeanContextResources() ! { ! this.notificationFrame.close(); ! this.server.clear(); ! super.releaseBeanContextResources(); ! } ! ! ! /** Description of the Method */ ! protected void showNotificationFrame() ! { ! NotificationsInternalFrame frame = ServerInternalFrame.this.notificationFrame; ! if (!this.getBeanContext().contains(frame)) ! { ! this.getBeanContext().add(frame); ! } ! frame.activate(); ! } ! } --- 1,215 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.management.browser.action.ShowNotificationsAction; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.management.browser.model.service.CacheService; ! import org.ejtools.management.browser.model.service.CacheServiceProvider; ! import org.ejtools.management.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.management.browser.model.service.NotificationServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected NotificationsInternalFrame notificationFrame; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /** ! * Constructor for ServerInternalFrame. ! * ! * @param profile Description of the Parameter ! */ ! public ServerInternalFrame() ! { ! super(); ! } ! ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public ManagedObject queryMBean(String objectName) ! { ! ManagedObject resource = (ManagedObject) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! logger.warn("Cannot find ObjectName " + objectName, e); ! } ! return null; ! } ! ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the server attribute of the ServerInternalFrame object ! * ! * @param server The new server value ! */ ! public void setServer(Server server) ! { ! this.connectionProvider = new ConnectionServiceProvider(); ! this.cacheProvider = new CacheServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = new Server(); ! this.server.setProfile(profile); ! ! this.add(this.connectionProvider); ! this.add(this.cacheProvider); ! this.add(this.notificationProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.notificationFrame = new NotificationsInternalFrame(this.notificationProvider); ! ! this.server.addPropertyChangeListener("name", this); ! this.server.addPropertyChangeListener("name", this.notificationFrame); ! ! this.add(new RefreshAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new ShowNotificationsAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.showNotificationFrame(); ! } ! })); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.setIndexer(new ResourceIndexer()); ! panel.setRenderer(new ResourceRenderer()); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.NORTH, this.toolbarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.CENTER, panel); ! } ! ! ! /** ! * Gets the profile attribute of the ServerInternalFrame object ! * ! * @return The profile value ! */ ! public Profile getProfile() ! { ! return this.profile; ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** Description of the Method */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** Description of the Method */ ! protected void releaseBeanContextResources() ! { ! this.notificationFrame.close(); ! this.server.clear(); ! super.releaseBeanContextResources(); ! } ! ! ! /** Description of the Method */ ! protected void showNotificationFrame() ! { ! NotificationsInternalFrame frame = ServerInternalFrame.this.notificationFrame; ! if (!this.getBeanContext().contains(frame)) ! { ! this.getBeanContext().add(frame); ! } ! frame.activate(); ! } ! } |
From: <let...@us...> - 2003-12-14 08:40:51
|
Update of /cvsroot/ejtools/applications/management.browser In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser Modified Files: project.properties project.xml Log Message: Add more javadocs. Adjust workspace persistence. Index: project.properties =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/project.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.properties 10 Mar 2003 22:13:15 -0000 1.3 --- project.properties 13 Dec 2003 22:31:56 -0000 1.4 *************** *** 27,29 **** maven.ejtools.app.launch.class=org.ejtools.management.browser.Main maven.ejtools.app.launch.includes=org/ejtools/management/browser/Main*.* ! maven.ejtools.app.launch.classpath=../conf/ ../lib/log4j-1.2.7.jar --- 27,29 ---- maven.ejtools.app.launch.class=org.ejtools.management.browser.Main maven.ejtools.app.launch.includes=org/ejtools/management/browser/Main*.* ! maven.ejtools.app.launch.classpath=../conf/ ../lib/log4j-1.2.8.jar Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/project.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** project.xml 27 Nov 2003 01:39:47 -0000 1.4 --- project.xml 13 Dec 2003 22:31:56 -0000 1.5 *************** *** 15,18 **** --- 15,19 ---- <groupId>ejtools</groupId> <name>Management Browser</name> + <description>A tool which allows to view and interact with a JSR77 compliant J2EE server.</description> <currentVersion>1.0.0</currentVersion> <package>org/ejtools/management/browser</package> *************** *** 21,25 **** <dependency> <id>log4j</id> ! <version>1.2.7</version> <properties> <app.bundle.jar>true</app.bundle.jar> --- 22,26 ---- <dependency> <id>log4j</id> ! <version>1.2.8</version> <properties> <app.bundle.jar>true</app.bundle.jar> *************** *** 29,38 **** <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> ! <version>1.1</version> </dependency> <dependency> <id>mx4j</id> <artifactId>mx4j-tools</artifactId> ! <version>1.1</version> </dependency> <!-- Project dependencies --> --- 30,39 ---- <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> ! <version>1.1.1</version> </dependency> <dependency> <id>mx4j</id> <artifactId>mx4j-tools</artifactId> ! <version>1.1.1</version> </dependency> <!-- Project dependencies --> |
From: <let...@us...> - 2003-12-14 08:40:47
|
Update of /cvsroot/ejtools/applications/jndi.browser/xdocs In directory sc8-pr-cvs1:/tmp/cvs-serv20500/jndi.browser/xdocs Added Files: manual.xml Log Message: Add more javadocs. Adjust workspace persistence. --- NEW FILE: manual.xml --- <?xml version="1.0"?> <!-- # ================================================================================ # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at gnu.org. # # $Revision: 1.1 $ # ================================================================================ --> <document> <properties> <title>JNDI Browser</title> </properties> <body> <section name="Manuals"> <p>The EJTools JNDI Browser manual is available under three forms :<ul> <li>A large HTML file : browse <a href="manual/large.html">here</a> </li> <li>Chuncked HTML files : browse <a href="manual/index.html">here</a> </li> <li>PDF document : download <a href="manual/large.html">here</a> </li> </ul> </p> </section> </body> </document> |
From: <let...@us...> - 2003-12-14 08:40:47
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/resources/org/ejtools/jndi/browser In directory sc8-pr-cvs1:/tmp/cvs-serv20500/jndi.browser/src/resources/org/ejtools/jndi/browser Modified Files: Resources.properties Resources_fr_FR.properties Log Message: Add more javadocs. Adjust workspace persistence. Index: Resources.properties =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/resources/org/ejtools/jndi/browser/Resources.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Resources.properties 27 Nov 2003 01:30:30 -0000 1.2 --- Resources.properties 13 Dec 2003 22:29:07 -0000 1.3 *************** *** 40,43 **** --- 40,45 ---- file.dialog.title.load=Load Workspace file.dialog.title.save=Save Workspace + file.dialog.button.load=Load + file.dialog.button.save=Save Index: Resources_fr_FR.properties =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/resources/org/ejtools/jndi/browser/Resources_fr_FR.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Resources_fr_FR.properties 27 Nov 2003 01:30:30 -0000 1.2 --- Resources_fr_FR.properties 13 Dec 2003 22:29:07 -0000 1.3 *************** *** 38,42 **** # Text for open/save dialog box file.dialog.title.load=Ouvrir Configuration ! file.dialog.title.save=Save Configuration --- 38,44 ---- # Text for open/save dialog box file.dialog.title.load=Ouvrir Configuration ! file.dialog.title.save=Sauver Configuration ! file.dialog.button.load=Ouvrir ! file.dialog.button.save=Sauver |
From: <let...@us...> - 2003-12-14 08:40:47
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/action In directory sc8-pr-cvs1:/tmp/cvs-serv20500/jndi.browser/src/main/org/ejtools/jndi/browser/web/action Modified Files: RefreshAction.java Log Message: Add more javadocs. Adjust workspace persistence. Index: RefreshAction.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/action/RefreshAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RefreshAction.java 27 Nov 2003 01:30:30 -0000 1.5 --- RefreshAction.java 13 Dec 2003 22:29:07 -0000 1.6 *************** *** 1,268 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web.action; ! ! import java.io.IOException; ! import java.util.ArrayList; ! import java.util.Collection; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Locale; ! import java.util.Vector; ! ! import javax.management.MBeanServer; ! import javax.management.MBeanServerFactory; ! import javax.management.ObjectName; ! import javax.servlet.ServletContext; ! import javax.servlet.ServletException; ! import javax.servlet.http.HttpServletRequest; ! import javax.servlet.http.HttpServletResponse; ! ! import org.apache.log4j.Logger; ! import org.apache.struts.action.Action; ! import org.apache.struts.action.ActionErrors; ! import org.apache.struts.action.ActionForm; ! import org.apache.struts.action.ActionForward; ! import org.apache.struts.action.ActionMapping; ! import org.apache.struts.util.MessageResources; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.jndi.browser.web.Constants; ! import org.ejtools.jndi.browser.web.JNDIContainer; ! import org.jboss.ejb.Container; ! import org.jboss.ejb.EjbModule; ! import org.jboss.web.WebApplication; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 12 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class RefreshAction extends Action ! { ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(RefreshAction.class); ! ! ! /** Constructor for the ViewAction object */ ! public RefreshAction() { } ! ! ! /** ! * Description of the Method ! * ! * @param mapping Description of Parameter ! * @param form Description of Parameter ! * @param request Description of Parameter ! * @param response Description of Parameter ! * @return Description of the Returned Value ! * @exception IOException Description of Exception ! * @exception ServletException Description of Exception ! */ ! public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ! throws IOException, ServletException ! { ! // Extract attributes we will need ! Locale locale = getLocale(request); ! MessageResources messages = getResources(); ! ! // Validate the request parameters specified by the user ! ActionErrors errors = new ActionErrors(); ! ! logger.debug("Connecting to JNDI..."); ! ! // Report any errors we have discovered back to the original form ! if (!errors.empty()) ! { ! saveErrors(request, errors); ! return (new ActionForward(mapping.getInput())); ! } ! ! ServletContext context = this.getServlet().getServletContext(); ! ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); ! ! // ======================================== ! // Refresh the global jndi tree ! // ======================================== ! JNDIContainer globalTree = (JNDIContainer) context.getAttribute(Constants.GLOBAL_TREE); ! logger.debug("globalTree=" + globalTree); ! if (globalTree == null) ! { ! globalTree = new JNDIContainer(); ! globalTree.setClassLoader(currentClassLoader); ! globalTree.setContext(""); ! context.setAttribute(Constants.GLOBAL_TREE, globalTree); ! } ! logger.debug("refresh globalTree"); ! globalTree.refresh(); ! ! // ======================================== ! // Refresh the global jndi tree ! // ======================================== ! JNDIContainer localTree = (JNDIContainer) context.getAttribute(Constants.LOCAL_TREE); ! logger.debug("localTree=" + localTree); ! if (localTree == null) ! { ! localTree = new JNDIContainer(); ! localTree.setClassLoader(currentClassLoader); ! localTree.setContext("java:/"); ! context.setAttribute(Constants.LOCAL_TREE, localTree); ! } ! logger.debug("refresh localTree"); ! localTree.refresh(); ! ! // **************************************** ! // JBoss specific code ! // **************************************** ! ArrayList list = MBeanServerFactory.findMBeanServer(null); ! if ((list != null) && (list.size() > 0)) ! { ! Iterator iterator = null; ! MBeanServer server = (MBeanServer) list.get(0); ! logger.debug("server=" + server); ! ! try ! { ! // ======================================== ! // Refresh the ejb modules ! // ======================================== ! Vector moduleNames = new Vector(); ! Hashtable moduleTrees = (Hashtable) context.getAttribute(Constants.EJBMODULE_TREES); ! if (moduleTrees == null) ! { ! moduleTrees = new Hashtable(); ! } ! Hashtable newModuleTrees = new Hashtable(); ! ! // @todo Get from an env-entry ! iterator = server.queryNames(EjbModule.EJB_MODULE_QUERY_NAME, null).iterator(); ! while (iterator.hasNext()) ! { ! try ! { ! ObjectName module = (ObjectName) iterator.next(); ! logger.debug("module=" + module); ! String moduleName = (String) module.getKeyProperty("module"); ! String moduleUid = (String) module.getKeyProperty("uid"); ! if ((moduleUid != null) && (!"".equals(moduleUid))) ! { ! moduleName = moduleName + " (" + moduleUid + ")"; ! } ! moduleNames.add(ResponseUtils.filter(moduleName)); ! logger.debug("moduleName=" + moduleName); ! ! // Get the containes from the module ! Vector containers = (Vector) moduleTrees.get(moduleName); ! if (containers == null) ! { ! containers = new Vector(); ! } ! Vector newContainers = new Vector(); ! ! // Create a search table ! Hashtable ejbTable = new Hashtable(); ! for (Iterator it = containers.iterator(); it.hasNext(); ) ! { ! JNDIContainer container = (JNDIContainer) it.next(); ! ejbTable.put(container.getName(), container); ! } ! ! Collection moduleContainers = (Collection) server.getAttribute(module, "Containers"); ! for (Iterator iter = moduleContainers.iterator(); iter.hasNext(); ) ! { ! Container ejbContainer = (Container) iter.next(); ! String ejbName = ejbContainer.getBeanMetaData().getEjbName(); ! JNDIContainer container = (JNDIContainer) ejbTable.get(ejbName); ! logger.debug("container=" + container); ! if (container == null) ! { ! container = new JNDIContainer(); ! container.setName(ejbName); ! container.setClassLoader(ejbContainer.getClassLoader()); ! container.setContext("java:/comp"); ! } ! logger.debug("refresh container"); ! newContainers.add(container); ! container.refresh(); ! } ! newModuleTrees.put(ResponseUtils.filter(moduleName), newContainers); ! containers.clear(); ! } ! catch (Exception e) ! { ! logger.error("Error while refreshing getting module", e); ! } ! } ! context.setAttribute(Constants.EJBMODULE_NAMES, moduleNames); ! context.setAttribute(Constants.EJBMODULE_TREES, newModuleTrees); ! context.setAttribute(Constants.EJBMODULE_TREE, newModuleTrees.get(moduleNames.get(0))); ! moduleTrees.clear(); ! } ! catch (Exception e) ! { ! logger.error("Error while refreshing EJB modules", e); ! } ! ! try ! { ! // ======================================== ! // Refresh the webapps ! // ======================================== ! Vector applications = (Vector) context.getAttribute(Constants.WEBAPP_TREES); ! if (applications == null) ! { ! applications = new Vector(); ! } ! Vector newApplications = new Vector(); ! ! // Create a search table ! Hashtable appTable = new Hashtable(); ! for (Iterator it = applications.iterator(); it.hasNext(); ) ! { ! JNDIContainer container = (JNDIContainer) it.next(); ! appTable.put(container.getName(), container); ! } ! ! // @todo Get from an env-entry ! ObjectName webService = new ObjectName(Constants.WEBSERVER_OBJECTNAME); ! iterator = (Iterator) server.getAttribute(webService, "DeployedApplications"); ! while (iterator.hasNext()) ! { ! WebApplication application = (WebApplication) iterator.next(); ! String applicationName = application.getName(); ! logger.debug("applicationName=" + applicationName); ! ! JNDIContainer container = (JNDIContainer) appTable.get(applicationName); ! logger.debug("container=" + container); ! if (container == null) ! { ! container = new JNDIContainer(); ! container.setName(application.getName()); ! container.setClassLoader(application.getClassLoader()); ! container.setContext("java:/comp"); ! } ! logger.debug("refresh container"); ! newApplications.add(container); ! container.refresh(); ! } ! context.setAttribute(Constants.WEBAPP_TREES, newApplications); ! context.setAttribute(Constants.WEBAPP_TREE, newApplications.get(0)); ! applications.clear(); ! } ! catch (Exception e) ! { ! logger.error("Error while refreshing Web modules", e); ! } ! } ! ! return (mapping.findForward("view")); ! } ! } ! --- 1,268 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web.action; ! ! import java.io.IOException; ! import java.util.ArrayList; ! import java.util.Collection; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Locale; ! import java.util.Vector; ! ! import javax.management.MBeanServer; ! import javax.management.MBeanServerFactory; ! import javax.management.ObjectName; ! import javax.servlet.ServletContext; ! import javax.servlet.ServletException; ! import javax.servlet.http.HttpServletRequest; ! import javax.servlet.http.HttpServletResponse; ! ! import org.apache.log4j.Logger; ! import org.apache.struts.action.Action; ! import org.apache.struts.action.ActionErrors; ! import org.apache.struts.action.ActionForm; ! import org.apache.struts.action.ActionForward; ! import org.apache.struts.action.ActionMapping; ! import org.apache.struts.util.MessageResources; ! import org.apache.struts.util.ResponseUtils; ! import org.ejtools.jndi.browser.web.Constants; ! import org.ejtools.jndi.browser.web.JNDIContainer; ! import org.jboss.ejb.Container; ! import org.jboss.ejb.EjbModule; ! import org.jboss.web.WebApplication; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 12 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class RefreshAction extends Action ! { ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(RefreshAction.class); ! ! ! /** Constructor for the ViewAction object */ ! public RefreshAction() { } ! ! ! /** ! * Description of the Method ! * ! * @param mapping Description of Parameter ! * @param form Description of Parameter ! * @param request Description of Parameter ! * @param response Description of Parameter ! * @return Description of the Returned Value ! * @exception IOException Description of Exception ! * @exception ServletException Description of Exception ! */ ! public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ! throws IOException, ServletException ! { ! // Extract attributes we will need ! Locale locale = getLocale(request); ! MessageResources messages = getResources(); ! ! // Validate the request parameters specified by the user ! ActionErrors errors = new ActionErrors(); ! ! logger.debug("Connecting to JNDI..."); ! ! // Report any errors we have discovered back to the original form ! if (!errors.empty()) ! { ! saveErrors(request, errors); ! return (new ActionForward(mapping.getInput())); ! } ! ! ServletContext context = this.getServlet().getServletContext(); ! ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); ! ! // ======================================== ! // Refresh the global jndi tree ! // ======================================== ! JNDIContainer globalTree = (JNDIContainer) context.getAttribute(Constants.GLOBAL_TREE); ! logger.debug("globalTree=" + globalTree); ! if (globalTree == null) ! { ! globalTree = new JNDIContainer(); ! globalTree.setClassLoader(currentClassLoader); ! globalTree.setContext(""); ! context.setAttribute(Constants.GLOBAL_TREE, globalTree); ! } ! logger.debug("refresh globalTree"); ! globalTree.refresh(); ! ! // ======================================== ! // Refresh the global jndi tree ! // ======================================== ! JNDIContainer localTree = (JNDIContainer) context.getAttribute(Constants.LOCAL_TREE); ! logger.debug("localTree=" + localTree); ! if (localTree == null) ! { ! localTree = new JNDIContainer(); ! localTree.setClassLoader(currentClassLoader); ! localTree.setContext("java:/"); ! context.setAttribute(Constants.LOCAL_TREE, localTree); ! } ! logger.debug("refresh localTree"); ! localTree.refresh(); ! ! // **************************************** ! // JBoss specific code ! // **************************************** ! ArrayList list = MBeanServerFactory.findMBeanServer(null); ! if ((list != null) && (list.size() > 0)) ! { ! Iterator iterator = null; ! MBeanServer server = (MBeanServer) list.get(0); ! logger.debug("server=" + server); ! ! try ! { ! // ======================================== ! // Refresh the ejb modules ! // ======================================== ! Vector moduleNames = new Vector(); ! Hashtable moduleTrees = (Hashtable) context.getAttribute(Constants.EJBMODULE_TREES); ! if (moduleTrees == null) ! { ! moduleTrees = new Hashtable(); ! } ! Hashtable newModuleTrees = new Hashtable(); ! ! // @todo Get from an env-entry ! iterator = server.queryNames(EjbModule.EJB_MODULE_QUERY_NAME, null).iterator(); ! while (iterator.hasNext()) ! { ! try ! { ! ObjectName module = (ObjectName) iterator.next(); ! logger.debug("module=" + module); ! String moduleName = (String) module.getKeyProperty("module"); ! String moduleUid = (String) module.getKeyProperty("uid"); ! if ((moduleUid != null) && (!"".equals(moduleUid))) ! { ! moduleName = moduleName + " (" + moduleUid + ")"; ! } ! moduleNames.add(ResponseUtils.filter(moduleName)); ! logger.debug("moduleName=" + moduleName); ! ! // Get the containes from the module ! Vector containers = (Vector) moduleTrees.get(moduleName); ! if (containers == null) ! { ! containers = new Vector(); ! } ! Vector newContainers = new Vector(); ! ! // Create a search table ! Hashtable ejbTable = new Hashtable(); ! for (Iterator it = containers.iterator(); it.hasNext(); ) ! { ! JNDIContainer container = (JNDIContainer) it.next(); ! ejbTable.put(container.getName(), container); ! } ! ! Collection moduleContainers = (Collection) server.getAttribute(module, "Containers"); ! for (Iterator iter = moduleContainers.iterator(); iter.hasNext(); ) ! { ! Container ejbContainer = (Container) iter.next(); ! String ejbName = ejbContainer.getBeanMetaData().getEjbName(); ! JNDIContainer container = (JNDIContainer) ejbTable.get(ejbName); ! logger.debug("container=" + container); ! if (container == null) ! { ! container = new JNDIContainer(); ! container.setName(ejbName); ! container.setClassLoader(ejbContainer.getClassLoader()); ! container.setContext("java:/comp"); ! } ! logger.debug("refresh container"); ! newContainers.add(container); ! container.refresh(); ! } ! newModuleTrees.put(ResponseUtils.filter(moduleName), newContainers); ! containers.clear(); ! } ! catch (Exception e) ! { ! logger.error("Error while refreshing getting module", e); ! } ! } ! context.setAttribute(Constants.EJBMODULE_NAMES, moduleNames); ! context.setAttribute(Constants.EJBMODULE_TREES, newModuleTrees); ! context.setAttribute(Constants.EJBMODULE_TREE, newModuleTrees.get(moduleNames.get(0))); ! moduleTrees.clear(); ! } ! catch (Exception e) ! { ! logger.error("Error while refreshing EJB modules", e); ! } ! ! try ! { ! // ======================================== ! // Refresh the webapps ! // ======================================== ! Vector applications = (Vector) context.getAttribute(Constants.WEBAPP_TREES); ! if (applications == null) ! { ! applications = new Vector(); ! } ! Vector newApplications = new Vector(); ! ! // Create a search table ! Hashtable appTable = new Hashtable(); ! for (Iterator it = applications.iterator(); it.hasNext(); ) ! { ! JNDIContainer container = (JNDIContainer) it.next(); ! appTable.put(container.getName(), container); ! } ! ! // @todo Get from an env-entry ! ObjectName webService = new ObjectName(Constants.WEBSERVER_OBJECTNAME); ! iterator = (Iterator) server.getAttribute(webService, "DeployedApplications"); ! while (iterator.hasNext()) ! { ! WebApplication application = (WebApplication) iterator.next(); ! String applicationName = application.getName(); ! logger.debug("applicationName=" + applicationName); ! ! JNDIContainer container = (JNDIContainer) appTable.get(applicationName); ! logger.debug("container=" + container); ! if (container == null) ! { ! container = new JNDIContainer(); ! container.setName(application.getName()); ! container.setClassLoader(application.getClassLoader()); ! container.setContext("java:/comp"); ! } ! logger.debug("refresh container"); ! newApplications.add(container); ! container.refresh(); ! } ! context.setAttribute(Constants.WEBAPP_TREES, newApplications); ! context.setAttribute(Constants.WEBAPP_TREE, newApplications.get(0)); ! applications.clear(); ! } ! catch (Exception e) ! { ! logger.error("Error while refreshing Web modules", e); ! } ! } ! ! return (mapping.findForward("view")); ! } ! } ! |
From: <let...@us...> - 2003-12-14 08:40:46
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state In directory sc8-pr-cvs1:/tmp/cvs-serv20500/jndi.browser/src/main/org/ejtools/jndi/browser/state Modified Files: WorkbenchState.java WorkbenchStoreVisitor.java Log Message: Add more javadocs. Adjust workspace persistence. Index: WorkbenchState.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state/WorkbenchState.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkbenchState.java 27 Nov 2003 01:30:29 -0000 1.1 --- WorkbenchState.java 13 Dec 2003 22:29:07 -0000 1.2 *************** *** 1,149 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.state; ! ! import java.beans.beancontext.BeanContext; ! import java.io.File; ! import java.net.URL; ! ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import javax.xml.parsers.SAXParser; ! import javax.xml.parsers.SAXParserFactory; ! import javax.xml.transform.Result; ! import javax.xml.transform.Source; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.dom.DOMSource; ! import javax.xml.transform.stream.StreamResult; ! ! import org.ejtools.jndi.browser.Browser; ! import org.ejtools.jndi.browser.frame.ServerInternalFrame; ! import org.ejtools.jndi.browser.model.Server; ! import org.ejtools.jndi.browser.state.rules.ServerInternalFrameRule; ! import org.ejtools.jndi.browser.state.rules.ServerRule; ! import org.ejtools.util.service.ProfileRule; ! import org.ejtools.util.state.LoadHandler; ! import org.ejtools.util.state.StoreVisitor; ! import org.w3c.dom.Document; ! ! ! /** ! * @author Laurent Etiemble ! * @created 3 juin 2003 ! * @version $Revision$ ! */ ! public class WorkbenchState ! { ! /** Description of the Field */ ! private BeanContext context; ! /** Description of the Field */ ! private Document document; ! /** Description of the Field */ ! private URL workbenchURL; ! ! ! /** ! *Constructor for the FilePersistenceStore object ! * ! * @param context Description of the Parameter ! */ ! public WorkbenchState(BeanContext context) ! { ! this.context = context; ! } ! ! ! /** ! * Gets the workbenchFile attribute of the WorkbenchStore object ! * ! * @return The workbenchFile value ! */ ! public URL getWorkbenchURL() ! { ! return this.workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void load() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! LoadHandler handler = new LoadHandler(); ! handler.getContext().put("CONTAINER", this.context); ! ! handler.addRule("/workbench/jndi-frame", new ServerInternalFrameRule()); ! handler.addRule("/workbench/jndi-frame/profile", new ProfileRule()); ! handler.addRule("/workbench/jndi-frame/profile/property", new ProfileRule.ProfilePropertyRule()); ! handler.addRule("/workbench/jndi-frame/jmx-server", new ServerRule()); ! ! SAXParserFactory factory = SAXParserFactory.newInstance(); ! SAXParser parser = factory.newSAXParser(); ! File file = new File(this.workbenchURL.getFile()); ! parser.parse(file, handler); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** ! * Sets the workbenchFile attribute of the WorkbenchStore object ! * ! * @param workbenchURL The new workbenchURL value ! */ ! public void setWorkbenchURL(URL workbenchURL) ! { ! this.workbenchURL = workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void store() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ! DocumentBuilder builder = dbFactory.newDocumentBuilder(); ! this.document = builder.newDocument(); ! ! StoreVisitor visitor = new WorkbenchStoreVisitor(this.document); ! visitor.registerForPersistence(Browser.class); ! visitor.registerForPersistence(ServerInternalFrame.class); ! visitor.registerForPersistence(Server.class); ! visitor.persist(this.context); ! ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer = tFactory.newTransformer(); ! transformer.setOutputProperty("indent", "true"); ! ! Source source = new DOMSource(this.document); ! File file = new File(this.workbenchURL.getFile()); ! Result result = new StreamResult(file); ! transformer.transform(source, result); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! } --- 1,149 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.state; ! ! import java.beans.beancontext.BeanContext; ! import java.io.File; ! import java.net.URL; ! ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import javax.xml.parsers.SAXParser; ! import javax.xml.parsers.SAXParserFactory; ! import javax.xml.transform.Result; ! import javax.xml.transform.Source; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.dom.DOMSource; ! import javax.xml.transform.stream.StreamResult; ! ! import org.ejtools.jndi.browser.Browser; ! import org.ejtools.jndi.browser.frame.ServerInternalFrame; ! import org.ejtools.jndi.browser.model.Server; ! import org.ejtools.jndi.browser.state.rules.ServerInternalFrameRule; ! import org.ejtools.jndi.browser.state.rules.ServerRule; ! import org.ejtools.util.service.ProfileRule; ! import org.ejtools.util.state.LoadHandler; ! import org.ejtools.util.state.StoreVisitor; ! import org.w3c.dom.Document; ! ! ! /** ! * @author Laurent Etiemble ! * @created 3 juin 2003 ! * @version $Revision$ ! */ ! public class WorkbenchState ! { ! /** Description of the Field */ ! private BeanContext context; ! /** Description of the Field */ ! private Document document; ! /** Description of the Field */ ! private URL workbenchURL; ! ! ! /** ! *Constructor for the FilePersistenceStore object ! * ! * @param context Description of the Parameter ! */ ! public WorkbenchState(BeanContext context) ! { ! this.context = context; ! } ! ! ! /** ! * Gets the workbenchFile attribute of the WorkbenchStore object ! * ! * @return The workbenchFile value ! */ ! public URL getWorkbenchURL() ! { ! return this.workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void load() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! LoadHandler handler = new LoadHandler(); ! handler.getContext().put("CONTAINER", this.context); ! ! handler.addRule("/workbench/jndi-frame", new ServerInternalFrameRule()); ! handler.addRule("/workbench/jndi-frame/profile", new ProfileRule()); ! handler.addRule("/workbench/jndi-frame/profile/property", new ProfileRule.ProfilePropertyRule()); ! handler.addRule("/workbench/jndi-frame/jmx-server", new ServerRule()); ! ! SAXParserFactory factory = SAXParserFactory.newInstance(); ! SAXParser parser = factory.newSAXParser(); ! File file = new File(this.workbenchURL.getFile()); ! parser.parse(file, handler); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** ! * Sets the workbenchFile attribute of the WorkbenchStore object ! * ! * @param workbenchURL The new workbenchURL value ! */ ! public void setWorkbenchURL(URL workbenchURL) ! { ! this.workbenchURL = workbenchURL; ! } ! ! ! /** Description of the Method */ ! public void store() ! { ! // Check that the URL is not null andthat URL is a file ! if ((this.workbenchURL == null) && (!this.workbenchURL.getProtocol().equals("file"))) ! { ! return; ! } ! ! try ! { ! DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ! DocumentBuilder builder = dbFactory.newDocumentBuilder(); ! this.document = builder.newDocument(); ! ! StoreVisitor visitor = new WorkbenchStoreVisitor(this.document); ! visitor.registerForPersistence(Browser.class); ! visitor.registerForPersistence(ServerInternalFrame.class); ! visitor.registerForPersistence(Server.class); ! visitor.persist(this.context); ! ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer = tFactory.newTransformer(); ! transformer.setOutputProperty("indent", "true"); ! ! Source source = new DOMSource(this.document); ! File file = new File(this.workbenchURL.getFile()); ! Result result = new StreamResult(file); ! transformer.transform(source, result); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! } Index: WorkbenchStoreVisitor.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state/WorkbenchStoreVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkbenchStoreVisitor.java 27 Nov 2003 01:30:29 -0000 1.1 --- WorkbenchStoreVisitor.java 13 Dec 2003 22:29:07 -0000 1.2 *************** *** 1,104 **** ! /* ! * ianRR, is a new RR ! * ! * Distributable under LGPL license. ! * See terms at http://opensource.org/licenses/lgpl-license.php ! */ ! package org.ejtools.jndi.browser.state; ! ! import java.util.Iterator; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.Sort; ! import org.ejtools.jndi.browser.Browser; ! import org.ejtools.jndi.browser.frame.ServerInternalFrame; ! import org.ejtools.jndi.browser.model.Server; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.state.DefaultStoreVisitor; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; ! ! ! /** ! * @version $Revision$ ! * @author Laurent Etiemble ! * @created 3 juin 2003 ! */ ! public class WorkbenchStoreVisitor extends DefaultStoreVisitor { ! private Document document; ! private static Logger logger = Logger.getLogger(WorkbenchStoreVisitor.class); ! ! ! /** ! * Constructor for the WorkbenchStoreVisitor object ! * ! * @param document Description of the Parameter ! */ ! public WorkbenchStoreVisitor(Document document) { ! this.document = document; ! this.pushCurrentNode(this.document); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(ServerInternalFrame o) { ! logger.debug("ServerInternalFrame"); ! ! Element eFrame = this.document.createElement("jndi-frame"); ! eFrame.setAttribute("title", o.getTitle()); ! Element eProfile = this.document.createElement("profile"); ! eFrame.appendChild(eProfile); ! ! Profile profile = o.getProfile(); ! for (Iterator iterator = profile.keySet().iterator(); iterator.hasNext(); ) { ! String key = (String) iterator.next(); ! Element property = this.document.createElement("property"); ! property.setAttribute("key", key); ! property.appendChild(this.document.createTextNode(profile.getProperty(key))); ! eProfile.appendChild(property); ! } ! ! this.peekCurrentNode().appendChild(eFrame); ! this.pushCurrentNode(eFrame); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Server o) { ! logger.debug("Server"); ! ! Element server = this.document.createElement("jndi-server"); ! server.setAttribute("name", o.getName()); ! ! this.peekCurrentNode().appendChild(server); ! this.pushCurrentNode(server); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Browser o) { ! logger.debug("Browser"); ! ! Element workbench = this.document.createElement("workbench"); ! ! this.peekCurrentNode().appendChild(workbench); ! this.pushCurrentNode(workbench); ! this.persist(Sort.getChildrenByClass(o.iterator(), ServerInternalFrame.class)); ! this.popCurrentNode(); ! } ! } --- 1,104 ---- ! /* ! * ianRR, is a new RR ! * ! * Distributable under LGPL license. ! * See terms at http://opensource.org/licenses/lgpl-license.php ! */ ! package org.ejtools.jndi.browser.state; ! ! import java.util.Iterator; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.Sort; ! import org.ejtools.jndi.browser.Browser; ! import org.ejtools.jndi.browser.frame.ServerInternalFrame; ! import org.ejtools.jndi.browser.model.Server; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.state.DefaultStoreVisitor; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; ! ! ! /** ! * @version $Revision$ ! * @author Laurent Etiemble ! * @created 3 juin 2003 ! */ ! public class WorkbenchStoreVisitor extends DefaultStoreVisitor { ! private Document document; ! private static Logger logger = Logger.getLogger(WorkbenchStoreVisitor.class); ! ! ! /** ! * Constructor for the WorkbenchStoreVisitor object ! * ! * @param document Description of the Parameter ! */ ! public WorkbenchStoreVisitor(Document document) { ! this.document = document; ! this.pushCurrentNode(this.document); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(ServerInternalFrame o) { ! logger.debug("ServerInternalFrame"); ! ! Element eFrame = this.document.createElement("jndi-frame"); ! eFrame.setAttribute("title", o.getTitle()); ! Element eProfile = this.document.createElement("profile"); ! eFrame.appendChild(eProfile); ! ! Profile profile = o.getProfile(); ! for (Iterator iterator = profile.keySet().iterator(); iterator.hasNext(); ) { ! String key = (String) iterator.next(); ! Element property = this.document.createElement("property"); ! property.setAttribute("key", key); ! property.appendChild(this.document.createTextNode(profile.getProperty(key))); ! eProfile.appendChild(property); ! } ! ! this.peekCurrentNode().appendChild(eFrame); ! this.pushCurrentNode(eFrame); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Server o) { ! logger.debug("Server"); ! ! Element server = this.document.createElement("jndi-server"); ! server.setAttribute("name", o.getName()); ! ! this.peekCurrentNode().appendChild(server); ! this.pushCurrentNode(server); ! this.persist(o.iterator()); ! this.popCurrentNode(); ! } ! ! /** ! * Description of the Method ! * ! * @param o Description of the Parameter ! */ ! public void persist(Browser o) { ! logger.debug("Browser"); ! ! Element workbench = this.document.createElement("workbench"); ! ! this.peekCurrentNode().appendChild(workbench); ! this.pushCurrentNode(workbench); ! this.persist(Sort.getChildrenByClass(o.iterator(), ServerInternalFrame.class)); ! this.popCurrentNode(); ! } ! } |
From: <let...@us...> - 2003-12-14 08:40:45
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/frame In directory sc8-pr-cvs1:/tmp/cvs-serv20500/jndi.browser/src/main/org/ejtools/jndi/browser/frame Modified Files: ServerInternalFrame.java Log Message: Add more javadocs. Adjust workspace persistence. Index: ServerInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/frame/ServerInternalFrame.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ServerInternalFrame.java 27 Nov 2003 01:30:28 -0000 1.5 --- ServerInternalFrame.java 13 Dec 2003 22:29:07 -0000 1.6 *************** *** 1,162 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.jndi.browser.action.SelectFactoryAction; ! import org.ejtools.jndi.browser.model.Server; ! import org.ejtools.jndi.browser.model.service.JMSConnectionService; ! import org.ejtools.jndi.browser.model.service.JMSConnectionServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @version $Revision$ ! * @created 5 septembre 2002 ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected JMSConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! public Profile getProfile() ! { ! return this.profile; ! } ! ! /** ! * Constructor for ServerInternalFrame. ! * ! * @param profile Description of the Parameter ! */ ! public ServerInternalFrame() ! { ! super(); ! } ! ! public void setServer(Server server) ! { ! this.connectionProvider = new JMSConnectionServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = server; ! this.server.setProfile(profile); ! ! this.add(this.connectionProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.server.addPropertyChangeListener("name", this); ! ! this.add(new RefreshAction( ! new Command() ! { ! /** */ ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new SelectFactoryAction("action.options.selectQueueFactory", ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.connectionProvider.selectFactory(JMSConnectionService.QUEUE_CONNECTION_FACTORY); ! } ! } ! )); ! ! this.add(new SelectFactoryAction("action.options.selectTopicFactory", ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.connectionProvider.selectFactory(JMSConnectionService.TOPIC_CONNECTION_FACTORY); ! } ! } ! )); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.NORTH, this.toolbarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.CENTER, panel); ! } ! ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** */ ! protected void releaseBeanContextResources() ! { ! logger.debug("In releaseBeanContextResources..."); ! ! this.server.clear(); ! ! super.releaseBeanContextResources(); ! } ! } --- 1,162 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.jndi.browser.action.SelectFactoryAction; ! import org.ejtools.jndi.browser.model.Server; ! import org.ejtools.jndi.browser.model.service.JMSConnectionService; ! import org.ejtools.jndi.browser.model.service.JMSConnectionServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @version $Revision$ ! * @created 5 septembre 2002 ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected JMSConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! public Profile getProfile() ! { ! return this.profile; ! } ! ! /** ! * Constructor for ServerInternalFrame. ! * ! * @param profile Description of the Parameter ! */ ! public ServerInternalFrame() ! { ! super(); ! } ! ! public void setServer(Server server) ! { ! this.connectionProvider = new JMSConnectionServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = server; ! this.server.setProfile(profile); ! ! this.add(this.connectionProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.server.addPropertyChangeListener("name", this); ! ! this.add(new RefreshAction( ! new Command() ! { ! /** */ ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new SelectFactoryAction("action.options.selectQueueFactory", ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.connectionProvider.selectFactory(JMSConnectionService.QUEUE_CONNECTION_FACTORY); ! } ! } ! )); ! ! this.add(new SelectFactoryAction("action.options.selectTopicFactory", ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.connectionProvider.selectFactory(JMSConnectionService.TOPIC_CONNECTION_FACTORY); ! } ! } ! )); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.NORTH, this.toolbarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.CENTER, panel); ! } ! ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** */ ! protected void releaseBeanContextResources() ! { ! logger.debug("In releaseBeanContextResources..."); ! ! this.server.clear(); ! ! super.releaseBeanContextResources(); ! } ! } |
From: <let...@us...> - 2003-12-14 08:40:45
|
Update of /cvsroot/ejtools/applications/jndi.browser In directory sc8-pr-cvs1:/tmp/cvs-serv20500/jndi.browser Modified Files: project.properties project.xml Log Message: Add more javadocs. Adjust workspace persistence. Index: project.properties =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/project.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.properties 10 Mar 2003 22:13:15 -0000 1.3 --- project.properties 13 Dec 2003 22:29:06 -0000 1.4 *************** *** 51,53 **** maven.ejtools.app.launch.class=org.ejtools.jndi.browser.Main maven.ejtools.app.launch.includes=org/ejtools/jndi/browser/Main*.* ! maven.ejtools.app.launch.classpath=../conf/ ../lib/log4j-1.2.7.jar --- 51,53 ---- maven.ejtools.app.launch.class=org.ejtools.jndi.browser.Main maven.ejtools.app.launch.includes=org/ejtools/jndi/browser/Main*.* ! maven.ejtools.app.launch.classpath=../conf/ ../lib/log4j-1.2.8.jar Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/project.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** project.xml 27 Nov 2003 01:30:28 -0000 1.4 --- project.xml 13 Dec 2003 22:29:06 -0000 1.5 *************** *** 15,18 **** --- 15,19 ---- <groupId>ejtools</groupId> <name>JNDI Browser</name> + <description>A tool which allows to view and interact with the JNDI userspace.</description> <currentVersion>1.1.0</currentVersion> <package>org/ejtools/jndi/browser</package> *************** *** 21,25 **** <dependency> <id>log4j</id> ! <version>1.2.7</version> <properties> <app.bundle.jar>true</app.bundle.jar> --- 22,26 ---- <dependency> <id>log4j</id> ! <version>1.2.8</version> <properties> <app.bundle.jar>true</app.bundle.jar> *************** *** 30,34 **** <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> ! <version>1.1</version> </dependency> <dependency> --- 31,35 ---- <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> ! <version>1.1.1</version> </dependency> <dependency> |
From: <let...@us...> - 2003-12-14 08:40:22
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/frame In directory sc8-pr-cvs1:/tmp/cvs-serv11709/jmx.browser/src/main/org/ejtools/jmx/browser/frame Modified Files: ServerInternalFrame.java Log Message: Add more javadocs. Adjust some things. Index: ServerInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/frame/ServerInternalFrame.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ServerInternalFrame.java 27 Nov 2003 01:13:06 -0000 1.4 --- ServerInternalFrame.java 13 Dec 2003 22:15:07 -0000 1.5 *************** *** 1,322 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyEditor; ! import java.util.Arrays; ! import java.util.Enumeration; ! import java.util.ResourceBundle; ! import java.util.StringTokenizer; ! import java.util.Vector; ! ! import javax.management.ObjectName; ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.beans.CustomPropertyEditorManager; ! import org.ejtools.jmx.browser.action.CreateMBeanAction; ! import org.ejtools.jmx.browser.action.ShowNotificationsAction; ! import org.ejtools.jmx.browser.dialog.CreateMBeanDialog; ! import org.ejtools.jmx.browser.model.Resource; ! import org.ejtools.jmx.browser.model.Server; ! import org.ejtools.jmx.browser.model.service.CacheService; ! import org.ejtools.jmx.browser.model.service.CacheServiceProvider; ! import org.ejtools.jmx.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.jmx.browser.model.service.CustomizationServiceProvider; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @version $Revision$ ! * @created 5 septembre 2002 ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected CustomizationServiceProvider customizationProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected NotificationsInternalFrame notificationFrame; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /**Constructor for the ServerInternalFrame object */ ! public ServerInternalFrame() { } ! ! ! /** ! * Gets the profile attribute of the ServerInternalFrame object ! * ! * @return The profile value ! */ ! public Profile getProfile() ! { ! return this.profile; ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public Resource queryMBean(String objectName) ! { ! Resource resource = (Resource) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! logger.warn("Cannot find ObjectName " + objectName, e); ! } ! return null; ! } ! ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the server attribute of the ServerInternalFrame object ! * ! * @param server The new server value ! */ ! public void setServer(Server server) ! { ! this.connectionProvider = new ConnectionServiceProvider(this.profile); ! this.cacheProvider = new CacheServiceProvider(); ! this.customizationProvider = new CustomizationServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = server; ! this.server.setProfile(this.profile); ! ! this.add(this.connectionProvider); ! this.add(this.cacheProvider); ! this.add(this.notificationProvider); ! this.add(this.customizationProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.notificationFrame = new NotificationsInternalFrame(this.notificationProvider); ! ! this.server.addPropertyChangeListener("name", this); ! this.server.addPropertyChangeListener("name", this.notificationFrame); ! ! this.add(new RefreshAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new CreateMBeanAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.createMBean(); ! } ! })); ! ! this.add(new ShowNotificationsAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.showNotificationFrame(); ! } ! })); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.setIndexer(new ResourceIndexer()); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(this.toolbarProvider.getContainer(), BorderLayout.NORTH); ! this.frame.getContentPane().add(panel, BorderLayout.CENTER); ! } ! ! ! /** Description of the Method */ ! protected void createMBean() ! { ! Vector domains = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.DOMAIN_TYPE); enum.hasMoreElements(); ) ! { ! domains.add(enum.nextElement() + ":"); ! } ! Object[] domainValues = domains.toArray(); ! Arrays.sort(domainValues); ! ! Vector classes = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.RESOURCE_TYPE); enum.hasMoreElements(); ) ! { ! Resource resource = (Resource) cacheProvider.get(CacheService.RESOURCE_TYPE, enum.nextElement()); ! if (!classes.contains(resource.getClassName())) ! { ! classes.add(resource.getClassName()); ! } ! } ! Object[] classValues = classes.toArray(); ! Arrays.sort(classValues); ! ! CreateMBeanDialog dialog = new CreateMBeanDialog(null, domainValues, classValues); ! dialog.show(); ! ! Object object = dialog.getObjectName(); ! if (object == null) ! { ! return; ! } ! try ! { ! String className = null; ! ObjectName name = null; ! ObjectName loaderName = null; ! String sParameters = null; ! String sSignature = null; ! ! Object[] parameters = null; ! String[] signature = null; ! ! name = new ObjectName(object.toString()); ! className = dialog.getObjectClass(); ! ! if ("".equals(dialog.getClassLoader())) ! { ! loaderName = null; ! } ! else ! { ! loaderName = new ObjectName(dialog.getClassLoader()); ! } ! ! sParameters = dialog.getParameters(); ! sSignature = dialog.getSignature(); ! if ((!"".equals(sParameters)) && (!"".equals(sSignature))) ! { ! StringTokenizer stParameters = new StringTokenizer(sParameters, ","); ! StringTokenizer stSignature = new StringTokenizer(sSignature, ","); ! if (stParameters.countTokens() == stSignature.countTokens()) ! { ! try ! { ! parameters = new String[stParameters.countTokens()]; ! signature = new String[stSignature.countTokens()]; ! ! for (int i = 0; stParameters.hasMoreTokens(); i++) ! { ! signature[i] = stSignature.nextToken(); ! Class cl = Thread.currentThread().getContextClassLoader().loadClass(signature[i]); ! PropertyEditor pe = CustomPropertyEditorManager.findEditor(cl); ! pe.setAsText(stParameters.nextToken()); ! parameters[i] = pe.getValue(); ! } ! } ! catch (Exception e) ! { ! logger.error("Exception while parsing parameters", e); ! } ! } ! } ! ! this.server.createMBean(className, name, loaderName, parameters, signature); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating MBean", e); ! } ! } ! ! ! /** Description of the Method */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** Description of the Method */ ! protected void releaseBeanContextResources() ! { ! this.notificationFrame.close(); ! this.server.clear(); ! super.releaseBeanContextResources(); ! } ! ! ! /** Description of the Method */ ! protected void showNotificationFrame() ! { ! NotificationsInternalFrame frame = ServerInternalFrame.this.notificationFrame; ! if (!this.getBeanContext().contains(frame)) ! { ! this.getBeanContext().add(frame); ! } ! frame.activate(); ! } ! } --- 1,322 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyEditor; ! import java.util.Arrays; ! import java.util.Enumeration; ! import java.util.ResourceBundle; ! import java.util.StringTokenizer; ! import java.util.Vector; ! ! import javax.management.ObjectName; ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.beans.CustomPropertyEditorManager; ! import org.ejtools.jmx.browser.action.CreateMBeanAction; ! import org.ejtools.jmx.browser.action.ShowNotificationsAction; ! import org.ejtools.jmx.browser.dialog.CreateMBeanDialog; ! import org.ejtools.jmx.browser.model.Resource; ! import org.ejtools.jmx.browser.model.Server; ! import org.ejtools.jmx.browser.model.service.CacheService; ! import org.ejtools.jmx.browser.model.service.CacheServiceProvider; ! import org.ejtools.jmx.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.jmx.browser.model.service.CustomizationServiceProvider; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @version $Revision$ ! * @created 5 septembre 2002 ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected CustomizationServiceProvider customizationProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected NotificationsInternalFrame notificationFrame; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /**Constructor for the ServerInternalFrame object */ ! public ServerInternalFrame() { } ! ! ! /** ! * Gets the profile attribute of the ServerInternalFrame object ! * ! * @return The profile value ! */ ! public Profile getProfile() ! { ! return this.profile; ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public Resource queryMBean(String objectName) ! { ! Resource resource = (Resource) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! logger.warn("Cannot find ObjectName " + objectName, e); ! } ! return null; ! } ! ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the server attribute of the ServerInternalFrame object ! * ! * @param server The new server value ! */ ! public void setServer(Server server) ! { ! this.connectionProvider = new ConnectionServiceProvider(this.profile); ! this.cacheProvider = new CacheServiceProvider(); ! this.customizationProvider = new CustomizationServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = server; ! this.server.setProfile(this.profile); ! ! this.add(this.connectionProvider); ! this.add(this.cacheProvider); ! this.add(this.notificationProvider); ! this.add(this.customizationProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.notificationFrame = new NotificationsInternalFrame(this.notificationProvider); ! ! this.server.addPropertyChangeListener("name", this); ! this.server.addPropertyChangeListener("name", this.notificationFrame); ! ! this.add(new RefreshAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new CreateMBeanAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.createMBean(); ! } ! })); ! ! this.add(new ShowNotificationsAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.showNotificationFrame(); ! } ! })); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.setIndexer(new ResourceIndexer()); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(this.toolbarProvider.getContainer(), BorderLayout.NORTH); ! this.frame.getContentPane().add(panel, BorderLayout.CENTER); ! } ! ! ! /** Description of the Method */ ! protected void createMBean() ! { ! Vector domains = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.DOMAIN_TYPE); enum.hasMoreElements(); ) ! { ! domains.add(enum.nextElement() + ":"); ! } ! Object[] domainValues = domains.toArray(); ! Arrays.sort(domainValues); ! ! Vector classes = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.RESOURCE_TYPE); enum.hasMoreElements(); ) ! { ! Resource resource = (Resource) cacheProvider.get(CacheService.RESOURCE_TYPE, enum.nextElement()); ! if (!classes.contains(resource.getClassName())) ! { ! classes.add(resource.getClassName()); ! } ! } ! Object[] classValues = classes.toArray(); ! Arrays.sort(classValues); ! ! CreateMBeanDialog dialog = new CreateMBeanDialog(null, domainValues, classValues); ! dialog.show(); ! ! Object object = dialog.getObjectName(); ! if (object == null) ! { ! return; ! } ! try ! { ! String className = null; ! ObjectName name = null; ! ObjectName loaderName = null; ! String sParameters = null; ! String sSignature = null; ! ! Object[] parameters = null; ! String[] signature = null; ! ! name = new ObjectName(object.toString()); ! className = dialog.getObjectClass(); ! ! if ("".equals(dialog.getClassLoader())) ! { ! loaderName = null; ! } ! else ! { ! loaderName = new ObjectName(dialog.getClassLoader()); ! } ! ! sParameters = dialog.getParameters(); ! sSignature = dialog.getSignature(); ! if ((!"".equals(sParameters)) && (!"".equals(sSignature))) ! { ! StringTokenizer stParameters = new StringTokenizer(sParameters, ","); ! StringTokenizer stSignature = new StringTokenizer(sSignature, ","); ! if (stParameters.countTokens() == stSignature.countTokens()) ! { ! try ! { ! parameters = new String[stParameters.countTokens()]; ! signature = new String[stSignature.countTokens()]; ! ! for (int i = 0; stParameters.hasMoreTokens(); i++) ! { ! signature[i] = stSignature.nextToken(); ! Class cl = Thread.currentThread().getContextClassLoader().loadClass(signature[i]); ! PropertyEditor pe = CustomPropertyEditorManager.findEditor(cl); ! pe.setAsText(stParameters.nextToken()); ! parameters[i] = pe.getValue(); ! } ! } ! catch (Exception e) ! { ! logger.error("Exception while parsing parameters", e); ! } ! } ! } ! ! this.server.createMBean(className, name, loaderName, parameters, signature); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating MBean", e); ! } ! } ! ! ! /** Description of the Method */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** Description of the Method */ ! protected void releaseBeanContextResources() ! { ! this.notificationFrame.close(); ! this.server.clear(); ! super.releaseBeanContextResources(); ! } ! ! ! /** Description of the Method */ ! protected void showNotificationFrame() ! { ! NotificationsInternalFrame frame = ServerInternalFrame.this.notificationFrame; ! if (!this.getBeanContext().contains(frame)) ! { ! this.getBeanContext().add(frame); ! } ! frame.activate(); ! } ! } |
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service In directory sc8-pr-cvs1:/tmp/cvs-serv11709/jmx.browser/src/main/org/ejtools/jmx/browser/model/service Modified Files: ConnectionMetaData.java ConnectionService.java ConnectionServiceProvider.java Log Message: Add more javadocs. Adjust some things. Index: ConnectionMetaData.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionMetaData.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConnectionMetaData.java 27 Nov 2003 01:13:07 -0000 1.3 --- ConnectionMetaData.java 13 Dec 2003 22:15:07 -0000 1.4 *************** *** 1,98 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import org.ejtools.util.service.ProfileMetaData; ! ! /** ! * @author letiembl ! * @created 14 novembre 2002 ! * @version $Revision$ ! */ ! public class ConnectionMetaData implements ProfileMetaData ! { ! /** Description of the Field */ ! protected String[] keys = new String[]{ ! ConnectionMetaData.CLASS_NAME, ! ConnectionMetaData.FACTORY, ! ConnectionMetaData.PACKAGES, ! ConnectionMetaData.URL, ! ConnectionMetaData.SERVICE, ! ConnectionMetaData.CONTEXT, ! ConnectionMetaData.PRINCIPAL, ! ConnectionMetaData.CREDENTIALS ! }; ! ! /** Description of the Field */ ! public final static String CLASS_NAME = "classname"; ! /** Description of the Field */ ! public final static String CONTEXT = "context"; ! /** Description of the Field */ ! public final static String CREDENTIALS = "credentials"; ! /** Description of the Field */ ! public final static String FACTORY = "factory"; ! /** Description of the Field */ ! public final static String PACKAGES = "packages"; ! /** Description of the Field */ ! public final static String PRINCIPAL = "principal"; ! /** Description of the Field */ ! public final static String URL = "url"; ! /** Description of the Field */ ! public final static String SERVICE = "service"; ! ! ! /** Constructor for ConnectionMetaData. */ ! public ConnectionMetaData() ! { ! super(); ! } ! ! ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName() ! { ! return "/jmx.connection.properties"; ! } ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index) ! { ! return this.keys[index]; ! } ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys() ! { ! return this.keys; ! } ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix() ! { ! return "connection"; ! } ! } --- 1,98 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import org.ejtools.util.service.ProfileMetaData; ! ! /** ! * @author letiembl ! * @created 14 novembre 2002 ! * @version $Revision$ ! */ ! public class ConnectionMetaData implements ProfileMetaData ! { ! /** Description of the Field */ ! protected String[] keys = new String[]{ ! ConnectionMetaData.CLASS_NAME, ! ConnectionMetaData.FACTORY, ! ConnectionMetaData.PACKAGES, ! ConnectionMetaData.URL, ! ConnectionMetaData.SERVICE, ! ConnectionMetaData.CONTEXT, ! ConnectionMetaData.PRINCIPAL, ! ConnectionMetaData.CREDENTIALS ! }; ! ! /** Description of the Field */ ! public final static String CLASS_NAME = "classname"; ! /** Description of the Field */ ! public final static String CONTEXT = "context"; ! /** Description of the Field */ ! public final static String CREDENTIALS = "credentials"; ! /** Description of the Field */ ! public final static String FACTORY = "factory"; ! /** Description of the Field */ ! public final static String PACKAGES = "packages"; ! /** Description of the Field */ ! public final static String PRINCIPAL = "principal"; ! /** Description of the Field */ ! public final static String URL = "url"; ! /** Description of the Field */ ! public final static String SERVICE = "service"; ! ! ! /** Constructor for ConnectionMetaData. */ ! public ConnectionMetaData() ! { ! super(); ! } ! ! ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName() ! { ! return "/jmx.connection.properties"; ! } ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index) ! { ! return this.keys[index]; ! } ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys() ! { ! return this.keys; ! } ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix() ! { ! return "connection"; ! } ! } Index: ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConnectionService.java 10 Feb 2003 20:49:31 -0000 1.1 --- ConnectionService.java 13 Dec 2003 22:15:07 -0000 1.2 *************** *** 1,52 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! ! import javax.management.MBeanServer; ! ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface ConnectionService extends Serializable ! { ! /** ! * Gets the mBeanServer attribute of the ConnectionService object ! * ! * @return The mBeanServer value ! */ ! public MBeanServer getMBeanServer(); ! ! ! /** ! * Gets the connected attribute of the ConnectionService object ! * ! * @return The connected value ! */ ! public boolean isConnected(); ! ! ! /** ! * Description of the Method ! * ! * @param profile Description of the Parameter ! */ ! public void connect(Profile profile); ! ! ! /** Description of the Method */ ! public void disconnect(); ! } ! --- 1,52 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! ! import javax.management.MBeanServer; ! ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface ConnectionService extends Serializable ! { ! /** ! * Gets the mBeanServer attribute of the ConnectionService object ! * ! * @return The mBeanServer value ! */ ! public MBeanServer getMBeanServer(); ! ! ! /** ! * Gets the connected attribute of the ConnectionService object ! * ! * @return The connected value ! */ ! public boolean isConnected(); ! ! ! /** ! * Description of the Method ! * ! * @param profile Description of the Parameter ! */ ! public void connect(Profile profile); ! ! ! /** Description of the Method */ ! public void disconnect(); ! } ! Index: ConnectionServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionServiceProvider.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConnectionServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.4 --- ConnectionServiceProvider.java 13 Dec 2003 22:15:07 -0000 1.5 *************** *** 1,134 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jmx.browser.model.connector.LocalConnectionService; ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ConnectionServiceProvider extends CustomBeanContextServiceProvider ! { ! /** Description of the Field */ ! protected ConnectionService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ConnectionServiceProvider.class); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public ConnectionServiceProvider() ! { ! this.setup(new LocalConnectionService()); ! } ! ! ! /** ! * Constructor for the ConnectionServiceProvider object ! * ! * @param metadata Description of the Parameter ! * @param loader Description of the Parameter ! */ ! public ConnectionServiceProvider(Profile metadata) ! { ! // Create the connection service from metadatas ! String clazz = metadata.getProperty(ConnectionMetaData.CLASS_NAME); ! if (clazz != null) ! { ! try ! { ! ConnectionService service = (ConnectionService) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); ! this.setup(service); ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.error(cnfe.getMessage(), cnfe); ! } ! catch (IllegalAccessException iae) ! { ! logger.error(iae.getMessage(), iae); ! } ! catch (Exception e) ! { ! logger.error(e.getMessage(), e); ! } ! } ! else ! { ! logger.error("Class provided is null"); ! } ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{ConnectionService.class}; ! } ! ! ! /** ! * Description of the Method ! * ! * @param service Description of the Parameter ! */ ! private void setup(ConnectionService service) ! { ! this.service = service; ! } ! } --- 1,134 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jmx.browser.model.connector.LocalConnectionService; ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ConnectionServiceProvider extends CustomBeanContextServiceProvider ! { ! /** Description of the Field */ ! protected ConnectionService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ConnectionServiceProvider.class); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public ConnectionServiceProvider() ! { ! this.setup(new LocalConnectionService()); ! } ! ! ! /** ! * Constructor for the ConnectionServiceProvider object ! * ! * @param metadata Description of the Parameter ! * @param loader Description of the Parameter ! */ ! public ConnectionServiceProvider(Profile metadata) ! { ! // Create the connection service from metadatas ! String clazz = metadata.getProperty(ConnectionMetaData.CLASS_NAME); ! if (clazz != null) ! { ! try ! { ! ConnectionService service = (ConnectionService) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); ! this.setup(service); ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.error(cnfe.getMessage(), cnfe); ! } ! catch (IllegalAccessException iae) ! { ! logger.error(iae.getMessage(), iae); ! } ! catch (Exception e) ! { ! logger.error(e.getMessage(), e); ! } ! } ! else ! { ! logger.error("Class provided is null"); ! } ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{ConnectionService.class}; ! } ! ! ! /** ! * Description of the Method ! * ! * @param service Description of the Parameter ! */ ! private void setup(ConnectionService service) ! { ! this.service = service; ! } ! } |
From: <let...@us...> - 2003-12-14 08:39:25
|
Update of /cvsroot/ejtools/plugins/maven-ejtools-plugin In directory sc8-pr-cvs1:/tmp/cvs-serv25548/plugins/maven-ejtools-plugin Modified Files: plugin.jelly project.xml Log Message: Add the license downloading. Index: plugin.jelly =================================================================== RCS file: /cvsroot/ejtools/plugins/maven-ejtools-plugin/plugin.jelly,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** plugin.jelly 27 Nov 2003 00:33:30 -0000 1.6 --- plugin.jelly 13 Dec 2003 20:40:11 -0000 1.7 *************** *** 11,34 **** --> <project xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:define="jelly:define" xmlns:deploy="deploy" xmlns:util="jelly:util" xmlns:log="jelly:log" xmlns:m="maven" xmlns:license="license" xmlns:ejtools="ejtools" xmlns:velocity="jelly:org.apache.commons.jelly.tags.velocity.VelocityTagLibrary"> ! <!--==================================================================--> ! <!-- EJTools Tag Library --> ! <!--==================================================================--> ! <define:taglib uri="ejtools"> ! <!--******************************************************************--> ! <!-- Append the version number to a file --> ! <!-- --> ! <!-- @file : the file to version --> ! <!-- @extension : the file extension --> ! <!--******************************************************************--> ! <define:tag name="archive-version"> ! <copy file="${file}.${extension}" tofile="${file}-${pom.currentVersion}.${extension}"/> ! </define:tag> ! </define:taglib> ! <!--==================================================================--> ! <!-- Create the EJTools logo for the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:logo" description="Create the EJTools logo for the App archive"> ! <velocity:merge name="${maven.build.dest}/images/logo.svg" basedir="${plugin.resources}" template="logo.svg"/> ! <java classname="org.apache.batik.apps.rasterizer.Main" fork="true"> <arg value="-d"/> <arg value="${maven.build.dest}/images"/> --- 11,46 ---- --> <project xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:define="jelly:define" xmlns:deploy="deploy" xmlns:util="jelly:util" xmlns:log="jelly:log" xmlns:m="maven" xmlns:license="license" xmlns:ejtools="ejtools" xmlns:velocity="jelly:org.apache.commons.jelly.tags.velocity.VelocityTagLibrary"> ! <!--==================================================================--> ! <!-- EJTools Tag Library --> ! <!--==================================================================--> ! <define:taglib uri="ejtools"> ! <!--******************************************************************--> ! <!-- Append the version number to a file --> ! <!-- --> ! <!-- @file : the file to version --> ! <!-- @extension : the file extension --> ! <!--******************************************************************--> ! <define:tag name="archive-version"> ! <copy file="${file}.${extension}" tofile="${file}-${pom.currentVersion}.${extension}"/> ! </define:tag> ! <define:tag name="download-license"> ! <j:if test="${ejtools.download.license}"> ! <util:tokenize var="locations" delim=",">${maven.repo.remote}</util:tokenize> ! <j:forEach var="location" items="${locations}"> ! <j:set var="locationURL">${location}</j:set> ! <j:set var="artifactName">${artifact.toUpperCase()}</j:set> ! <get src="${locationURL}/${artifact}/licenses/LICENSE.txt" dest="${destDir}/LICENSE.${artifactName}.txt" verbose="false" ignoreerrors="true"/> ! <get src="${locationURL}/${artifact}/licenses/license.txt" dest="${destDir}/LICENSE.${artifactName}.txt" verbose="false" ignoreerrors="true"/> ! </j:forEach> ! </j:if> ! </define:tag> ! </define:taglib> ! <!--==================================================================--> ! <!-- Create the EJTools logo for the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:logo" description="Create the EJTools logo for the App archive"> ! <j:if test="${ejtools.generate.svg}"> ! <velocity:merge name="${maven.build.dest}/images/logo.svg" basedir="${plugin.resources}" template="logo.svg"/> ! <java classname="org.apache.batik.apps.rasterizer.Main" fork="true"> <arg value="-d"/> <arg value="${maven.build.dest}/images"/> *************** *** 41,310 **** <arg value="${maven.build.dest}/images/logo.svg"/> <classpath> ! <pathelement location="${plugin.getDependencyPath('batik')}"/> </classpath> ! </java> ! <delete file="${maven.build.dest}/images/logo.svg"/> ! </goal> ! <!--==================================================================--> ! <!-- Prepare the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:app-prepare" description="Prepare the App archive"> ! <mkdir dir="${maven.ejtools.app.dest.dir}"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/bin"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/conf"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/logs"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/lib"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/lib/ext"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/logs"/> ! <!-- --> ! <touch file="${maven.ejtools.app.dest.dir}/lib/ext/donotremove"/> ! <touch file="${maven.ejtools.app.dest.dir}/logs/donotremove"/> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}/bin"> ! <fileset dir="${basedir}/src/bin"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}/conf"> ! <fileset dir="${basedir}/src/conf"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}/lib"> ! <mapper type="flatten"/> ! <fileset dir="${maven.repo.local}/${pom.artifactDirectory}/jars/"> ! <include name="${maven.final.name}.jar"/> ! </fileset> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('app.bundle.jar')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/"> ! <include name="${dep.artifact}"/> ! </fileset> ! </j:if> ! </j:forEach> ! </copy> ! <!-- --> ! <jar jarfile="${maven.ejtools.app.dest.dir}/bin/run.jar" basedir="${maven.build.dest}" includes="${maven.ejtools.app.launch.includes}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Main-Class" value="${maven.ejtools.app.launch.class}"/> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <attribute name="Class-Path" value="${maven.ejtools.app.launch.classpath}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! </goal> ! <!--==================================================================--> ! <!-- Package the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:app" prereqs="ejtools:app-prepare" description="Package the App archive"> ! <property name="maven.ejtools.app.final.name" value="${maven.ejtools.archive.name}"/> ! <mkdir dir="${maven.ejtools.app.build.dir}"/> ! <zip basedir="${maven.ejtools.app.dest.dir}" destfile="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}.zip"/> ! <tar compression="gzip" destfile="${maven.ejtools.mbean.build.dir}/${maven.ejtools.app.final.name}.tar.gz"> ! <tarfileset dir="${maven.ejtools.app.dest.dir}" mode="755"> ! <include name="**/*.sh"/> ! </tarfileset> ! <tarfileset dir="${maven.ejtools.app.dest.dir}"> ! <exclude name="**/*.sh"/> ! </tarfileset> ! </tar> ! <ejtools:archive-version file="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}" extension="zip"/> ! <ejtools:archive-version file="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}" extension="tar.gz"/> ! </goal> ! <!--==================================================================--> ! <!-- Unpack the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:app-unpack" description="Unpack the App archive"> ! <property name="maven.ejtools.app.final.name" value="${maven.ejtools.archive.name}"/> ! <unzip src="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}.zip" dest="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}" overwrite="true"/> ! </goal> ! <!--==================================================================--> ! <!-- Prepare a WebApp archive --> ! <!--==================================================================--> ! <goal name="ejtools:webapp-prepare" description="Prepare the Web archive"> ! <mkdir dir="${maven.ejtools.webapp.dest.dir}"/> ! <mkdir dir="${maven.ejtools.webapp.dest.dir}/WEB-INF"/> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}"> ! <fileset dir="${maven.ejtools.webapp.source.dir}/content"> ! <exclude name="**/*.xml"/> ! <exclude name="**/*.xsl"/> ! </fileset> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}/WEB-INF"> ! <fileset dir="${maven.ejtools.webapp.source.dir}/resources"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}/WEB-INF"> ! <fileset dir="${maven.xdoclet.webdoclet.destDir}"/> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('war.bundle.tld')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/tlds/"> ! <include name="${dep.artifactId}.tld"/> ! </fileset> ! </j:if> ! </j:forEach> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}/WEB-INF/lib"> ! <mapper type="flatten"/> ! <fileset dir="${maven.repo.local}/${pom.artifactDirectory}/jars/"> ! <include name="${maven.final.name}.jar"/> ! </fileset> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('war.bundle.jar')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/"> ! <include name="${dep.artifact}"/> ! </fileset> ! </j:if> ! </j:forEach> ! </copy> ! </goal> ! <!--==================================================================--> ! <!-- Package the Web Archive --> ! <!--==================================================================--> ! <goal name="ejtools:webapp" prereqs="ejtools:webapp-prepare" description="Package the Web archive"> ! <property name="maven.ejtools.webapp.final.name" value="${maven.ejtools.archive.name}.war"/> ! <mkdir dir="${maven.ejtools.webapp.build.dir}"/> ! <jar jarfile="${maven.ejtools.webapp.build.dir}/${maven.ejtools.webapp.final.name}" basedir="${maven.ejtools.webapp.dest.dir}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! <ejtools:archive-version file="${maven.ejtools.webapp.build.dir}/${maven.ejtools.app.final.name}" extension="war"/> ! </goal> ! <!--==================================================================--> ! <!-- Prepare the Sar archive --> ! <!--==================================================================--> ! <goal name="ejtools:mbean-prepare" description="Prepare the Sar archive"> ! <mkdir dir="${maven.ejtools.mbean.dest.dir}"/> ! <mkdir dir="${maven.ejtools.mbean.dest.dir}/META-INF"/> ! <!-- --> ! <copy todir="${maven.ejtools.mbean.dest.dir}/META-INF"> ! <fileset dir="${maven.ejtools.mbean.source.dir}/resources"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.mbean.dest.dir}"> ! <mapper type="flatten"/> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('mbean.bundle.jar')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/"> ! <include name="${dep.artifact}"/> ! </fileset> ! </j:if> ! </j:forEach> ! <fileset dir="${maven.build.dir}" includes="${maven.ejtools.mbean.archive.includes}"/> ! </copy> ! <!-- --> ! <jar jarfile="${maven.ejtools.mbean.dest.dir}/${maven.final.name}.jar" basedir="${maven.build.dest}" includes="${maven.ejtools.mbean.includes}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! </goal> ! <!--==================================================================--> ! <!-- Package the Sar Archive --> ! <!--==================================================================--> ! <goal name="ejtools:mbean" prereqs="ejtools:mbean-prepare" description="Build a sar file"> ! <property name="maven.ejtools.mbean.final.name" value="${maven.ejtools.archive.name}.sar"/> ! <mkdir dir="${maven.ejtools.mbean.build.dir}"/> ! <jar jarfile="${maven.ejtools.mbean.build.dir}/${maven.ejtools.mbean.final.name}" basedir="${maven.ejtools.mbean.dest.dir}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! <ejtools:archive-version file="${maven.ejtools.mbean.build.dir}/${maven.ejtools.app.final.name}" extension="sar"/> ! </goal> ! <!--==================================================================--> ! <!-- Install the TLD into the repository --> ! <!--==================================================================--> ! <goal name="ejtools:install-tld" description="Install a TLD"> ! <echo> id = '${pom.artifactId}' groupId = '${pom.groupId}' artifactDirectory = '${pom.artifactDirectory}' </echo> ! <property name="tlddir__" value="${maven.repo.local}/${pom.artifactDirectory}/tlds"/> ! <mkdir dir="${tlddir__}"/> ! <copy file="${maven.build.dir}/xdoclet/webdoclet/WEB-INF/${pom.artifactId}.tld" todir="${tlddir__}" overwrite="true"/> ! </goal> ! <!--==================================================================--> ! <!-- Create documentation --> ! <!-- * Transform DocBook into PDF --> ! <!-- * Transform DocBook into HTML --> ! <!--==================================================================--> ! <goal name="ejtools:docbook" description="Generates DocBook documentation"> ! <echo></echo> ! ! </goal> </project> --- 53,331 ---- <arg value="${maven.build.dest}/images/logo.svg"/> <classpath> ! <pathelement location="${plugin.getDependencyPath('batik')}"/> </classpath> ! </java> ! <delete file="${maven.build.dest}/images/logo.svg"/> ! </j:if> ! </goal> ! <!--==================================================================--> ! <!-- Prepare the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:app-prepare" description="Prepare the App archive"> ! <mkdir dir="${maven.ejtools.app.dest.dir}"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/bin"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/conf"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/logs"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/lib"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/lib/ext"/> ! <mkdir dir="${maven.ejtools.app.dest.dir}/logs"/> ! <!-- --> ! <touch file="${maven.ejtools.app.dest.dir}/lib/ext/donotremove"/> ! <touch file="${maven.ejtools.app.dest.dir}/logs/donotremove"/> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}/bin"> ! <fileset dir="${basedir}/src/bin"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}"> ! <fileset dir="${basedir}/src/conf"> ! <include name="README*"/> ! </fileset> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}/conf"> ! <fileset dir="${basedir}/src/conf"> ! <exclude name="README*"/> ! </fileset> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.app.dest.dir}/lib"> ! <mapper type="flatten"/> ! <fileset dir="${maven.repo.local}/${pom.artifactDirectory}/jars/"> ! <include name="${maven.final.name}.jar"/> ! </fileset> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('app.bundle.jar')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/"> ! <include name="${dep.artifact}"/> ! </fileset> ! <ejtools:download-license artifact="${dep.artifactDirectory}" destDir="${maven.ejtools.app.dest.dir}/lib"/> ! </j:if> ! </j:forEach> ! </copy> ! <!-- --> ! <jar jarfile="${maven.ejtools.app.dest.dir}/bin/run.jar" basedir="${maven.build.dest}" includes="${maven.ejtools.app.launch.includes}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Main-Class" value="${maven.ejtools.app.launch.class}"/> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <attribute name="Class-Path" value="${maven.ejtools.app.launch.classpath}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! </goal> ! <!--==================================================================--> ! <!-- Package the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:app" prereqs="ejtools:app-prepare" description="Package the App archive"> ! <property name="maven.ejtools.app.final.name" value="${maven.ejtools.archive.name}"/> ! <mkdir dir="${maven.ejtools.app.build.dir}"/> ! <zip basedir="${maven.ejtools.app.dest.dir}" destfile="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}.zip"/> ! <tar compression="gzip" destfile="${maven.ejtools.mbean.build.dir}/${maven.ejtools.app.final.name}.tar.gz"> ! <tarfileset dir="${maven.ejtools.app.dest.dir}" mode="755"> ! <include name="**/*.sh"/> ! </tarfileset> ! <tarfileset dir="${maven.ejtools.app.dest.dir}"> ! <exclude name="**/*.sh"/> ! </tarfileset> ! </tar> ! <ejtools:archive-version file="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}" extension="zip"/> ! <ejtools:archive-version file="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}" extension="tar.gz"/> ! </goal> ! <!--==================================================================--> ! <!-- Unpack the App archive --> ! <!--==================================================================--> ! <goal name="ejtools:app-unpack" description="Unpack the App archive"> ! <property name="maven.ejtools.app.final.name" value="${maven.ejtools.archive.name}"/> ! <unzip src="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}.zip" dest="${maven.ejtools.app.build.dir}/${maven.ejtools.app.final.name}" overwrite="true"/> ! </goal> ! <!--==================================================================--> ! <!-- Prepare a WebApp archive --> ! <!--==================================================================--> ! <goal name="ejtools:webapp-prepare" description="Prepare the Web archive"> ! <mkdir dir="${maven.ejtools.webapp.dest.dir}"/> ! <mkdir dir="${maven.ejtools.webapp.dest.dir}/WEB-INF"/> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}"> ! <fileset dir="${maven.ejtools.webapp.source.dir}/content"> ! <exclude name="**/*.xml"/> ! <exclude name="**/*.xsl"/> ! </fileset> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}/WEB-INF"> ! <fileset dir="${maven.ejtools.webapp.source.dir}/resources"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}/WEB-INF"> ! <fileset dir="${maven.xdoclet.webdoclet.destDir}"/> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('war.bundle.tld')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/tlds/"> ! <include name="${dep.artifactId}.tld"/> ! </fileset> ! </j:if> ! </j:forEach> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.webapp.dest.dir}/WEB-INF/lib"> ! <mapper type="flatten"/> ! <fileset dir="${maven.repo.local}/${pom.artifactDirectory}/jars/"> ! <include name="${maven.final.name}.jar"/> ! </fileset> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('war.bundle.jar')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/"> ! <include name="${dep.artifact}"/> ! </fileset> ! </j:if> ! </j:forEach> ! </copy> ! </goal> ! <!--==================================================================--> ! <!-- Package the Web Archive --> ! <!--==================================================================--> ! <goal name="ejtools:webapp" prereqs="ejtools:webapp-prepare" description="Package the Web archive"> ! <property name="maven.ejtools.webapp.final.name" value="${maven.ejtools.archive.name}.war"/> ! <mkdir dir="${maven.ejtools.webapp.build.dir}"/> ! <jar jarfile="${maven.ejtools.webapp.build.dir}/${maven.ejtools.webapp.final.name}" basedir="${maven.ejtools.webapp.dest.dir}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! <ejtools:archive-version file="${maven.ejtools.webapp.build.dir}/${maven.ejtools.app.final.name}" extension="war"/> ! </goal> ! <!--==================================================================--> ! <!-- Prepare the Sar archive --> ! <!--==================================================================--> ! <goal name="ejtools:mbean-prepare" description="Prepare the Sar archive"> ! <mkdir dir="${maven.ejtools.mbean.dest.dir}"/> ! <mkdir dir="${maven.ejtools.mbean.dest.dir}/META-INF"/> ! <!-- --> ! <copy todir="${maven.ejtools.mbean.dest.dir}/META-INF"> ! <fileset dir="${maven.ejtools.mbean.source.dir}/resources"/> ! </copy> ! <!-- --> ! <copy todir="${maven.ejtools.mbean.dest.dir}"> ! <mapper type="flatten"/> ! <j:forEach var="dep" items="${pom.dependencies}"> ! <j:if test="${dep.getProperty('mbean.bundle.jar')=='true'}"> ! <fileset dir="${maven.repo.local}/${dep.artifactDirectory}/jars/"> ! <include name="${dep.artifact}"/> ! </fileset> ! </j:if> ! </j:forEach> ! <fileset dir="${maven.build.dir}" includes="${maven.ejtools.mbean.archive.includes}"/> ! </copy> ! <!-- --> ! <jar jarfile="${maven.ejtools.mbean.dest.dir}/${maven.final.name}.jar" basedir="${maven.build.dest}" includes="${maven.ejtools.mbean.includes}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! </goal> ! <!--==================================================================--> ! <!-- Package the Sar Archive --> ! <!--==================================================================--> ! <goal name="ejtools:mbean" prereqs="ejtools:mbean-prepare" description="Build a sar file"> ! <property name="maven.ejtools.mbean.final.name" value="${maven.ejtools.archive.name}.sar"/> ! <mkdir dir="${maven.ejtools.mbean.build.dir}"/> ! <jar jarfile="${maven.ejtools.mbean.build.dir}/${maven.ejtools.mbean.final.name}" basedir="${maven.ejtools.mbean.dest.dir}"> ! <j:set var="licenseFileName"> ! <license:fileName/> ! </j:set> ! <util:file name="${licenseFileName}" var="licenseFile"/> ! <metainf dir="${licenseFile.canonicalFile.parent}"> ! <include name="${licenseFile.canonicalFile.name}"/> ! </metainf> ! <manifest> ! <attribute name="Built-By" value="${user.name}"/> ! <attribute name="Created-By" value="Apache Jakarta Maven"/> ! <attribute name="Package" value="${pom.package}"/> ! <attribute name="Build-Jdk" value="${java.version}"/> ! <section name="${pom.package}"> ! <attribute name="Specification-Title" value="${pom.artifactId}"/> ! <attribute name="Specification-Version" value="${pom.currentVersion}"/> ! <attribute name="Specification-Vendor" value="${pom.organization.name}"/> ! <attribute name="Implementation-Title" value="${pom.package}"/> ! <attribute name="Implementation-Version" value="${pom.currentVersion}"/> ! <attribute name="Implementation-Vendor" value="${pom.organization.name}"/> ! </section> ! </manifest> ! </jar> ! <ejtools:archive-version file="${maven.ejtools.mbean.build.dir}/${maven.ejtools.app.final.name}" extension="sar"/> ! </goal> ! <!--==================================================================--> ! <!-- Install the TLD into the repository --> ! <!--==================================================================--> ! <goal name="ejtools:install-tld" description="Install a TLD"> ! <echo> id = '${pom.artifactId}' groupId = '${pom.groupId}' artifactDirectory = '${pom.artifactDirectory}' </echo> ! <property name="tlddir__" value="${maven.repo.local}/${pom.artifactDirectory}/tlds"/> ! <mkdir dir="${tlddir__}"/> ! <copy file="${maven.build.dir}/xdoclet/webdoclet/WEB-INF/${pom.artifactId}.tld" todir="${tlddir__}" overwrite="true"/> ! </goal> ! <!--==================================================================--> ! <!-- Create documentation --> ! <!-- * Transform DocBook into PDF --> ! <!-- * Transform DocBook into HTML --> ! <!--==================================================================--> ! <goal name="ejtools:docbook" description="Generates DocBook documentation"> ! <echo/> ! </goal> </project> Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/plugins/maven-ejtools-plugin/project.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** project.xml 27 Nov 2003 00:33:30 -0000 1.5 --- project.xml 13 Dec 2003 20:40:11 -0000 1.6 *************** *** 11,71 **** --> <project> ! <pomVersion>3</pomVersion> ! <id>maven-ejtools-plugin</id> ! <name>EJTools Builder Plugin</name> ! <currentVersion>1.0</currentVersion> ! <description/> ! <shortDescription/> ! <developers> ! <developer> ! <name>Laurent Etiemble</name> ! <id>letiemble</id> ! <email>let...@us...</email> ! </developer> ! </developers> ! <dependencies> ! <dependency> ! <id>batik</id> ! <version>1.1.1</version> ! </dependency> ! </dependencies> ! <dependencies> ! <dependency> ! <id>xalan</id> ! <version>2.5.1</version> ! </dependency> ! </dependencies> ! <dependencies> ! <dependency> ! <id>xerces</id> ! <version>2.4.0</version> ! </dependency> ! </dependencies> ! <dependencies> ! <dependency> ! <id>xml-apis</id> ! <version>1.0.b2</version> ! </dependency> ! </dependencies> ! <build> ! <sourceDirectory>${basedir}/src/main</sourceDirectory> ! <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory> ! <unitTest> <includes> ! <include>**/*Test.java</include> </includes> ! </unitTest> ! <resources> ! <resource> ! <directory>${basedir}</directory> ! <includes> ! <include>plugin.jelly</include> ! <include>plugin.properties</include> ! <include>project.properties</include> ! <include>project.xml</include> ! <include>plugin-resources/**</include> ! </includes> ! </resource> ! </resources> ! </build> </project> --- 11,53 ---- --> <project> ! <pomVersion>3</pomVersion> ! <id>maven-ejtools-plugin</id> ! <name>EJTools Builder Plugin</name> ! <currentVersion>1.0</currentVersion> ! <description/> ! <shortDescription/> ! <developers> ! <developer> ! <name>Laurent Etiemble</name> ! <id>letiemble</id> ! <email>let...@us...</email> ! </developer> ! </developers> ! <dependencies> ! <dependency> ! <id>batik</id> ! <version>1.1.1</version> ! </dependency> ! </dependencies> ! <build> ! <sourceDirectory>${basedir}/src/main</sourceDirectory> ! <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory> ! <unitTest> ! <includes> ! <include>**/*Test.java</include> ! </includes> ! </unitTest> ! <resources> ! <resource> ! <directory>${basedir}</directory> <includes> ! <include>plugin.jelly</include> ! <include>plugin.properties</include> ! <include>project.properties</include> ! <include>project.xml</include> ! <include>plugin-resources/**</include> </includes> ! </resource> ! </resources> ! </build> </project> |
From: <let...@us...> - 2003-12-14 08:39:24
|
Update of /cvsroot/ejtools/thirdparty/sun/jars In directory sc8-pr-cvs1:/tmp/cvs-serv29243 Removed Files: j2ee-1.3.1.jar j2ee-1.4.0.jar jsr77-1.1.jar jsr88-1.0.jar Log Message: Removing unused libraries. --- j2ee-1.3.1.jar DELETED --- --- j2ee-1.4.0.jar DELETED --- --- jsr77-1.1.jar DELETED --- --- jsr88-1.0.jar DELETED --- |
From: <let...@us...> - 2003-12-14 08:39:24
|
Update of /cvsroot/ejtools/thirdparty/sun/licenses In directory sc8-pr-cvs1:/tmp/cvs-serv29559/sun/licenses Log Message: Directory /cvsroot/ejtools/thirdparty/sun/licenses added to the repository |
From: <let...@us...> - 2003-12-14 08:39:24
|
Update of /cvsroot/ejtools/thirdparty/ejtools/licenses In directory sc8-pr-cvs1:/tmp/cvs-serv29834/ejtools/licenses Added Files: LICENSE.txt Log Message: Add licenses for each used library. --- NEW FILE: LICENSE.txt --- GNU Lesser General Public License Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |