chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r910572 [35/36] - in /incubator/chemistry/trunk/opencmis: ./ _dev/ opencmis-client/ opencmis-client/opencmis-client-api/ opencmis-client/opencmis-client-api/src/ opencmis-client/opencmis-client-api/src/main/ opencmis-client/opencmis-client-...
Date Tue, 16 Feb 2010 16:04:07 GMT
Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/feed.xsl
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/feed.xsl?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/feed.xsl (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/feed.xsl Tue Feb 16 16:03:38 2010
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
+	xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
+	xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
+
+	<xsl:output method="html" />
+
+	<xsl:param name="browseUrl"/>
+	<xsl:param name="auxRoot"/>
+
+	<xsl:template match="/">
+		<html>
+			<head>
+				<title><xsl:value-of select="atom:feed/atom:title" /></title>
+				<link rel="stylesheet" type="text/css" href="{$auxRoot}browser.css" />
+			</head>
+			<body>
+				<img src="{$auxRoot}cmis.png" style="float: right;" />
+				<h1><xsl:value-of select="atom:feed/atom:title" /></h1>
+				<div class="navigationbox">
+					<xsl:if test="atom:feed/atom:link[@rel='service']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='service']/@href}">Service</a> -
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='seld']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='self']/@href}">Entry</a> -
+					</xsl:if>					
+					<xsl:if test="atom:feed/atom:link[@rel='up']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='up']/@href}">Up</a> -
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='down']">
+						<xsl:for-each select="atom:feed/atom:link[@rel='down']">
+							<a href="{$browseUrl}{@href}">Down (<xsl:value-of select="@type" />)</a> -
+						</xsl:for-each>
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='first']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='first']/@href}">First</a> -
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='previous']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='previous']/@href}">Previous</a> -
+					</xsl:if>					
+					<xsl:if test="atom:feed/atom:link[@rel='next']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='next']/@href}">Next</a> -
+					</xsl:if>		
+					<xsl:if test="atom:feed/atom:link[@rel='last']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='last']/@href}">Last</a> -
+					</xsl:if>						
+					<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/foldertree']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/foldertree']/@href}">Folder Tree</a> -
+					</xsl:if>				
+					<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions']/@href}">Allowable Actions</a> -
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/acl']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/acl']/@href}">ACL</a> -
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/policies']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/policies']/@href}">Policies</a> -
+					</xsl:if>
+					<xsl:if test="atom:feed/atom:link[@rel='describedby']">
+						<a href="{$browseUrl}{atom:feed/atom:link[@rel='describedby']/@href}">Type</a>
+					</xsl:if>
+				</div>
+				<xsl:if test="atom:feed/atom:entry/cmisra:object">
+					<table class="feedtable">
+					<tr>
+						<th></th>
+						<th>Name</th>
+						<th>Type</th>
+						<th>MIME Type</th>
+						<th>Size</th>
+						<th>Created By /<br/> Last Modified By</th>
+						<th>Creation Date /<br/> Last Modification Date</th>
+						<th>Version Label</th>
+						<th>Major /<br/> Latest</th>
+					</tr>
+					<xsl:for-each select="atom:feed/atom:entry">
+						<xsl:sort select="cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId']" />
+						<xsl:sort select="cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:name']" />
+						
+						<xsl:variable name="odd">
+							<xsl:if test="(position() mod 2) != 1"></xsl:if>
+							<xsl:if test="(position() mod 2) = 1">-odd</xsl:if>
+						</xsl:variable>					
+						
+						<tr>
+							<td class="tdlinks{$odd}" rowspan="2">
+								<xsl:choose>
+									<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId'],'cmis:document')">
+										<img src="{$auxRoot}document.png" />
+									</xsl:when>
+									<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId'],'cmis:folder')">
+										<img src="{$auxRoot}folder.png" />
+									</xsl:when>
+									<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId'],'cmis:relationship')">
+										<img src="{$auxRoot}relationship.png" />
+									</xsl:when>
+									<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId'],'cmis:policy')">
+										<img src="{$auxRoot}policy.png" />
+									</xsl:when>
+									<xsl:otherwise>
+										<img src="{$auxRoot}unknown.png" />
+									</xsl:otherwise>
+								</xsl:choose>
+							</td>
+							<td class="tdinfo{$odd}" style="font-weight: bold;">
+								<xsl:choose>
+									<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId'],'cmis:document')">
+										<a href="{atom:content/@src}">
+										<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:name']" />
+										</a>
+									</xsl:when>
+									<xsl:when test="contains(cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:baseTypeId'],'cmis:folder')">
+										<a href="{$browseUrl}{atom:link[@rel='down']/@href}">
+										<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:name']" />
+										</a>
+									</xsl:when>
+									<xsl:otherwise>
+										<a href="{$browseUrl}{atom:link[@rel='self']/@href}">
+										<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:name']" />
+										</a>
+									</xsl:otherwise>
+								</xsl:choose>
+							</td>
+							<td class="tdinfo{$odd}">
+								<a href="{$browseUrl}{atom:link[@rel='describedby']/@href}">
+								<xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyId[@propertyDefinitionId='cmis:objectTypeId']" />
+								</a>
+							</td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:contentStreamMimeType']" /></td>							
+							<td class="tdinfo{$odd}" align="right"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyInteger[@propertyDefinitionId='cmis:contentStreamLength']" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:createdBy']" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyDateTime[@propertyDefinitionId='cmis:creationDate']" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:versionLabel']" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyBoolean[@propertyDefinitionId='cmis:isMajorVersion']" /></td>
+						</tr>
+						<tr>
+							<td class="tdlinks{$odd}" colspan="4">
+								<a href="{$browseUrl}{atom:link[@rel='self']/@href}" class="actionlink">Entry</a> - 
+								<a href="{$browseUrl}{atom:link[@rel='describedby']/@href}" class="actionlink">Type Info</a> -
+								<xsl:if test="atom:link[@rel='down']">							
+									<xsl:for-each select="atom:link[@rel='down']">
+										<a href="{$browseUrl}{@href}" class="actionlink">Down (<xsl:value-of select="@type" />)</a> -
+									</xsl:for-each>
+								</xsl:if>
+								<xsl:if test="atom:content">
+									<a href="{atom:content/@src}" class="actionlink">Download</a> - 
+								</xsl:if>
+								<xsl:if test="atom:link[@rel='version-history']">
+									<a href="{$browseUrl}{atom:link[@rel='version-history']/@href}" class="actionlink">All Versions</a> -
+								</xsl:if>
+								<xsl:if test="atom:link[@rel='alternate']">
+									<xsl:for-each select="atom:link[@rel='alternate']">
+										<a href="{@href}" class="actionlink">Rendition (<xsl:value-of select="@cmisra:renditionType"></xsl:value-of>)</a> -
+									</xsl:for-each>
+								</xsl:if>
+								<xsl:if test="atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/relationships']">
+									<a href="{$browseUrl}{atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/relationships']/@href}">Relationships</a> -
+								</xsl:if>	
+								<xsl:if test="atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions']">
+									<a href="{$browseUrl}{atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions']/@href}" class="actionlink">Allowable Actions</a> -
+								</xsl:if>
+								<xsl:if test="atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/acl']">
+									<a href="{$browseUrl}{atom:link[@rel='http://docs.oasis-open.org/ns/cmis/link/200908/acl']/@href}" class="actionlink">ACL</a>
+								</xsl:if>
+							</td>
+							<td class="tdinfo2{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyString[@propertyDefinitionId='cmis:lastModifiedBy']" /></td>
+							<td class="tdinfo2{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyDateTime[@propertyDefinitionId='cmis:lastModificationDate']" /></td>
+							<td class="tdinfo2{$odd}"> </td>
+							<td class="tdinfo2{$odd}"><xsl:value-of select="cmisra:object/cmis:properties/cmis:propertyBoolean[@propertyDefinitionId='cmis:isLatestVersion']" /></td>
+					</tr>
+					</xsl:for-each>
+					</table>
+				</xsl:if>
+				<xsl:if test="atom:feed/atom:entry/cmisra:type">
+				
+					<table class="feedtable">
+					<tr>
+						<th></th>
+						<th>Id</th>
+						<th>Local Name</th>
+						<th>Local Namespace</th>
+						<th>Display Name</th>
+						<th>Query Name</th>
+						<th>Base Id</th>
+						<th>Description</th>
+					</tr>
+					<xsl:for-each select="atom:feed/atom:entry">
+					<xsl:variable name="odd">
+							<xsl:if test="(position() mod 2) != 1"></xsl:if>
+							<xsl:if test="(position() mod 2) = 1">-odd</xsl:if>
+						</xsl:variable>	
+						
+						<tr>
+							<td class="tdlinks{$odd}" rowspan="2">
+								<img src="{$auxRoot}type.png" />
+							</td>
+							<td class="tdinfo{$odd}">
+								<a href="{$browseUrl}{atom:link[@rel='self']/@href}" style="font-weight: bold;">
+								<xsl:value-of select="cmisra:type/cmis:id" />
+								</a>
+							</td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:localName" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:localNamespace" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:displayName" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:queryName" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:baseId" /></td>
+							<td class="tdinfo{$odd}"><xsl:value-of select="cmisra:type/cmis:description" /></td>
+						</tr>
+						<tr>
+							<td class="tdlinks{$odd}" colspan="7">
+								<a href="{$browseUrl}{atom:link[@rel='self']/@href}" class="actionlink">Entry</a> - 
+								<a href="{$browseUrl}{atom:link[@rel='describedby']/@href}" class="actionlink">Type Info</a> -
+								<xsl:if test="atom:link[@rel='down']">
+									<a href="{$browseUrl}{atom:link[@rel='down']/@href}" class="actionlink">Down</a>
+								</xsl:if>
+							</td>
+						</tr>
+					</xsl:for-each>
+					</table>
+				</xsl:if>
+			</body>
+		</html>
+	</xsl:template>
+	
+</xsl:stylesheet>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/feed.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/service.xsl
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/service.xsl?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/service.xsl (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/service.xsl Tue Feb 16 16:03:38 2010
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://www.w3.org/2007/app"
+	xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
+	xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
+
+	<xsl:output method="html" />
+
+	<xsl:param name="browseUrl"/>
+	<xsl:param name="auxRoot"/>
+
+	<xsl:template match="/">
+		<html>
+			<head>
+				<title>Service</title>
+				<link rel="stylesheet" type="text/css" href="{$auxRoot}browser.css" />
+			</head>
+			<body>
+				<img src="{$auxRoot}cmis.png" style="float: right;" />
+				<H1>Repositories</H1>
+				<xsl:for-each select="app:service/app:workspace">
+					<div class="servicebox">
+						<h2>Repository <xsl:value-of select="cmisra:repositoryInfo/cmis:repositoryId" /></h2>
+						<h3>Collections:</h3><ul><xsl:apply-templates select="app:collection" /></ul>
+						<h3>Links:</h3><ul><xsl:apply-templates select="atom:link" /></ul>
+						<h3>URI Templates:</h3><ul><xsl:apply-templates select="cmisra:uritemplate" /></ul>
+						<table style="border-spacing:5px">
+							<tr>
+								<td style="vertical-align:top;"><xsl:apply-templates select="cmisra:repositoryInfo" /></td>
+								<td style="vertical-align:top;"><xsl:apply-templates select="cmisra:repositoryInfo/cmis:capabilities" /></td>
+								<td style="vertical-align:top;"><xsl:apply-templates select="cmisra:repositoryInfo/cmis:aclCapability" /></td>
+							</tr>
+						</table>
+					</div>
+				</xsl:for-each>
+			</body>
+		</html>
+	</xsl:template>
+
+	<xsl:template match="cmisra:repositoryInfo">
+		<div>
+		<h3>Info</h3>
+		<table class="servicetable">
+			<xsl:for-each select="*[not(*)]">
+				<tr>
+					<td><xsl:value-of select="local-name()" /></td>
+					<td><xsl:value-of select="current()" /></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="cmis:capabilities">
+		<div>
+		<h3>Capabilities</h3>
+		<table class="servicetable">
+			<xsl:for-each select="*[not(*)]">
+				<tr>
+					<td><xsl:value-of select="substring-after(local-name(), 'capability')" /></td>
+					<td><xsl:value-of select="current()" /></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="cmis:aclCapability">
+		<div>
+		<h3>ACL Capabilities</h3>
+		<table class="servicetable">
+			<tr>
+				<td>Supported Permissions</td><td><xsl:value-of select="cmis:supportedPermissions" /></td>
+			</tr>
+			<tr>
+				<td>Propagation</td><td><xsl:value-of select="cmis:propagation" /></td>
+			</tr>
+		</table>
+		<h4>Permissions</h4>
+		<table class="servicetable">
+			<tr><th>Permission</th><th>Description</th></tr>
+			<xsl:for-each select="cmis:permissions">
+				<tr>
+					<td><xsl:value-of select="cmis:permission" /></td>
+					<td><xsl:value-of select="cmis:description" /></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+		<h4>Mappings</h4>
+		<table class="servicetable">
+			<tr><th>Key</th><th>Permission</th></tr>
+			<xsl:for-each select="cmis:mapping">
+				<tr>
+					<td><xsl:value-of select="cmis:key" /></td>
+					<td><xsl:value-of select="cmis:permission" /></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+		</div>
+	</xsl:template>
+
+	<xsl:template match="app:collection">
+		<li><a href="{$browseUrl}{@href}"><xsl:value-of select="atom:title" /> (<xsl:value-of select="cmisra:collectionType" />)</a></li>
+	</xsl:template>
+
+	<xsl:template match="atom:link">
+		<li><a href="{$browseUrl}{@href}"><xsl:value-of select="@rel" /></a> (<xsl:value-of select="@type" />)</li>
+	</xsl:template>
+	
+	<xsl:template match="cmisra:uritemplate">
+		<li><xsl:value-of select="cmisra:type" /> (<xsl:value-of select="cmisra:mediatype" />): 
+		<a href="{$browseUrl}{cmisra:template}"><xsl:value-of select="cmisra:template" /></a></li>
+	</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/stylesheets/service.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/web.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/web.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.4"
+	xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+	<display-name>OpenCMIS Browser</display-name>
+
+	<welcome-file-list>
+		<welcome-file>index.html</welcome-file>
+	</welcome-file-list>
+
+	<servlet>
+		<servlet-name>browse</servlet-name>
+		<servlet-class>org.apache.opencmis.browser.BrowseServlet</servlet-class>
+		<init-param>
+			<param-name>auxroot</param-name>
+			<param-value>{ctx}/browser/</param-value>
+		</init-param>
+		<init-param>
+			<param-name>allow</param-name>
+			<param-value>http.*</param-value>
+		</init-param>
+		<init-param>
+			<param-name>stylesheet:application/atomsvc+xml</param-name>
+			<param-value>/WEB-INF/stylesheets/service.xsl</param-value>
+		</init-param>
+		<init-param>
+			<param-name>stylesheet:application/atom+xml;type=feed</param-name>
+			<param-value>/WEB-INF/stylesheets/feed.xsl</param-value>
+		</init-param>
+		<init-param>
+			<param-name>stylesheet:application/cmistree+xml</param-name>
+			<param-value>/WEB-INF/stylesheets/feed.xsl</param-value>
+		</init-param>
+		<init-param>
+			<param-name>stylesheet:application/atom+xml;type=entry</param-name>
+			<param-value>/WEB-INF/stylesheets/entry.xsl</param-value>
+		</init-param>
+		<init-param>
+			<param-name>stylesheet:application/cmisallowableactions+xml</param-name>
+			<param-value>/WEB-INF/stylesheets/actions.xsl</param-value>
+		</init-param>
+		<init-param>
+			<param-name>stylesheet:application/cmisacl+xml</param-name>
+			<param-value>/WEB-INF/stylesheets/acl.xsl</param-value>
+		</init-param>
+	</servlet>
+	
+	<servlet-mapping>
+		<servlet-name>browse</servlet-name>
+		<url-pattern>/browse</url-pattern>
+	</servlet-mapping>
+
+	<session-config>
+		<session-timeout>60</session-timeout>
+	</session-config>
+</web-app>

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/browser.css
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/browser.css?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/browser.css (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/browser.css Tue Feb 16 16:03:38 2010
@@ -0,0 +1,209 @@
+@CHARSET "UTF-8";
+
+body { 
+	font-family: arial,sans-serif;
+	font-size: 10pt; 
+}
+
+h1 {
+	font-family: Georgia;
+}
+
+h2 {
+	font-family: Georgia;
+}
+
+h3 {
+	font-family: Georgia;
+}
+
+a:link {
+	color: #204a87;
+	text-decoration: none;	
+}
+
+a:visited {
+	color: #204a87;
+	text-decoration: none;
+}
+
+a:hover {
+	color: #204a87;
+	text-decoration: underline;
+}
+
+a:active {
+	color: a40000;
+	text-decoration: underline;
+}
+
+div.navigationbox {
+	background-color: #f6f1de;
+	margin-top: 10px;
+	margin-bottom: 10px;
+	margin-left: 0px;
+	margin-right: 0px;
+	padding: 5px;
+	border-style: solid;
+	border-width: 1px;
+	border-color: #888a85;
+}
+
+table.servicetable {
+	border-collapse: collapse;
+}
+
+table.servicetable th{
+	font-size: 10pt;
+	font-weight: bold;	
+	padding: 5px;
+	text-align: left;
+}
+
+table.servicetable td {
+	font-size: 10pt; 
+	padding: 5px;
+	border-bottom-style: solid;
+	border-color: #dddddd;
+	border-width: 1px;
+}
+
+.servicebox {
+	background-color: #f6f1de;
+	font-size: 10pt; 
+	padding: 10px;
+	margin: 10px;
+	border-color: #888a85;
+	border-style: solid;
+	border-width: 2px;
+}
+
+table.feedtable {
+	border-collapse: collapse;
+}
+
+table.feedtable th {
+	font-size: 10pt;
+	font-weight: bold;	
+	text-align: left;
+}
+
+.tdinfo {
+	font-size: 10pt; 
+	padding-left: 3px;
+	padding-top: 3px;
+	padding-bottom: 0px;
+	padding-right: 10px;
+}
+
+.tdinfo2 {
+	font-size: 10pt; 
+	padding: 3px;
+	border-bottom-style: solid;
+	border-color: #d3d7cf;
+	border-width: 1px;
+}
+
+.tdlinks {
+	font-size: 8pt; 
+	padding: 3px;
+	border-bottom-style: solid;
+	border-color: #d3d7cf;
+	border-width: 1px;
+}
+
+.tdmore {
+	background-color: #eeeeec;
+	font-size: 10pt; 
+	padding-left: 3px;
+	padding-top: 3px;
+	padding-bottom: 0px;
+	padding-right: 10px;
+}
+
+.tdinfo-odd {
+	background-color: #fcf9df;
+	font-size: 10pt; 
+	padding-left: 3px;
+	padding-top: 3px;
+	padding-bottom: 0px;
+	padding-right: 10px;
+}
+
+.tdinfo2-odd {
+	background-color: #fcf9df;
+	font-size: 10pt; 
+	padding: 3px;
+	border-bottom-style: solid;
+	border-color: #d3d7cf;
+	border-width: 1px;
+}
+
+.tdlinks-odd {
+	background-color: #fcf9df;
+	font-size: 8pt; 
+	padding: 3px;
+	border-bottom-style: solid;
+	border-color: #d3d7cf;
+	border-width: 1px;
+}
+
+.tdmore-odd {
+	background-color: #fce94f;
+	font-size: 10pt; 
+	padding: 3px;
+	border-bottom-style: solid;
+	border-color: #d3d7cf;
+	border-width: 1px;
+}
+
+a.actionlink:link {
+	color: #888a85;
+	text-decoration: none;	
+}
+
+a.actionlink:visited {
+	color: #888a85;
+	text-decoration: none;
+}
+
+a.actionlink:hover {
+	color: #2e3436;
+	text-decoration: underline;
+}
+
+a.actionlink:active {
+	color: red;
+	text-decoration: underline;
+}
+
+table.entrytable {
+	border-collapse: collapse;
+}
+
+table.entrytable th {
+	font-size: 10pt;
+	font-weight: bold;	
+	text-align: left;
+}
+
+table.entrytable td {
+	font-size: 10pt; 
+	padding: 5px;
+	border-bottom-style: solid;
+	border-color: #d3d7cf;
+	border-width: 1px;
+}
+
+div.entrysummary {
+	margin-top: 10px;
+	margin-bottom: 10px;
+	margin-left: 0px;
+	margin-right: 0px;
+	padding: 5px;
+	border-style: solid;
+	border-width: 1px;
+	border-color: #888a85;	
+	height: 150px;
+	overflow: auto;
+}
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/browser.css
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/cmis.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/cmis.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/cmis.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/document.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/document.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/document.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/folder.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/folder.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/folder.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/policy.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/policy.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/policy.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/relationship.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/relationship.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/relationship.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/type.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/type.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/type.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/unknown.png
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/unknown.png?rev=910572&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-browser/src/main/webapp/browser/unknown.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 16 16:03:38 2010
@@ -0,0 +1,6 @@
+bin
+target
+*.iws
+*.ipr
+*.iml
+.*

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+                             
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opencmis</groupId>
+    <artifactId>opencmis</artifactId>
+    <version>0.1-SNAPSHOT</version>
+	<relativePath>../../pom.xml</relativePath>
+  </parent>
+  
+  <artifactId>opencmis-test-fit</artifactId>
+  <name>OpenCMIS Full Integration Tests</name>
+
+</project>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-fit/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tck/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 16 16:03:38 2010
@@ -0,0 +1,6 @@
+bin
+target
+*.iws
+*.ipr
+*.iml
+.*

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tck/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tck/pom.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tck/pom.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tck/pom.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+                             
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opencmis</groupId>
+    <artifactId>opencmis</artifactId>
+    <version>0.1-SNAPSHOT</version>
+	<relativePath>../../pom.xml</relativePath>
+  </parent>
+  
+  <artifactId>opencmis-test-tck</artifactId>
+  <name>OpenCMIS Test Compatibility Kit</name>
+
+</project>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tck/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 16 16:03:38 2010
@@ -0,0 +1,6 @@
+bin
+target
+*.iws
+*.ipr
+*.iml
+.*

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/pom.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/pom.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/pom.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+                             
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opencmis</groupId>
+    <artifactId>opencmis</artifactId>
+    <version>0.1-SNAPSHOT</version>
+	<relativePath>../../pom.xml</relativePath>
+  </parent>
+  
+  <artifactId>opencmis-test-tools</artifactId>
+  <name>OpenCMIS Tools</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-provider-impl</artifactId>
+      <version>${version}</version>
+    </dependency>	
+  </dependencies>
+  
+</project>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-atompub-example.properties
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-atompub-example.properties?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-atompub-example.properties (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-atompub-example.properties Tue Feb 16 16:03:38 2010
@@ -0,0 +1,4 @@
+org.apache.opencmis.user=test
+org.apache.opencmis.password=test
+
+org.apache.opencmis.provider.atompub.url=http://localhost/cmis/atom
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-atompub-example.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-webservices-example.properties
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-webservices-example.properties?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-webservices-example.properties (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-webservices-example.properties Tue Feb 16 16:03:38 2010
@@ -0,0 +1,12 @@
+org.apache.opencmis.user=test
+org.apache.opencmis.password=test
+
+org.apache.opencmis.provider.webservices.RepositoryService=http://localhost/cmis/RepositoryService?wsdl
+org.apache.opencmis.provider.webservices.NavigationService=http://localhost/cmis/NavigationService?wsdl
+org.apache.opencmis.provider.webservices.ObjectService=http://localhost/cmis/ObjectService?wsdl
+org.apache.opencmis.provider.webservices.VersioningService=http://localhost/cmis/VersioningService?wsdl
+org.apache.opencmis.provider.webservices.DiscoveryService=http://localhost/cmis/DiscoveryService?wsdl
+org.apache.opencmis.provider.webservices.RelationshipService=http://localhost/cmis/RelationshipService?wsdl
+org.apache.opencmis.provider.webservices.MultiFilingService=http://localhost/cmis/MultiFiligService?wsdl
+org.apache.opencmis.provider.webservices.PolicyService=http://localhost/cmis/PolicyService?wsdl
+org.apache.opencmis.provider.webservices.ACLService=http://localhost/cmis/ACLService?wsdl

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/resources/commander-webservices-example.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Command.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Command.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Command.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Command.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.opencmis.commander;
+
+import java.io.PrintWriter;
+
+import org.apache.opencmis.commons.provider.CmisProvider;
+
+/**
+ * Command interface.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public interface Command {
+
+  /**
+   * Returns the command name.
+   */
+  String getCommandName();
+
+  /**
+   * Returns the usage hint.
+   */
+  String getUsage();
+
+  /**
+   * Executes the command.
+   */
+  void execute(CmisProvider provider, String[] args, PrintWriter output);
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Command.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Commander.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Commander.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Commander.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Commander.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.opencmis.commander;
+
+import java.io.FileInputStream;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.opencmis.client.provider.factory.CmisProviderFactory;
+import org.apache.opencmis.commons.SessionParameter;
+import org.apache.opencmis.commons.exceptions.CmisBaseException;
+import org.apache.opencmis.commons.provider.CmisProvider;
+
+/**
+ * Commander tool main.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class Commander {
+
+  private final static Map<String, Command> COMMAND_MAP = new LinkedHashMap<String, Command>();
+  static {
+    addCommand(new InfosCommand());
+    addCommand(new ListCommand());
+    addCommand(new DeleteCommand());
+  }
+
+  private PrintWriter fPW;
+
+  /**
+   * Constructor.
+   */
+  public Commander(String[] args) {
+    fPW = new PrintWriter(System.out);
+
+    if (args.length < 2) {
+      printUsage(fPW);
+      return;
+    }
+
+    try {
+      // get the command object
+      Command command = COMMAND_MAP.get(args[1].toLowerCase());
+      if (command == null) {
+        printUsage(fPW);
+        return;
+      }
+
+      // get provider object
+      CmisProvider provider = createProvider(args[0]);
+
+      // prepare args
+      String[] commandArgs = new String[args.length - 2];
+      System.arraycopy(args, 2, commandArgs, 0, commandArgs.length);
+
+      // execute
+      command.execute(provider, commandArgs, fPW);
+    }
+    catch (Exception e) {
+      fPW.println("Exception:");
+
+      if (e instanceof CmisBaseException) {
+        fPW.println(e);
+      }
+      else {
+        e.printStackTrace(fPW);
+      }
+    }
+    finally {
+      fPW.flush();
+    }
+  }
+
+  /**
+   * Prints usage.
+   */
+  private void printUsage(PrintWriter output) {
+    output.println("CMIS Commander\n");
+    output.println("Usage: Commander <config file> <command>\n");
+    output.println("Available commands:");
+    for (Command command : COMMAND_MAP.values()) {
+      output.println("  " + command.getUsage());
+    }
+
+    output.flush();
+  }
+
+  /**
+   * Creates the provider object
+   */
+  private CmisProvider createProvider(String configFile) throws Exception {
+    Properties properties = new Properties();
+    properties.load(new FileInputStream(configFile));
+
+    Map<String, String> sessionParameters = new HashMap<String, String>();
+
+    for (Enumeration<?> e = properties.propertyNames(); e.hasMoreElements();) {
+      String key = (String) e.nextElement();
+      String value = properties.getProperty(key);
+      sessionParameters.put(key, value);
+    }
+
+    CmisProviderFactory factory = CmisProviderFactory.newInstance();
+
+    CmisProvider result = null;
+    if (sessionParameters.containsKey(SessionParameter.ATOMPUB_URL)) {
+      result = factory.createCmisAtomPubProvider(sessionParameters);
+    }
+    else if (sessionParameters.containsKey(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE)) {
+      result = factory.createCmisWebServicesProvider(sessionParameters);
+    }
+    else {
+      throw new IllegalArgumentException("Cannot find CMIS binding information in config file!");
+    }
+
+    return result;
+  }
+
+  /**
+   * Adds a command
+   */
+  private final static void addCommand(Command command) {
+    if ((command == null) || (command.getCommandName() == null)) {
+      return;
+    }
+
+    COMMAND_MAP.put(command.getCommandName().toLowerCase(), command);
+  }
+
+  /**
+   * Main.
+   */
+  public static void main(String[] args) {
+    new Commander(args);
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/Commander.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/DeleteCommand.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/DeleteCommand.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/DeleteCommand.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/DeleteCommand.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.opencmis.commander;
+
+import java.io.PrintWriter;
+
+import org.apache.opencmis.commons.provider.CmisProvider;
+
+public class DeleteCommand implements Command {
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#getCommandName()
+   */
+  public String getCommandName() {
+    return "delete";
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#getUsage()
+   */
+  public String getUsage() {
+    return "DELETE <repository id> <object id> [all versions: true/false]";
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#execute(org.apache.opencmis.commons.provider.CmisProvider,
+   * java.lang.String[], java.io.PrintWriter)
+   */
+  public void execute(CmisProvider provider, String[] args, PrintWriter output) {
+    if (args.length < 2) {
+      output.println(getUsage());
+      return;
+    }
+
+    String repositoryId = args[0];
+    String objectId = args[1];
+    Boolean allVersions = (args.length > 2 ? Boolean.valueOf(args[2]) : null);
+
+    output.println("Deleting " + objectId + " ...");
+    output.flush();
+
+    provider.getObjectService().deleteObject(repositoryId, objectId, allVersions, null);
+
+    output.println("done.");
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/DeleteCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/InfosCommand.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/InfosCommand.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/InfosCommand.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/InfosCommand.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.opencmis.commander;
+
+import java.io.PrintWriter;
+import java.util.List;
+
+import org.apache.opencmis.commons.provider.CmisProvider;
+import org.apache.opencmis.commons.provider.RepositoryInfoData;
+
+public class InfosCommand implements Command {
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#getCommandName()
+   */
+  public String getCommandName() {
+    return "infos";
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#getUsage()
+   */
+  public String getUsage() {
+    return "INFOS";
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#execute(org.apache.opencmis.commons.provider.CmisProvider,
+   * java.lang.String[], java.io.PrintWriter)
+   */
+  public void execute(CmisProvider provider, String[] args, PrintWriter output) {
+    List<RepositoryInfoData> repositoryInfos = provider.getRepositoryService().getRepositoryInfos(
+        null);
+
+    for (RepositoryInfoData repositoryInfo : repositoryInfos) {
+      printRepositoryInfo(repositoryInfo, output);
+    }
+  }
+
+  private void printRepositoryInfo(RepositoryInfoData repositoryInfo, PrintWriter output) {
+    output.println("Id:           " + repositoryInfo.getRepositoryId());
+    output.println("Name:         " + repositoryInfo.getProductName());
+    output.println("Description:  " + repositoryInfo.getRepositoryDescription());
+    output.println("Vendor:       " + repositoryInfo.getVendorName());
+    output.println("Product:      " + repositoryInfo.getProductName() + " "
+        + repositoryInfo.getProductVersion());
+    output.println("Root Folder:  " + repositoryInfo.getRootFolderId());
+    output.println("Capabilities: " + repositoryInfo.getRepositoryCapabilities());
+    output.println("------------------------------------------------------");
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/InfosCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/ListCommand.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/ListCommand.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/ListCommand.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/ListCommand.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.opencmis.commander;
+
+import java.io.PrintWriter;
+
+import org.apache.opencmis.commons.PropertyIds;
+import org.apache.opencmis.commons.provider.CmisProvider;
+import org.apache.opencmis.commons.provider.ObjectInFolderData;
+import org.apache.opencmis.commons.provider.ObjectInFolderList;
+import org.apache.opencmis.commons.provider.PropertyData;
+
+public class ListCommand implements Command {
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#getCommandName()
+   */
+  public String getCommandName() {
+    return "list";
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#getUsage()
+   */
+  public String getUsage() {
+    return "LIST <repository id> <folder id>";
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.commander.Command#execute(org.apache.opencmis.commons.provider.CmisProvider,
+   * java.lang.String[], java.io.PrintWriter)
+   */
+  public void execute(CmisProvider provider, String[] args, PrintWriter output) {
+    if (args.length < 2) {
+      output.println(getUsage());
+      return;
+    }
+
+    String repositoryId = args[0];
+    String folderId = args[1];
+
+    ObjectInFolderList list = provider.getNavigationService().getChildren(repositoryId, folderId,
+        null, null, null, null, null, null, null, null, null);
+
+    for (ObjectInFolderData object : list.getObjects()) {
+      output.println(getPropertyValue(object, PropertyIds.CMIS_OBJECT_ID) + "\t"
+          + getPropertyValue(object, PropertyIds.CMIS_NAME) + "\t"
+          + getPropertyValue(object, PropertyIds.CMIS_OBJECT_TYPE_ID));
+    }
+  }
+
+  /**
+   * Returns a property value as string.
+   */
+  private String getPropertyValue(ObjectInFolderData object, String name) {
+    if ((object == null) || (object.getObject() == null)
+        || (object.getObject().getProperties() == null)
+        || (object.getObject().getProperties().getProperties() == null)) {
+      return "?";
+    }
+
+    PropertyData<?> property = object.getObject().getProperties().getProperties().get(name);
+    if ((property == null) || (property.getFirstValue() == null)) {
+      return "<not set>";
+    }
+
+    return property.getFirstValue().toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-tools/src/main/java/org/apache/opencmis/commander/ListCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 16 16:03:38 2010
@@ -0,0 +1,6 @@
+bin
+target
+*.iws
+*.ipr
+*.iml
+.*

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/pom.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/pom.xml (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/pom.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+                             
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opencmis</groupId>
+    <artifactId>opencmis</artifactId>
+    <version>0.1-SNAPSHOT</version>
+	<relativePath>../../pom.xml</relativePath>
+  </parent>
+  
+  <artifactId>opencmis-test-util</artifactId>
+  <name>OpenCMIS Test Utilities</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-commons-api</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opencmis</groupId>
+      <artifactId>opencmis-commons-impl</artifactId>
+      <version>${version}</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/src/main/java/org/apache/opencmis/util/repository/ObjectGenerator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/src/main/java/org/apache/opencmis/util/repository/ObjectGenerator.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/src/main/java/org/apache/opencmis/util/repository/ObjectGenerator.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/src/main/java/org/apache/opencmis/util/repository/ObjectGenerator.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,437 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.opencmis.util.repository;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.GregorianCalendar;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.opencmis.commons.PropertyIds;
+import org.apache.opencmis.commons.api.ExtensionsData;
+import org.apache.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.opencmis.commons.enums.IncludeRelationships;
+import org.apache.opencmis.commons.enums.VersioningState;
+import org.apache.opencmis.commons.impl.dataobjects.ContentStreamDataImpl;
+import org.apache.opencmis.commons.provider.AccessControlList;
+import org.apache.opencmis.commons.provider.ContentStreamData;
+import org.apache.opencmis.commons.provider.NavigationService;
+import org.apache.opencmis.commons.provider.ObjectData;
+import org.apache.opencmis.commons.provider.ObjectInFolderData;
+import org.apache.opencmis.commons.provider.ObjectInFolderList;
+import org.apache.opencmis.commons.provider.ObjectService;
+import org.apache.opencmis.commons.provider.PropertiesData;
+import org.apache.opencmis.commons.provider.PropertyData;
+import org.apache.opencmis.commons.provider.ProviderObjectFactory;
+
+/**
+ * A simple helper class for the tests that generates a sample folder hierarchy and
+ * optionally documents in it.
+ * 
+ * @author Jens
+ *
+ */
+public class ObjectGenerator {
+  
+  private static Log log = LogFactory.getLog(ObjectGenerator.class);
+  private ProviderObjectFactory fFactory;
+  NavigationService fNavSvc;
+  ObjectService fObjSvc;
+  private String fRepositoryId;
+  /**
+   * Indicates if / how many documents are created in each folder
+   */
+  private int fNoDocumentsToCreate;
+  
+  /**
+   * The type id of the document id that is created. 
+   */
+  private String fDocTypeId = BaseObjectTypeIds.CMIS_DOCUMENT.value();
+  
+  /**
+   * The type id of the folder that is created.
+   */
+  private String fFolderTypeId = BaseObjectTypeIds.CMIS_FOLDER.value();
+  
+  /**
+   * A list of property ids. For each element in this list a String property value
+   * is created for each creation of a document. All ids must be valid string 
+   * property id of the type fDocTypeId
+   */
+  private List<String> fStringPropertyIdsToSetForDocument;
+  
+  /**
+   * A list of property ids. For each element in this list a String property value
+   * is created for each creation of a folder. All ids must be valid string 
+   * property id of the type fFolderTypeId
+   */
+  private List<String> fStringPropertyIdsToSetForFolder;
+  
+  /**
+   * number of objects created in total
+   */
+  private int fObjectsInTotalCount = 0;
+  
+  /**
+   * size of content in KB, if 0 create documents without content 
+   */
+  private int fContentSizeInK = 0;
+  
+
+  private static final String NAMEPROPVALPREFIXDOC = "My Document ";
+  private static final String NAMEPROPVALPREFIXFOLDER = "My Folder ";
+  private static final String STRINGPROPVALPREFIXDOC = "My Doc StringProperty ";
+  private static final String STRINGPROPVALPREFIXFOLDER = "My Folder StringProperty ";
+  private static int PROPVALCOUNTER_DOC_NAME = 0;
+  private static int PROPVALCOUNTER_FOLDER_NAME = 0;
+  private static int PROPVALCOUNTER_DOC_STRING_PROP = 0;
+  private static int PROPVALCOUNTER_FOLDER_STRING_PROP = 0;
+  /**
+   * use UUIDs to generate folder and document names 
+   */
+  private boolean fUseUuids ;
+  
+  public ObjectGenerator(ProviderObjectFactory factory, NavigationService navSvc,
+      ObjectService objSvc, String repositoryId) {
+    super();
+    fFactory = factory;
+    fNavSvc = navSvc;
+    fObjSvc = objSvc;
+    fRepositoryId = repositoryId;
+    // create an empty list of properties to generate by default for folder and document
+    fStringPropertyIdsToSetForDocument = new ArrayList<String>();
+    fStringPropertyIdsToSetForFolder = new ArrayList<String>();
+    fNoDocumentsToCreate = 0;
+    fUseUuids = false;
+  }
+  
+  public void setNumberOfDocumentsToCreatePerFolder(int noDocumentsToCreate) {
+    fNoDocumentsToCreate = noDocumentsToCreate;
+  }
+  
+  public void setFolderTypeId(String folderTypeId) {
+    fFolderTypeId = folderTypeId;
+  }
+  
+  public void setDocumentTypeId(String docTypeId) {
+    fDocTypeId = docTypeId;
+  }
+
+  public void setDocumentPropertiesToGenerate(List<String> propertyIds) {
+    fStringPropertyIdsToSetForDocument = propertyIds;
+  }
+
+  public void setFolderPropertiesToGenerate(List<String> propertyIds) {
+    fStringPropertyIdsToSetForFolder = propertyIds;
+  }
+  
+  public void setContentSizeInKB(int sizeInK) {
+    fContentSizeInK = sizeInK;
+  }
+  
+  public void createFolderHierachy(int levels, int childrenPerLevel, String rootFolderId) {
+    createFolderHierachy(rootFolderId, 0, levels, childrenPerLevel);
+  }
+  
+  public void setUseUuidsForNames(boolean useUuids) {
+    /**
+     * use UUIDs to generate folder and document names 
+     */
+    fUseUuids = useUuids;
+  }
+  
+  /**
+   * retrieve the index-th folder from given level of the hierarchy
+   * starting at rootId
+   * @param rootId
+   * @param level
+   * @param index
+   * @return
+   */
+  public String getFolderId(String rootId, int level, int index) {
+    String objectId = rootId;
+    final String requiredProperties = PropertyIds.CMIS_OBJECT_ID + "," + PropertyIds.CMIS_OBJECT_TYPE_ID +
+      "," + PropertyIds.CMIS_BASE_TYPE_ID;
+    // Note: This works because first folders are created then documents
+    for (int i=0; i<level; i++) {
+      ObjectInFolderList result = fNavSvc.getChildren(fRepositoryId, objectId, requiredProperties, PropertyIds.CMIS_OBJECT_TYPE_ID, false,
+          IncludeRelationships.NONE, null, true, BigInteger.valueOf(-1), BigInteger.valueOf(-1), null);
+      List<ObjectInFolderData> children = result.getObjects();
+      ObjectData child = children.get(index).getObject();
+      objectId = (String) child.getProperties().getProperties().get(PropertyIds.CMIS_OBJECT_ID).getFirstValue();        
+    }
+    return objectId;    
+  }
+  
+  /**
+   * retrieve the index-th document from given folder
+   * @param folderId
+   *    folder to retrieve document from
+   * @param index
+   *    index of document to retrieve from this folder
+   * @return
+   */
+  public String getDocumentId(String folderId, int index) {
+    String docId = null;
+    final String requiredProperties = PropertyIds.CMIS_OBJECT_ID + "," + PropertyIds.CMIS_OBJECT_TYPE_ID +
+      "," + PropertyIds.CMIS_BASE_TYPE_ID;
+    ObjectInFolderList result = fNavSvc.getChildren(fRepositoryId, folderId, requiredProperties,
+        PropertyIds.CMIS_OBJECT_TYPE_ID, false, IncludeRelationships.NONE, null, true, BigInteger
+            .valueOf(-1), BigInteger.valueOf(-1), null);
+    List<ObjectInFolderData> children = result.getObjects();
+    int numDocsFound = 0;
+    for (int i=0; i<children.size(); i++) {
+      ObjectData child = children.get(i).getObject();
+      docId = (String) child.getProperties().getProperties().get(PropertyIds.CMIS_OBJECT_ID).getFirstValue();        
+      if (child.getBaseTypeId().equals(BaseObjectTypeIds.CMIS_DOCUMENT)) {
+        if (numDocsFound == index)
+          return docId;
+        else
+          numDocsFound++;
+      }
+    }
+    return docId;    
+  }
+  
+  /**
+   * return the total number of objects created
+   * @return
+   */
+  public int getObjectsInTotal() {
+    return fObjectsInTotalCount;
+  }
+
+  public void createSingleDocument(String folderId) {
+	  createDocument(folderId);      
+  }
+	  
+  private void createFolderHierachy(String parentId, int level, int levels, int childrenPerLevel) {
+    
+    if (level>=levels)
+      return;
+//    log.info(" create folder for parent id: " + parentId + ", in level " + level 
+//         + ", max levels " + levels);
+    
+    for (int i = 0; i < childrenPerLevel; i++) {
+      PropertiesData props = createFolderProperties();      
+      String id = fObjSvc.createFolder(fRepositoryId, props, parentId, null, null, null, null);
+      if (id != null) {
+        ++fObjectsInTotalCount;
+        createFolderHierachy(id, level+1, levels, childrenPerLevel);
+      }
+    }
+    for (int j=0; j<fNoDocumentsToCreate; j++) {
+      createDocument(parentId);
+    }
+  }
+
+  private String createDocument(String folderId) {
+    ContentStreamData contentStream = null;
+    VersioningState versioningState = VersioningState.NONE;
+    List<String> policies = null;
+    AccessControlList addACEs = null;
+    AccessControlList removeACEs = null;
+    ExtensionsData extension = null;
+
+    // log.info("create document in folder " + folderId);
+    PropertiesData props = createDocumentProperties();
+    String id = null;
+    if (fContentSizeInK > 0)
+      contentStream = createContent();
+    id = fObjSvc.createDocument(fRepositoryId, props, folderId, contentStream, versioningState,
+        policies, addACEs, removeACEs, extension);
+    if (null == id)
+      throw new RuntimeException("createDocument failed.");
+    ++fObjectsInTotalCount;
+    return id;
+  }
+  
+  private ContentStreamData createContent() {
+    ContentStreamDataImpl content = new ContentStreamDataImpl();
+    content.setFilename("data.txt");
+    content.setMimeType("text/plain");
+    int len = fContentSizeInK * 1024; // size of document in K
+    byte[] b = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+                0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a,     
+                0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+                0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x0c, 0x0a
+                }; // 32 Bytes
+    ByteArrayOutputStream ba = new ByteArrayOutputStream(len);
+    try {
+      for (int j=0; j<fContentSizeInK; j++) {
+        // write 1K of data
+        for (int i=0; i<32; i++)
+          ba.write(b);
+      }
+    } catch (IOException e) {
+        throw new RuntimeException("Failed to fill content stream with data", e) ;
+    }
+    content.setStream(new ByteArrayInputStream(ba.toByteArray()));
+    return content;
+  }
+
+  private PropertiesData createFolderProperties() {
+    List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
+    properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_NAME, generateFolderNameValue()));
+    properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_OBJECT_TYPE_ID, fFolderTypeId));
+    // Generate some property values for custom attributes
+    for (String stringPropId : fStringPropertyIdsToSetForFolder) {
+      properties.add(fFactory.createPropertyStringData(stringPropId, generateStringPropValueFolder()));      
+    }
+    PropertiesData props = fFactory.createPropertiesData(properties);
+    return props;
+  }
+
+  private PropertiesData createDocumentProperties() {
+    List<PropertyData<?>> properties = new ArrayList<PropertyData<?>>();
+    properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_NAME, generateDocNameValue()));
+    properties.add(fFactory.createPropertyIdData(PropertyIds.CMIS_OBJECT_TYPE_ID, fDocTypeId));
+    // Generate some property values for custom attributes
+    for (String stringPropId : fStringPropertyIdsToSetForDocument) {
+      properties.add(fFactory.createPropertyStringData(stringPropId, generateStringPropValueDoc()));      
+    }
+    PropertiesData props = fFactory.createPropertiesData(properties);
+    return props;
+  }
+  
+  private static synchronized int incrementPropCounterDocName() {
+    return PROPVALCOUNTER_DOC_NAME++;
+  }
+  private static synchronized int incrementPropCounterFolderName() {
+    return PROPVALCOUNTER_FOLDER_NAME++;
+  }
+  private static synchronized int incrementPropCounterDocStringProp() {
+    return PROPVALCOUNTER_DOC_STRING_PROP++;
+  }
+  private static synchronized int incrementPropCounterFolderStringProp() {
+    return PROPVALCOUNTER_FOLDER_STRING_PROP++;
+  }
+
+  private String generateDocNameValue() {
+    if (fUseUuids)
+      return UUID.randomUUID().toString();
+    else
+      return NAMEPROPVALPREFIXDOC + incrementPropCounterDocName();
+  }
+  
+  private String generateFolderNameValue() {
+    if (fUseUuids)
+      return UUID.randomUUID().toString();
+    else
+      return NAMEPROPVALPREFIXFOLDER + incrementPropCounterFolderName();
+  }
+
+  private static String generateStringPropValueDoc() {
+    return STRINGPROPVALPREFIXDOC + incrementPropCounterDocStringProp();
+  }
+  
+  private static String generateStringPropValueFolder() {
+    return STRINGPROPVALPREFIXFOLDER + incrementPropCounterFolderStringProp();
+  }
+  
+  public void dumpFolder(String folderId, String propertyFilter) {
+    log.info("starting dumpFolder() id " + folderId + " ...");
+    boolean allRequiredPropertiesArePresent =  propertyFilter!= null && propertyFilter.equals("*"); // can be optimized
+    final String requiredProperties = allRequiredPropertiesArePresent ? propertyFilter :
+       PropertyIds.CMIS_OBJECT_ID+","+PropertyIds.CMIS_NAME + ","+PropertyIds.CMIS_OBJECT_TYPE_ID +
+       ","+PropertyIds.CMIS_BASE_TYPE_ID;
+    // if all required properties are contained in the filter use we use the filter otherwise
+    // we use our own set and get those from the filter later in an extra call
+    String propertyFilterIntern = allRequiredPropertiesArePresent ? propertyFilter : requiredProperties;
+    dumpFolder(folderId, propertyFilterIntern, 0);
+  }
+
+  private void dumpFolder(String folderId, String propertyFilter, int depth) {
+    boolean allRequiredPropertiesArePresent = propertyFilter.equals("*"); // can be optimized
+    StringBuilder prefix = new StringBuilder();
+    for (int i=0; i<depth; i++)
+      prefix.append("   ");
+    
+    ObjectInFolderList result = fNavSvc.getChildren(fRepositoryId, folderId, propertyFilter, null, false,
+        IncludeRelationships.NONE, null, true, BigInteger.valueOf(-1), BigInteger.valueOf(-1), null);
+    List<ObjectInFolderData> folders = result.getObjects();
+    if (null != folders) {
+      log.info(prefix + "found " + folders.size() + " children in folder " + folderId);
+      int no=0;
+      for (ObjectInFolderData folder : folders) {
+        log.info(prefix.toString() + ++no + ": found object with id: " + folder.getObject().getId() + " and path segment: "
+            + folder.getPathSegment());
+        dumpObjectProperties(folder.getObject(), depth, propertyFilter, !allRequiredPropertiesArePresent);        
+        String objectTypeBaseId = folder.getObject().getBaseTypeId().value();
+        if (objectTypeBaseId.equals(BaseObjectTypeIds.CMIS_FOLDER.value())) {
+          dumpFolder(folder.getObject().getId(), propertyFilter, depth+1);
+        }
+        else if (objectTypeBaseId.equals(BaseObjectTypeIds.CMIS_DOCUMENT.value())) {
+          dumpObjectProperties(folder.getObject(), depth+1, propertyFilter, !allRequiredPropertiesArePresent);        
+        }
+      }
+    }
+    log.info(""); // add empty line
+  }
+
+  private void dumpObjectProperties(ObjectData object, int depth, String propertyFilter, boolean mustFetchProperties) {
+    final SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
+    StringBuilder prefix = new StringBuilder();
+    for (int i=0; i<depth; i++)
+      prefix.append("   ");
+
+    log.info(prefix + "found object id " + object.getId());
+    Map<String, PropertyData<?>> propMap;
+    if (mustFetchProperties) {
+      String objId = (String) object.getProperties().getProperties().get(PropertyIds.CMIS_OBJECT_ID).getFirstValue();
+      PropertiesData props = fObjSvc.getProperties(fRepositoryId, objId, propertyFilter, null);
+      propMap = props.getProperties();
+    } else {
+      propMap = object.getProperties().getProperties();
+    }
+    StringBuilder valueStr = new StringBuilder("[");
+    for (Map.Entry <String, PropertyData<?>> entry : propMap.entrySet()) {
+        if (entry.getValue().getValues().size() > 1) {
+          if (entry.getValue().getFirstValue() instanceof GregorianCalendar) {
+            for ( Object obj : entry.getValue().getValues()) {
+              GregorianCalendar cal = (GregorianCalendar) obj;
+              valueStr.append(df.format(cal.getTime()) + ", ");              
+            }
+            valueStr.append("]");
+          } else {
+            valueStr = new StringBuilder(entry.getValue().getValues().toString());
+          }
+        } else {
+          Object value = entry.getValue().getFirstValue();
+          if (null != value) {
+            valueStr = new StringBuilder(value.toString());
+            if (value instanceof GregorianCalendar) {
+              valueStr = new StringBuilder(df.format(((GregorianCalendar) entry.getValue().getFirstValue()).getTime()));   
+            }
+          }
+        }
+        log.info(prefix + entry.getKey() + ": " + valueStr);          
+    }
+    log.info(""); // add empty line
+  }
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-test/opencmis-test-util/src/main/java/org/apache/opencmis/util/repository/ObjectGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/pom.xml?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/pom.xml (added)
+++ incubator/chemistry/trunk/opencmis/pom.xml Tue Feb 16 16:03:38 2010
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+                             
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Project Information -->
+
+  <groupId>org.opencmis</groupId>
+  <artifactId>opencmis</artifactId>
+  <name>OpenCMIS</name>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <organization>
+    <name>The Apache Software Foundation</name>
+    <url>http://www.apache.org/</url>
+  </organization>
+
+  <url>http://incubator.apache.org/chemistry/</url>
+  <inceptionYear>2009</inceptionYear>
+  <description>
+    OpenCMIS is an open source implementation of the OASIS CMIS specification.
+  </description>
+
+  <licenses>
+    <license>
+      <name>Apache 2</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <scm>
+    <connection>scm:svn:https://svn.apache.org/repos/asf/incubator/chemistry/opencmis/trunk</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/chemistry/opencmis/trunk</developerConnection>
+    <url>https://svn.apache.org/repos/asf/incubator/chemistry/opencmis/trunk/</url>
+  </scm>
+
+  <issueManagement>
+    <system>Jira</system>
+    <url>https://issues.apache.org/jira/browse/CMIS</url>
+  </issueManagement>
+
+  <mailingLists>
+    <mailingList>
+      <name>Chemistry Development List</name>
+      <subscribe>chemistry-dev-subscribe@incubator.apache.org</subscribe>
+      <unsubscribe>chemistry-dev-unsubscribe@incubator.apache.org</unsubscribe>
+      <post>chemistry-dev@incubator.apache.org</post>
+      <archive>
+        http://mail-archives.apache.org/mod_mbox/incubator-chemistry-dev/
+      </archive>
+    </mailingList>
+    <mailingList>
+      <name>Chemistry Source Control List</name>
+      <subscribe>chemistry-commits-subscribe@incubator.apache.org</subscribe>
+      <unsubscribe>chemistry-commits-unsubscribe@incubator.apache.org</unsubscribe>
+      <post>chemistry-commits@incubator.apache.org</post>
+      <archive>
+        http://mail-archives.apache.org/mod_mbox/incubator-chemistry-commits/
+      </archive>
+    </mailingList>
+  </mailingLists>
+
+  <developers>
+    <developer>
+      <name>Dieter Guendisch</name>
+      <id>dguendisch</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Florian Müller</name>
+      <id>fmui</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Jens Hübel</name>
+      <id>jenshuebel</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Juergen Schneider</name>
+      <id>jschneider</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Stephan Klevenz</name>
+      <id>klevenzs</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Paul Goetz</name>
+      <id>paulgoetz</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>David Caruana</name>
+      <id>dcaruana</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+  </developers>
+
+
+  <!-- Project Environment -->
+  <modules>
+    <module>opencmis-commons/opencmis-commons-api</module>
+    <module>opencmis-commons/opencmis-commons-impl</module>
+    <module>opencmis-client/opencmis-client-api</module>
+    <module>opencmis-client/opencmis-client-impl</module>
+    <module>opencmis-client/opencmis-provider-impl</module>
+	<module>opencmis-server/opencmis-server-spi</module>
+	<module>opencmis-server/opencmis-server-impl</module>
+	<module>opencmis-server/opencmis-server-inmemory</module>
+	<module>opencmis-server/opencmis-server-fileshare</module>
+	<module>opencmis-test/opencmis-test-fit</module>
+	<module>opencmis-test/opencmis-test-tck</module>
+	<module>opencmis-test/opencmis-test-tools</module>
+	<module>opencmis-test/opencmis-test-util</module>
+	<module>opencmis-test/opencmis-test-browser</module>	
+  </modules>
+
+  <build>
+    <plugins>
+      <!-- Java 1.5 -->
+      <plugin>
+        <inherited>true</inherited>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <target>1.5</target>
+          <source>1.5</source>
+		  <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+      <plugin>
+        <inherited>true</inherited>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.1</version>        
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar-no-fork</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <includePom>true</includePom>
+        </configuration>
+      </plugin>
+	  <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.3</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+          <filtering>false</filtering>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-5</version>
+        <configuration>
+          <descriptors>
+            <descriptor>client-assembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <downloadSources>true</downloadSources>
+          <downloadJavadocs>true</downloadJavadocs>
+		  <workspace>.</workspace>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+     <dependency>
+        <groupId>commons-codec</groupId>
+        <artifactId>commons-codec</artifactId>
+        <version>1.4</version>
+     </dependency>
+     <dependency>
+        <groupId>commons-logging</groupId>
+        <artifactId>commons-logging</artifactId>
+        <version>1.1.1</version>
+     </dependency>
+    
+     <dependency>
+        <groupId>log4j</groupId>
+        <artifactId>log4j</artifactId>
+        <version>1.2.13</version>
+        <scope>test</scope>
+     </dependency>
+     <dependency>
+     	<groupId>junit</groupId>
+     	<artifactId>junit</artifactId>
+     	<version>4.7</version>
+     	<type>jar</type>
+     	<scope>test</scope>
+     </dependency>
+  </dependencies>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.5</version>
+        <configuration>
+		  <code>
+			javadoc:aggregate
+          </code>
+        </configuration>
+      </plugin>
+      <plugin>
+      	<groupId>org.apache.maven.plugins</groupId>
+      	<artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>

Propchange: incubator/chemistry/trunk/opencmis/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/src/site/apt/browser.apt
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/src/site/apt/browser.apt?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/src/site/apt/browser.apt (added)
+++ incubator/chemistry/trunk/opencmis/src/site/apt/browser.apt Tue Feb 16 16:03:38 2010
@@ -0,0 +1,25 @@
+  -----
+  OpenCMIS Browser
+  -----
+  
+OpenCMIS Browser
+
+  The CMIS Browser is a simple web based tool to browse CMIS enabled 
+  repositories that support the AtomPub binding. It sits between the web 
+  browser of the end-user and the CMIS repository. It applies stylesheets
+  to the Atom entries and feeds that repository returns and creates HTML 
+  pages that enable the end-user to navigate through the repository.
+
+  The CMIS Browser consists of a small WAR file that doesn't require any 
+  configuration. Deploy it to a servlet engine and type 
+  <<<http://<host>/<context>/browse>>> in your web browser. Enter the URL
+  of the AtomPub service document into the input box and start browsing.
+  
+
+* Build and Deploy the CMIS Browser
+
+  [[1]] {{{./how-to-build.html}Build OpenCMIS}}.
+
+  [[2]] A ready-to-use WAR file should now exist in <<</opencmis-test/opencmis-test-browser/target>>>.
+
+  [[3]] Deploy the WAR file to your favorite servlet engine. 
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/src/site/apt/browser.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/src/site/apt/client-api.apt
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/src/site/apt/client-api.apt?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/src/site/apt/client-api.apt (added)
+++ incubator/chemistry/trunk/opencmis/src/site/apt/client-api.apt Tue Feb 16 16:03:38 2010
@@ -0,0 +1,19 @@
+  -----
+  OpenCMIS Client API
+  -----
+
+OpenCMIS Client API
+
+  The OpenCMIS Client API is under development and not working yet.
+  
+  You can check the 
+  {{{./opencmis-commons-api/apidocs/index.html}OpenCMIS Commons JavaDoc}} 
+  and
+  {{{./opencmis-client-api/apidocs/index.html}OpenCMIS Client API JavaDoc}}
+  for a first impression.
+
+  
+  For the time being, you might want to use the 
+  {{{./client-provider.html}client provider layer}}. The interface is not
+  as nice as the client API but it is feature complete and working.
+  
\ No newline at end of file

Propchange: incubator/chemistry/trunk/opencmis/src/site/apt/client-api.apt
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message