You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2004/03/09 01:27:08 UTC
cvs commit: avalon/merlin/facilities/finder/test/src/java/org/apache/avalon/finder/test ECMWidget.java
mcconnell 2004/03/08 16:27:08
Modified: merlin/facilities/finder maven.xml project.properties
project.xml
merlin/facilities/finder/ecm/src/java/org/apache/avalon/finder/ecm
DefaultRoleManager.java ECM.java
Added: merlin/facilities/finder LICENSE.txt
merlin/facilities/finder/site/etc site.jsl stylesheet.css
merlin/facilities/finder/site/xdocs api.xml impl.xml
index.xml navigation.xml
merlin/facilities/finder/test/src/java/org/apache/avalon/finder/test
ECMWidget.java
Log:
Add some initial docs about the finder project.
Revision Changes Path
1.2 +3 -2 avalon/merlin/facilities/finder/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/facilities/finder/maven.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- maven.xml 7 Mar 2004 22:05:48 -0000 1.1
+++ maven.xml 9 Mar 2004 00:27:08 -0000 1.2
@@ -33,7 +33,7 @@
<maven:reactor basedir="${basedir}"
includes="*/project.xml"
- excludes="project.xml"
+ excludes="project.xml,test/**"
banner="Site Prep:"
ignoreFailures="false"
postProcessing="true" />
@@ -74,7 +74,8 @@
<classpath>
<path refid="template.classpath"/>
</classpath>
- <link href="http://java.sun.com/j2se/1.4.2/docs/api/" />
+ <link href="${sun.j2se.link}" />
+ <link href="${avalon.framework.link}" />
<!-- allow custom tags -->
<util:tokenize var="listOfTags" delim=" ">${maven.javadoc.customtags}</util:tokenize>
<j:forEach var="someTag" items="${listOfTags}">
1.2 +16 -0 avalon/merlin/facilities/finder/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/avalon/merlin/facilities/finder/project.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.properties 7 Mar 2004 22:05:48 -0000 1.1
+++ project.properties 9 Mar 2004 00:27:08 -0000 1.2
@@ -1,4 +1,12 @@
+maven.ui.banner.background = #fff
+maven.ui.banner.foreground = #000
+maven.xdoc.jsl = ./site/etc/site.jsl
+maven.javadoc.stylesheet =${basedir}/site/etc/stylesheet.css
+maven.xdoc.poweredby.image=
+maven.docs.src = ${basedir}/site/xdocs
+maven.license.licenseFile = ${basedir}/LICENSE.txt
+
#
# custom tags spec
#
@@ -14,5 +22,13 @@
service.enabled = true
service.scope = class
+#
+# Declaration of the remote links to assign on javadoc generation.
+# Link declarations can be overriden in the user's build.properties
+# file.
+#
+
+sun.j2se.link = http://java.sun.com/j2se/1.4/docs/api/
+avalon.framework.link = http://avalon.apache.org/framework/api/
1.2 +18 -2 avalon/merlin/facilities/finder/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/facilities/finder/project.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.xml 7 Mar 2004 22:05:48 -0000 1.1
+++ project.xml 9 Mar 2004 00:27:08 -0000 1.2
@@ -4,9 +4,21 @@
<groupId>avalon-finder</groupId>
<name>Avalon Finder</name>
- <currentVersion>1.0</currentVersion>
+ <currentVersion>SNAPSHOT</currentVersion>
<shortDescription>Avalon Service Finder.</shortDescription>
+ <organization>
+ <name>The Apache Software Foundation</name>
+ <url>http://avalon.apache.org/</url>
+ <logo>http://avalon.apache.org/images/apache-avalon-logo.png</logo>
+ </organization>
+ <inceptionYear>1997</inceptionYear>
+
+ <repository>
+ <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:avalon/merlin/facilities/finder</connection>
+ <url>http://cvs.apache.org/viewcvs/avalon/merlin/facilities/finder</url>
+ </repository>
+
<packageGroups>
<packageGroup>
<title>Avalon Finder API</title>
@@ -14,7 +26,11 @@
</packageGroup>
<packageGroup>
<title>Avalon Finder Implementation</title>
- <packages>org.apache.avalon.finder.*</packages>
+ <packages>org.apache.avalon.finder.impl,org.apache.avalon.finder.impl.*</packages>
+ </packageGroup>
+ <packageGroup>
+ <title>ECM Simulator</title>
+ <packages>org.apache.avalon.finder.ecm,org.apache.avalon.finder.ecm.*</packages>
</packageGroup>
</packageGroups>
1.1 avalon/merlin/facilities/finder/LICENSE.txt
Index: LICENSE.txt
===================================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
1.2 +9 -1 avalon/merlin/facilities/finder/ecm/src/java/org/apache/avalon/finder/ecm/DefaultRoleManager.java
Index: DefaultRoleManager.java
===================================================================
RCS file: /home/cvs/avalon/merlin/facilities/finder/ecm/src/java/org/apache/avalon/finder/ecm/DefaultRoleManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultRoleManager.java 8 Mar 2004 01:36:08 -0000 1.1
+++ DefaultRoleManager.java 9 Mar 2004 00:27:08 -0000 1.2
@@ -38,7 +38,15 @@
*/
public class DefaultRoleManager implements RoleManager, Configurable
{
+ //-----------------------------------------------------------
+ // state
+ //-----------------------------------------------------------
+
private Role[] m_roles;
+
+ //-----------------------------------------------------------
+ // Configurable
+ //-----------------------------------------------------------
public void configure( Configuration config )
throws ConfigurationException
1.2 +41 -2 avalon/merlin/facilities/finder/ecm/src/java/org/apache/avalon/finder/ecm/ECM.java
Index: ECM.java
===================================================================
RCS file: /home/cvs/avalon/merlin/facilities/finder/ecm/src/java/org/apache/avalon/finder/ecm/ECM.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ECM.java 8 Mar 2004 01:36:08 -0000 1.1
+++ ECM.java 9 Mar 2004 00:27:08 -0000 1.2
@@ -20,9 +20,13 @@
import org.apache.avalon.finder.Finder;
import org.apache.avalon.finder.FinderException;
+import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.configuration.Configurable;
/**
* A default implementation of a finder service that provides
@@ -36,7 +40,7 @@
* @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
* @version $Revision$ $Date$
*/
-public class ECM implements ServiceManager
+public class ECM implements ServiceManager, Configurable, Initializable
{
//---------------------------------------------------------
// immutable state
@@ -58,6 +62,12 @@
private final RoleManager m_manager;
//---------------------------------------------------------
+ // state
+ //---------------------------------------------------------
+
+ private Configuration m_config;
+
+ //---------------------------------------------------------
// constructor
//---------------------------------------------------------
@@ -84,6 +94,35 @@
m_logger = logger;
m_finder = (Finder) manager.lookup( "finder" );
m_manager = (RoleManager) manager.lookup( "roles" );
+ }
+
+ //-----------------------------------------------------------
+ // Configurable
+ //-----------------------------------------------------------
+
+ public void configure( Configuration config )
+ throws ConfigurationException
+ {
+ assertNotNull( config, "config" );
+ m_config = config;
+ }
+
+ //-----------------------------------------------------------
+ // Initializable
+ //-----------------------------------------------------------
+
+ public void initialize()
+ {
+ getLogger().info( "commencing ecm initialization" );
+
+ //
+ // What to do here.
+ //
+ // Possible approach is to read in the roles file
+ // and for all of the roles build the equivalent
+ // types and profiles in the model - or should we
+ // do this at runtime?
+ //
}
//---------------------------------------------------------
1.1 avalon/merlin/facilities/finder/site/etc/site.jsl
Index: site.jsl
===================================================================
<?xml version="1.0"?>
<!-- stylesheet to be used -->
<jsl:stylesheet select="$doc"
xmlns:define="jelly:define"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:log="jelly:log"
xmlns:util="jelly:util"
xmlns:x="jelly:xml"
xmlns:doc="doc"
xmlns="dummy" trim="false">
<jsl:template match="document" trim="false">
<j:useBean var="navbean" class="org.apache.maven.NavBean"/>
<j:set var="location" value="${outFile.substring(destdir.length())}"/>
<util:replace var="location" oldChar="\" newChar="/" value="${location}"/>
<!-- Stores location for publish date / version -->
<j:set var="date">${maven.xdoc.date}</j:set>
<j:setProperties
object="${navbean}"
document="${doc}"
location="${location}"/>
<x:doctype name="html"
publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<html>
<head>
<j:set var="docTitle">
<x:expr select="./properties/title"/>
</j:set>
<x:if select="$nav/title">
<title>
<x:expr select="$nav/title"/> - ${docTitle}
</title>
</x:if>
<x:if select="not($nav/title)">
<title>${pom.name} - ${docTitle}</title>
</x:if>
<style type="text/css"><![CDATA[
@import url("${relativePath}/style/tigris.css");
@import url("${relativePath}/style/maven.css");
]]></style>
<util:file var="projectCssFile" name="${maven.docs.src}/style/project.css"/>
<j:if test="${projectCssFile.exists()}">
<style type="text/css"><![CDATA[
@import url("${relativePath}/style/project.css");
]]></style>
</j:if>
<!-- FIXME: once someone works out how to stop this breaking
<x:element name="script"><x:attribute name="type">text/javascript</x:attribute>
if (document.layers) {
document.writeln(''+
'<link rel="stylesheet" type="text/css" href="${relativePath}/style/ns4_only.css" media="screen" /><link rel="stylesheet" type="text/css" href="${relativePath}/style/maven_ns4_only.css" media="screen"/>');
}
</x:element>
-->
<link rel="stylesheet" type="text/css" href="${relativePath}/style/print.css" media="print"/>
<meta http-equiv="Content-Type" content="text/html; charset=${outputencoding}"></meta>
<x:forEach var="author" select="./properties/author">
<meta name="author" content="${author.text}"/>
<meta name="email" content="${author.attribute('email').value}"/>
</x:forEach>
<jsl:applyTemplates select="$doc/document/head/*"/>
</head>
<x:element name="body"><j:whitespace trim="true">
<x:attribute name="class">composite</x:attribute>
<x:forEach var="attr" select="$doc/document/body/@*">
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
</x:forEach>
</j:whitespace>
<div id="banner">
<table border="0" cellspacing="0" cellpadding="8" width="100%" height="103">
<tr>
<!-- organization logo -->
<td>
<j:set var="logo" value="${pom.organization.logo}"/>
<j:if test="${!empty(logo)}">
<!-- set url to org or project url -->
<j:set var="url" value="${pom.organization.url}"/>
<j:if test="${!empty(url)}">
<j:set var="home" value="${pom.organization.url}"/>
</j:if>
<j:if test="${empty(url)}">
<j:set var="home" value="${pom.url}"/>
</j:if>
<!-- set image to relative or complete -->
<j:set var="image" value="${pom.organization.logo}"/>
<j:if test="${!image.startsWith('http://')}">
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
<a href="${home}">
<img src="${image}" align="left" alt="${pom.organization.name}" border="0"/>
</a>
</j:if>
</td>
<td></td>
<!--
<td>
<div align="right" id="login">
<j:set var="logo" value="${pom.logo}"/>
<j:if test="${logo != null and logo != ''}">
<j:set var="image" value="${pom.logo}"/>
<j:if test="${!image.startsWith('http://')}">
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
<a href="${pom.url}">
<img src="${image}" align="right" alt="${pom.name}" border="0"/>
</a>
</j:if>
</div>
</td>
-->
</tr>
</table>
</div>
<div id="breadcrumbs">
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr>
<j:if test="${date == 'left'}">
<j:set var="version" value="${maven.xdoc.version}"/>
<td>Last published: ${build.date}
<j:if test="${!empty(version)}">| Doc for ${version}</j:if>
</td>
</j:if>
<td>
<div align="right">
<j:if test="${date == 'right'}">
Last published: ${build.date}
<x:if select="$nav/body/links">|</x:if>
</j:if>
<!-- render links -->
<x:if select="$nav/body/links">
<jsl:applyTemplates select="$nav/body/links"/>
</x:if>
<x:if select="not($nav/body/links)">
<!-- FIXME -->
</x:if>
</div>
</td>
</tr>
</table>
</div>
<!-- Body of the page -->
<table border="0" cellspacing="0" cellpadding="8" width="100%"> <!--id="main" -->
<tr valign="top">
<td id="leftcol" width="20%">
<div id="navcolumn">
<j:if test="${date == 'navigation-top'}">
<div>
<small>Last published: ${build.date}</small>
</div>
</j:if>
<x:if select="$nav">
<jsl:applyTemplates select="$nav/body/menu[not(@type) | @type='header'] | $nav/body/search"/>
</x:if>
<!-- Standard Maven Navigation -->
<j:set var="fileName">${file}</j:set>
<!--
! Check to see if the user wishes to include the
! maven-generated docs on their site.
!-->
<j:if test="${includeProjectDocumentation.equals('yes')}">
<div>
<strong>Project Documentation</strong>
<!--
<div>
<small>
<a href="${relativePath}/index.html">About ${pom.name}</a>
</small>
</div>
-->
<div>
<small>
<a href="${relativePath}/project-info.html">Project Info</a>
</small>
<util:tokenize var="projectInfoFiles" delim=",">${maven.xdoc.projectInfo}</util:tokenize>
<j:forEach var="infoFile" items="${projectInfoFiles}">
<j:if test="${relativePath == '.' and fileName.endsWith(infoFile)}">
<div>
<small>
<a href="${relativePath}/mail-lists.html">Mailing Lists</a>
</small>
</div>
<div>
<small>
<a href="${relativePath}/team-list.html">Project Team</a>
</small>
</div>
<div>
<small>
<a href="${relativePath}/dependencies.html">Dependencies</a>
</small>
</div>
<j:if test="${!empty(pom.repository.url)}">
<div>
<small>
<a href="${relativePath}/cvs-usage.html">Source Repository</a>
</small>
</div>
</j:if>
<j:if test="${!empty(pom.issueTrackingUrl)}">
<div>
<small>
<a href="${relativePath}/issue-tracking.html">Issue Tracking</a>
</small>
</div>
</j:if>
</j:if>
</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}">
<div>
<small>
<a href="${relativePath}/apidocs/index.html">JavaDocs</a>
</small>
</div>
<div>
<small>
<a href="${relativePath}/xref/index.html">Source XReference</a>
</small>
</div>
<j:if test="${unitTestSourcesPresent == 'true'}">
<div>
<small>
<a href="${relativePath}/xref-test/index.html">Test XReference</a>
</small>
</div>
</j:if>
</j:if>
</j:if>
<!--
<j:set var="devProcess" value="false"/>
<util:available file="${maven.docs.src}/development-process.xml">
<j:set var="devProcess" value="true"/>
</util:available>
<j:if test="${devProcess}">
<div>
<small>
<a href="${relativePath}/development-process.html">Development Process</a>
</small>
</div>
</j:if>
<j:if test="${!devProcess}">
<div>
<small>
<j:set var="devProcess">${maven.xdoc.developmentProcessUrl}</j:set>
<a href="${devProcess}">Development Process</a>
</small>
</div>
</j:if>
-->
</div>
</j:if>
<j:set var="poweredbyimage">${maven.xdoc.poweredby.image}</j:set>
<j:set var="poweredbytitle">${maven.xdoc.poweredby.title}</j:set>
<j:set var="poweredbyurl">${maven.xdoc.poweredby.url}</j:set>
<j:if test="${!empty(poweredbyimage)}">
<div style="margin-top: 20px; width: 100%; text-align: center;">
<a href="${poweredbyurl}" title="${poweredbytitle}"><img alt="${maven.xdoc.poweredby.title}" style="border: 1px solid black" src="${relativePath}/images/logos/${poweredbyimage}"/></a>
</div>
</j:if>
<j:if test="${date == 'navigation-bottom'}">
<div>
<small>Last published: ${build.date}</small>
</div>
</j:if>
</div>
</td>
<td rowspan="2">
<div id="bodycol">
<!-- Insert MAIN body here -->
<div class="app">
<!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
<jsl:applyTemplates select="$doc/document/body/section"/>
<jsl:applyTemplates select="$doc/document/body/glossary" />
<jsl:applyTemplates select="$doc/document/body/release" />
<jsl:applyTemplates select="$doc/document/body/changelog" />
<jsl:applyTemplates select="$doc/document/body/taskList" />
<jsl:applyTemplates select="$doc/document/body/goals" />
</div>
</div>
</td>
</tr>
</table>
<div id="footer">
<table style='width:100%' border="0" cellspacing="0" cellpadding="4">
<jsl:applyTemplates select="$nav/body/footer"/>
<tr>
<td>
<j:if test="${!empty(pom.organization.name)}">
<j:if test="${!empty(pom.inceptionYear)}">
<j:if test="${pom.inceptionYear == mavenCurrentYear}">
© ${mavenCurrentYear}, ${pom.organization.name}
</j:if>
<j:if test="${pom.inceptionYear != mavenCurrentYear}">
© ${pom.inceptionYear}-${mavenCurrentYear}, ${pom.organization.name}
</j:if>
</j:if>
<j:if test="${empty(pom.inceptionYear)}">
© ${mavenCurrentYear}, ${pom.organization.name}
</j:if>
</j:if>
<j:if test="${date == 'bottom'}">
- Last published: ${build.date}
</j:if>
</td>
<j:if test="${date == 'bottom-right'}">
<td style='width: auto; text-align:right'>Last published: ${build.date}</td>
</j:if>
</tr>
</table>
</div>
</x:element>
</html>
</jsl:template>
<!-- process the properties of the doc -->
<jsl:template match="properties" trim="false">
<!-- stick head block here later -->
</jsl:template>
<!-- Process a menu for the navigation bar -->
<jsl:template match="menu" trim="false">
<div>
<strong><x:expr select="@name"/></strong>
<jsl:applyTemplates select="item"/>
</div>
</jsl:template>
<jsl:template match="item" trim="false">
<x:set var="item" select="."/>
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<x:set var="_img" select="string(@img)"/>
<div>
<small>
<j:if test="${navbean.isSelected(item.get(0))}">
<b><doc:itemLink name="${_name}" link="${_link}" img="${_img}"/></b>
</j:if>
<j:if test="${!navbean.isSelected(item.get(0))}">
<doc:itemLink name="${_name}" link="${_link}" img="${_img}"/>
</j:if>
</small>
<j:if test="${!navbean.isCollapsed(item.get(0))}">
<jsl:applyTemplates select="item"/>
</j:if>
</div>
</jsl:template>
<!-- Process the breadcrumb navbar -->
<jsl:template match="links" trim="false">
<j:set var="linkCount" value="1"/>
<x:forEach var="link" select="item">
<j:if test="${linkCount != 1}">|</j:if>
<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>
</jsl:template>
<!-- Google site search -->
<jsl:template match="search" trim="false">
<!-- Search code: http://www.google.com/searchcode.html -->
<!-- Google logos: http://www.google.com/stickers.html -->
<!-- Terms: http://www.google.com./services/terms_free.html -->
<div>
<strong>Search ${pom.name}</strong>
<form method="get" action="http://www.google.com/search">
<a class="navlink" href="http://www.google.com">
<img src="http://www.google.com/logos/Logo_25wht.gif"
alt="Google" border="0" />
</a><p/>
<j:set var="siteURL" value="${pom.url}"/>
<!-- google fails on urls that end with / -->
<j:if test="${siteURL.endsWith('/')}">
<j:set var="URLLength" value="${siteURL.length() - 1}"/>
<j:set var="siteURL" value="${siteURL.substring(0, URLLength.intValue())}"/>
</j:if>
<input type="text" size="15" name="q" maxlength="255" value=""/>
<input type="submit" value="Go" name="btnG"/>
<input type="hidden" name="domains" value="${siteURL}"/>
<input type="hidden" id="search" name="sitesearch" value="${siteURL}"/>
</form>
</div>
</jsl:template>
<!-- process a documentation section -->
<jsl:template match="section" trim="false">
<div class="h3">
<j:set var="_sectionName"><x:expr select="@name"/></j:set>
<j:if test="${!empty(_sectionName)}">
<h3>
<a name="${_sectionName}">${_sectionName}</a>
</h3>
</j:if>
<jsl:applyTemplates select="*"/>
</div>
</jsl:template>
<jsl:template match="subsection" trim="false">
<div class="h4">
<j:set var="_sectionName"><x:expr select="@name"/></j:set>
<j:if test="${!empty(_sectionName)}">
<h4>
<a name="${_sectionName}">${_sectionName}</a>
</h4>
</j:if>
<jsl:applyTemplates select="*"/>
</div>
</jsl:template>
<jsl:template match="source" trim="false">
<div id="source">
<pre><x:expr select="."/></pre>
</div>
</jsl:template>
<jsl:template match="footer" trim="false">
<tr>
<td>
<jsl:applyTemplates select="*"/>
</td>
</tr>
</jsl:template>
<jsl:template match="table" trim="false">
<j:set var="rowcount" value="0"/>
<table cellpadding="3" cellspacing="2" border="1" width="100%">
<jsl:applyTemplates select="*"/>
</table>
</jsl:template>
<jsl:template match="tr" trim="false">
<j:choose>
<j:when test="${rowMode == 'a'}">
<j:set var="rowMode" value="b"/>
</j:when>
<j:otherwise>
<j:set var="rowMode" value="a"/>
</j:otherwise>
</j:choose>
<!-- copy attributes FIXME: Shouldn't this only be colspan|rowspan? -->
<x:element name="tr"><j:whitespace trim="true">
<x:attribute name="class">${rowMode}</x:attribute>
<x:forEach var="attr" select="@*">
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
</x:forEach>
<jsl:applyTemplates select="*"/>
</j:whitespace></x:element>
</jsl:template>
<!--************************-->
<!-- glossary documentation -->
<!--************************-->
<jsl:template match="glossary" trim="false">
<jsl:applyTemplates select="glossary-entries/glossary-entry" />
</jsl:template>
<jsl:template match="glossary-entry" trim="false">
<strong><x:expr select="name" /></strong>
<br/>
<x:expr select="definition" />
<p/>
</jsl:template>
<!--************************-->
<!-- goals documentation -->
<!--************************-->
<jsl:template match="goals" trim="false">
<!-- reset row alternation -->
<j:set var="rowMode" value="" />
<div class="h3">
<h3><a name="Goals">Goals</a></h3>
<table>
<tr width='100%'><th>Goal</th><th>Description</th></tr>
<jsl:applyTemplates select="goal"/>
</table>
</div>
</jsl:template>
<!-- a goal -->
<!-- FIXME: this is copied from tr - there must be a way of
calling templates in jsl? -->
<jsl:template match="goal" trim="false">
<j:choose>
<j:when test="${rowMode == 'a'}">
<j:set var="rowMode" value="b"/>
</j:when>
<j:otherwise>
<j:set var="rowMode" value="a"/>
</j:otherwise>
</j:choose>
<x:element name="tr"><j:whitespace trim="true">
<x:attribute name="class">${rowMode}</x:attribute>
<j:set var="_goalName"><x:expr select="./name" /></j:set>
<td width='20%'><a name="${_goalName}">${_goalName}</a></td>
<td width='80%'><jsl:applyTemplates select="description" /></td>
</j:whitespace></x:element>
</jsl:template>
<jsl:template match="description">
<jsl:copy trim="false">
<jsl:applyTemplates trim="false"/>
</jsl:copy>
</jsl:template>
<!--************************-->
<!-- changelog documentation-->
<!--************************-->
<jsl:template match="changelog" trim="false">
<j:set var="rowMode" value="" />
<table width="100%">
<tr>
<th>Date</th><th>Author</th><th>Files/Message</th>
</tr>
<jsl:applyTemplates select="changelog-entry" />
</table>
</jsl:template>
<!-- transform a changelog entry -->
<!-- FIXME: tr code copied from above -->
<jsl:template match="changelog-entry" trim="false">
<j:choose>
<j:when test="${rowMode == 'a'}">
<j:set var="rowMode" value="b"/>
</j:when>
<j:otherwise>
<j:set var="rowMode" value="a"/>
</j:otherwise>
</j:choose>
<x:element name="tr"><j:whitespace trim="true">
<x:attribute name="class">${rowMode}</x:attribute>
<td><x:expr select="date" /> <x:expr select="time" /></td>
<td><x:expr select="author"/></td>
<td><jsl:applyTemplates select="*" />
<pre><x:expr select="msg"/></pre>
</td>
</j:whitespace></x:element>
</jsl:template>
<jsl:template match="file">
<j:set var="url">${pom.repository.url}<x:expr select="name"/></j:set>
<j:set var="revUrl">${url}?<x:expr select="revision"/>&content-type=text/vnd.viewcvs-markup</j:set>
<a href="${url}"><x:expr select="name"/></a> -
<a href="${revUrl}">v<x:expr select="revision"/></a>
<br/>
</jsl:template>
<!-- remove the space at the end of parsed "a" anchors -->
<jsl:template match="a" trim="false">
<jsl:copy trim="true">
<jsl:applyTemplates trim="true"/>
</jsl:copy>
</jsl:template>
<!-- copy any other elements through -->
<jsl:template match="*" trim="false">
<jsl:copy trim="false">
<jsl:applyTemplates trim="false"/>
</jsl:copy>
</jsl:template>
<!-- element values don't pass through as text -->
<jsl:template match="@*"/>
</jsl:stylesheet>
1.1 avalon/merlin/facilities/finder/site/etc/stylesheet.css
Index: stylesheet.css
===================================================================
/* Javadoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */
/* Page background color */
body { background-color: #FFFFFF }
/* Table colors */
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
.TableRowColor { background: #FFFFFF } /* White */
/* Font used in left-hand frame lists */
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
/* Example of smaller, sans-serif font in frames */
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
/* Navigation bar fonts and colors */
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
1.1 avalon/merlin/facilities/finder/site/xdocs/api.xml
Index: api.xml
===================================================================
<?xml version="1.0"?>
<!--
Copyright 2004 Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Avalon Finder</title>
</properties>
<body>
<section name="Finder">
<subsection name="API">
<p>
A simple and evolving API aimed to meet the operation requirements of
compoennts requiring a dynamic activation service.
</p>
</subsection>
</section>
</body>
</document>
1.1 avalon/merlin/facilities/finder/site/xdocs/impl.xml
Index: impl.xml
===================================================================
<?xml version="1.0"?>
<!--
Copyright 2004 Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Avalon Finder</title>
</properties>
<body>
<section name="Finder">
<subsection name="Implementation">
<p>
A simple default implementation of a finder that aquires services
through interaction with the composition meta-model.
</p>
</subsection>
</section>
</body>
</document>
1.1 avalon/merlin/facilities/finder/site/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<!--
Copyright 2004 Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<author email="mcconnell@apache.org">Stephen McConnell</author>
<title>Avalon Finder</title>
</properties>
<body>
<section name="Finder">
<subsection name="Overview">
<p>
This is a framework for pull based service activation. The purpose
of this facility is to address the resolution of ECM and Fortress
semantics whereby services are activated as a result of a request
as opposed to the classic compositon approach of push-based
directives.
</p>
</subsection>
<subsection name="Structure">
<table>
<tr><th>Name</th><th>Description</th></tr>
<tr>
<td>API</td>
<td>
The finder api used in support of dynamic
pull-based service activation.
</td>
</tr>
<tr>
<td>Implementation</td>
<td>
A default implementation of the finder that
interacts with the composition model to resolve
services dynamically.
</td>
</tr>
<tr>
<td>ECM</td>
<td>
A componet based implementation of the class ECM
utility based on the finder implementation.
</td>
</tr>
</table>
</subsection>
</section>
</body>
</document>
1.1 avalon/merlin/facilities/finder/site/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project>
<title>Finder</title>
<body>
<links>
<item name="Apache" href="http://apache.org/"/>
<item name="Avalon" href="http://avalon.apache.org/"/>
<item name="Framework" href="http://avalon.apache.org/product/framework/"/>
<item name="Containers" href="http://avalon.apache.org/product/containers/"/>
<item name="Components" href="http://avalon.apache.org/product/components/"/>
</links>
<menu name="About Avalon Finder">
<item name="Overview" href="/index.html">
<item name="API" href="/api.html"/>
<item name="Implementation" href="/impl.html"/>
<item name="ECM" href="/ecm/index.html"/>
</item>
</menu>
<menu name="Resources">
<item name="Javadoc" href="/api/index.html"/>
</menu>
<menu name="Related Projects">
<item name="Meta" href="http://avalon.apache.org/meta"/>
<item name="Merlin" href="http://avalon.apache.org/merlin"/>
</menu>
</body>
</project>
1.1 avalon/merlin/facilities/finder/test/src/java/org/apache/avalon/finder/test/ECMWidget.java
Index: ECMWidget.java
===================================================================
/*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.avalon.finder.test;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.activity.Disposable;
/**
* A component that implements the Widget service using ECM semantics.
*/
public class ECMWidget implements Widget, Configurable, Disposable
{
//---------------------------------------------------------
// static
//---------------------------------------------------------
public static String ROLE = Widget.class.getName();
//---------------------------------------------------------
// immutable state
//---------------------------------------------------------
/**
* The logging channel supplied by the container.
*/
private final Logger m_logger;
//---------------------------------------------------------
// constructor
//---------------------------------------------------------
/**
* Creation of a new hello facility.
* @param logger a logging channel
*/
public ECMWidget( Logger logger )
{
m_logger = logger;
m_logger.debug( "hello" );
}
//---------------------------------------------------------
// Configurable
//---------------------------------------------------------
/**
* Configuration of the gizmo by the container.
* @param config the supplied configuration
*/
public void configure( Configuration config ) throws ConfigurationException
{
final String message = config.getChild( "message" ).getValue( null );
if( null != message )
{
m_logger.debug( message );
}
}
//---------------------------------------------------------
// Disposable
//---------------------------------------------------------
/**
* End-of-life processing initiated by the container.
*/
public void dispose()
{
m_logger.debug( "time to die" );
}
//---------------------------------------------------------
// Object
//---------------------------------------------------------
public String toString()
{
return "[ecm-widget:" + System.identityHashCode( this ) + "]";
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org