You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2005/07/06 17:46:47 UTC
svn commit: r209471 - in /incubator/jackrabbit/trunk/contrib/jcr-server: ./
client/ commons/ server/ server/src/java/org/apache/jackrabbit/server/io/
server/src/java/org/apache/jackrabbit/webdav/jcr/
server/src/java/org/apache/jackrabbit/webdav/jcr/nod...
Author: tripod
Date: Wed Jul 6 08:46:44 2005
New Revision: 209471
URL: http://svn.apache.org/viewcvs?rev=209471&view=rev
Log:
- adapting to latest jackrabbit changes
Removed:
incubator/jackrabbit/trunk/contrib/jcr-server/commons/
Modified:
incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml
incubator/jackrabbit/trunk/contrib/jcr-server/project.properties
incubator/jackrabbit/trunk/contrib/jcr-server/project.xml
incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/MimeResolver.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZIPImportCommand.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/mimetypes.properties
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java
incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml
incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml
incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/DefaultActiveLock.java
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/client/project.xml Wed Jul 6 08:46:44 2005
@@ -43,7 +43,8 @@
<version>${jackrabbit.build.version.jcr}</version>
</dependency>
<dependency>
- <id>jackrabbit</id>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
<version>${jackrabbit.build.version.jackrabbit}</version>
</dependency>
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/project.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/project.properties?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/project.properties (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/project.properties Wed Jul 6 08:46:44 2005
@@ -3,5 +3,5 @@
#-------------------------------------------------------
jackrabbit.build.version.jcr=1.0
-jackrabbit.build.version.jackrabbit=0.16.4.1-dev
-jackrabbit.build.version.jcr.rmi=0.16.4.1
+jackrabbit.build.version.jackrabbit=1.0-dev
+jackrabbit.build.version.jcr.rmi=1.0-dev
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/project.xml?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/project.xml Wed Jul 6 08:46:44 2005
@@ -23,7 +23,7 @@
<groupId>jcr-server</groupId>
<name>Jackrabbit-Server</name>
- <currentVersion>0.16.4.1</currentVersion>
+ <currentVersion>1.0-dev</currentVersion>
<inceptionYear>2005</inceptionYear>
<package>org.apache.jackrabbit.server.*</package>
<description>
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/project.xml Wed Jul 6 08:46:44 2005
@@ -36,9 +36,14 @@
<version>${pom.currentVersion}</version>
</dependency>
<dependency>
- <artifactId>commons-jcr</artifactId>
- <groupId>jcr-server</groupId>
- <version>${pom.currentVersion}</version>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-api</artifactId>
+ <version>${jackrabbit.build.version.jackrabbit}</version>
+ </dependency>
+ <dependency>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-commons</artifactId>
+ <version>${jackrabbit.build.version.jackrabbit}</version>
</dependency>
<!-- external dependencies -->
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java Wed Jul 6 08:46:44 2005
@@ -25,7 +25,6 @@
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
-import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.HashSet;
@@ -144,7 +143,7 @@
NodeIterator iter = node.getNodes();
while (iter.hasNext()) {
Node child = iter.nextNode();
- String label = Text.getLabel(child.getPath());
+ String label = Text.getName(child.getPath());
writer.print("<li><a href=\"");
writer.print(Text.escape(label));
if (isCollectionNodeType(child.getPrimaryNodeType().getName())) {
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/MimeResolver.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/MimeResolver.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/MimeResolver.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/MimeResolver.java Wed Jul 6 08:46:44 2005
@@ -70,7 +70,7 @@
* @return
*/
public String getMimeType(String filename) {
- String ext = Text.getLabel(filename, '.');
+ String ext = Text.getName(filename, '.');
if (ext.equals("")) {
ext = filename;
}
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZIPImportCommand.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZIPImportCommand.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZIPImportCommand.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/ZIPImportCommand.java Wed Jul 6 08:46:44 2005
@@ -104,10 +104,10 @@
while ((entry=zin.getNextEntry())!=null) {
log.info("entry: " + entry.getName() + " size: " + entry.getSize());
if (entry.isDirectory()) {
- AbstractImportCommand.mkDirs(context, parentNode, Text.makeValidJCRPath(entry.getName()));
+ AbstractImportCommand.mkDirs(context, parentNode, makeValidJCRPath(entry.getName()));
zin.closeEntry();
} else {
- String path = Text.makeValidJCRPath(entry.getName());
+ String path = makeValidJCRPath(entry.getName());
if (path.charAt(0)!='/') {
path = "/" + path;
}
@@ -118,7 +118,7 @@
ImportContext subctx = context.createSubContext(parent);
subctx.setInputStream(bin);
- subctx.setSystemId(Text.getLabel(path));
+ subctx.setSystemId(Text.getName(path));
subctx.setModificationTime(entry.getTime());
ImportResourceChain.getChain().execute(subctx);
zin.closeEntry();
@@ -145,4 +145,28 @@
public void setRecursive(boolean recursive) {
this.recursive = recursive;
}
+
+ /**
+ * Creates a valid jcr label from the given one
+ *
+ * @param label
+ * @return
+ */
+ public static String makeValidJCRPath(String label) {
+ StringBuffer ret = new StringBuffer(label.length());
+ for (int i=0; i<label.length(); i++) {
+ char c = label.charAt(i);
+ if (c=='*' || c=='\'' || c=='\"') {
+ c='_';
+ } else if (c=='[') {
+ c='(';
+ } else if (c==']') {
+ c=')';
+ }
+ ret.append(c);
+ }
+ return ret.toString();
+ }
+
+
}
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/mimetypes.properties
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/mimetypes.properties?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/mimetypes.properties (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/mimetypes.properties Wed Jul 6 08:46:44 2005
@@ -14,6 +14,7 @@
cpio=application/x-cpio
cpt=application/mac-compactpro
cq=application/cq-durboser
+crx=application/crx-durboser
csh=application/x-csh
css=text/css
dcr=application/x-director
@@ -48,6 +49,7 @@
lha=application/octet-stream
lzh=application/octet-stream
man=application/x-troff-man
+mdb=application/msaccess
me=application/x-troff-me
mesh=model/mesh
mid=audio/midi
@@ -123,6 +125,7 @@
wav=audio/x-wav
wrl=model/vrml
xbm=image/x-xbitmap
+xls=application/msexcel
xml=text/xml
xpm=image/x-xpixmap
xwd=image/x-xwindowdump
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java Wed Jul 6 08:46:44 2005
@@ -629,7 +629,7 @@
}
// retrieve the last part of the path
- String name = Text.getLabel(resourceHref);
+ String name = Text.getName(resourceHref);
// remove index
if (removeIndex) {
if (name.endsWith("]")) {
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java Wed Jul 6 08:46:44 2005
@@ -592,7 +592,7 @@
if (found) {
destRelPath = childPath;
} else {
- found = afterRelPath.equals(Text.getLabel(childPath));
+ found = afterRelPath.equals(Text.getName(childPath));
}
}
} else {
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java Wed Jul 6 08:46:44 2005
@@ -108,7 +108,7 @@
int type = prop.getType();
if (property.getName().equals(JCR_VALUE)) {
String strVal = (property.getValue() != null) ? String.valueOf(property.getValue()) : "";
- Value val = ValueHelper.deserialize(getRepositorySession().getValueFactory(), strVal, type, false);
+ Value val = ValueHelper.deserialize(strVal, type, false);
prop.setValue(val);
} else if (property.getName().equals(JCR_VALUES)) {
prop.setValue(new ValuesProperty(property).getValues(getRepositorySession().getValueFactory(), prop.getType()));
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/nodetype/NodeTypeConstants.java Wed Jul 6 08:46:44 2005
@@ -17,7 +17,6 @@
import org.jdom.Namespace;
import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
-import org.apache.jackrabbit.nodetype.xml.Constants;
/**
* <code>NodeTypeConstants</code> used to represent nodetype definitions in
@@ -26,7 +25,7 @@
* @see javax.jcr.nodetype.NodeType
* @todo intercaps only for consistency with jackrabbit... webdav rfcs never use intercaps.
*/
-public interface NodeTypeConstants extends Constants {
+public interface NodeTypeConstants {
public static final Namespace NAMESPACE = ItemResourceConstants.NAMESPACE;
@@ -42,4 +41,79 @@
/** Name of the node type definition element. */
public static final String XML_NODETYPE = "nodeType";
+
+ //------< copied from org.apache.jackrabbit.core.nodetype.xml.Constants >---
+
+ /** Name of the node type definition root element. */
+ String NODETYPES_ELEMENT = "nodeTypes";
+
+ /** Name of the node type definition element. */
+ String NODETYPE_ELEMENT = "nodeType";
+
+ /** Name of the child node definition element. */
+ String CHILDNODEDEFINITION_ELEMENT = "childNodeDefinition";
+
+ /** Name of the property definition element. */
+ String PROPERTYDEFINITION_ELEMENT = "propertyDefinition";
+
+ /** Name of the <code>isMixin</code> attribute. */
+ String ISMIXIN_ATTRIBUTE = "isMixin";
+
+ /** Name of the <code>hasOrderableChildNodes</code> attribute. */
+ String HASORDERABLECHILDNODES_ATTRIBUTE = "hasOrderableChildNodes";
+
+ /** Name of the primary item name attribute. */
+ String PRIMARYITEMNAME_ATTRIBUTE = "primaryItemName";
+
+ /** Name of the supertypes element. */
+ String SUPERTYPES_ELEMENT = "supertypes";
+
+ /** Name of the supertype element. */
+ String SUPERTYPE_ELEMENT = "supertype";
+
+ /** Name of the <code>name</code> attribute. */
+ String NAME_ATTRIBUTE = "name";
+
+ /** Name of the <code>autoCreated</code> attribute. */
+ String AUTOCREATED_ATTRIBUTE = "autoCreated";
+
+ /** Name of the <code>mandatory</code> attribute. */
+ String MANDATORY_ATTRIBUTE = "mandatory";
+
+ /** Name of the <code>onParentVersion</code> attribute. */
+ String ONPARENTVERSION_ATTRIBUTE = "onParentVersion";
+
+ /** Name of the <code>protected</code> attribute. */
+ String PROTECTED_ATTRIBUTE = "protected";
+
+ /** Name of the required type attribute. */
+ String REQUIREDTYPE_ATTRIBUTE = "requiredType";
+
+ /** Name of the value constraints element. */
+ String VALUECONSTRAINTS_ELEMENT = "valueConstraints";
+
+ /** Name of the value constraint element. */
+ String VALUECONSTRAINT_ELEMENT = "valueConstraint";
+
+ /** Name of the default values element. */
+ String DEFAULTVALUES_ELEMENT = "defaultValues";
+
+ /** Name of the default value element. */
+ String DEFAULTVALUE_ELEMENT = "defaultValue";
+
+ /** Name of the <code>multiple</code> attribute. */
+ String MULTIPLE_ATTRIBUTE = "multiple";
+
+ /** Name of the required primary types element. */
+ String REQUIREDPRIMARYTYPES_ELEMENT = "requiredPrimaryTypes";
+
+ /** Name of the required primary type element. */
+ String REQUIREDPRIMARYTYPE_ELEMENT = "requiredPrimaryType";
+
+ /** Name of the default primary type attribute. */
+ String DEFAULTPRIMARYTYPE_ATTRIBUTE = "defaultPrimaryType";
+
+ /** Name of the <code>sameNameSiblings</code> attribute. */
+ String SAMENAMESIBLINGS_ATTRIBUTE = "sameNameSiblings";
+
}
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/observation/SubscriptionImpl.java Wed Jul 6 08:46:44 2005
@@ -20,7 +20,7 @@
import org.apache.jackrabbit.webdav.DavConstants;
import org.apache.jackrabbit.webdav.observation.*;
import org.apache.jackrabbit.webdav.util.XmlUtil;
-import org.apache.jackrabbit.util.uuid.UUID;
+import org.apache.jackrabbit.uuid.UUID;
import org.jdom.Element;
import javax.jcr.observation.*;
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java Wed Jul 6 08:46:44 2005
@@ -102,7 +102,7 @@
Element[] propValue = (Element[])getValue();
Value[] values = new Value[propValue.length];
for (int i = 0; i < propValue.length; i++) {
- values[i] = ValueHelper.deserialize(fac, propValue[i].getText(), propertyType, false);
+ values[i] = ValueHelper.deserialize(propValue[i].getText(), propertyType, false);
}
return values;
}
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java Wed Jul 6 08:46:44 2005
@@ -92,7 +92,7 @@
throw new IllegalArgumentException("SearchResultProperty requires a set of 'jcr:name','jcr:value' and 'jcr:type' xml elements.");
}
colList.add(name);
- valList.add((value == null) ? null : ValueHelper.deserialize(fac, value, type, false));
+ valList.add((value == null) ? null : ValueHelper.deserialize(value, type, false));
// reset...
name = null;
value = null;
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/version/report/ExportViewReport.java Wed Jul 6 08:46:44 2005
@@ -124,7 +124,7 @@
try {
// create tmpFile in default system-tmp directory
- String prefix = "_tmp_" + Text.getLabel(absPath);
+ String prefix = "_tmp_" + Text.getName(absPath);
File tmpfile = File.createTempFile(prefix, null, null);
tmpfile.deleteOnExit();
FileOutputStream out = new FileOutputStream(tmpfile);
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java Wed Jul 6 08:46:44 2005
@@ -156,7 +156,7 @@
}
}
if (name == null && getResourcePath() != null) {
- name = Text.getLabel(getResourcePath());
+ name = Text.getName(getResourcePath());
}
return name;
}
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/project.xml Wed Jul 6 08:46:44 2005
@@ -55,9 +55,17 @@
</properties>
</dependency>
<dependency>
- <artifactId>commons-jcr</artifactId>
- <groupId>jcr-server</groupId>
- <version>${pom.currentVersion}</version>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-api</artifactId>
+ <version>${jackrabbit.build.version.jackrabbit}</version>
+ <properties>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+ <dependency>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-commons</artifactId>
+ <version>${jackrabbit.build.version.jackrabbit}</version>
<properties>
<war.bundle>true</war.bundle>
</properties>
@@ -73,7 +81,8 @@
</properties>
</dependency>
<dependency>
- <id>jackrabbit</id>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
<version>${jackrabbit.build.version.jackrabbit}</version>
<properties>
<war.bundle>true</war.bundle>
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/project.xml Wed Jul 6 08:46:44 2005
@@ -29,14 +29,16 @@
<!-- D E P E N D E N C I E S -->
<!-- ====================================================================== -->
<dependencies>
- <!-- internal dependencies -->
<dependency>
- <artifactId>commons-jcr</artifactId>
- <groupId>jcr-server</groupId>
- <version>${pom.currentVersion}</version>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-api</artifactId>
+ <version>${jackrabbit.build.version.jackrabbit}</version>
+ </dependency>
+ <dependency>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit-commons</artifactId>
+ <version>${jackrabbit.build.version.jackrabbit}</version>
</dependency>
-
- <!-- external dependencies -->
<dependency>
<groupId>jsr170</groupId>
<artifactId>jcr</artifactId>
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java Wed Jul 6 08:46:44 2005
@@ -15,38 +15,53 @@
*/
package org.apache.jackrabbit.webdav;
-import org.apache.log4j.Logger;
+import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
+import org.apache.jackrabbit.webdav.header.DepthHeader;
+import org.apache.jackrabbit.webdav.header.IfHeader;
import org.apache.jackrabbit.webdav.lock.LockInfo;
-import org.apache.jackrabbit.webdav.lock.Type;
import org.apache.jackrabbit.webdav.lock.Scope;
-import org.apache.jackrabbit.webdav.property.*;
-import org.apache.jackrabbit.webdav.transaction.*;
-import org.apache.jackrabbit.webdav.observation.*;
-import org.apache.jackrabbit.webdav.version.*;
+import org.apache.jackrabbit.webdav.lock.Type;
+import org.apache.jackrabbit.webdav.observation.ObservationConstants;
+import org.apache.jackrabbit.webdav.observation.SubscriptionInfo;
+import org.apache.jackrabbit.webdav.ordering.OrderPatch;
+import org.apache.jackrabbit.webdav.ordering.OrderingConstants;
+import org.apache.jackrabbit.webdav.ordering.Position;
+import org.apache.jackrabbit.webdav.property.DavPropertyName;
+import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
+import org.apache.jackrabbit.webdav.property.DavPropertySet;
+import org.apache.jackrabbit.webdav.property.DefaultDavProperty;
+import org.apache.jackrabbit.webdav.transaction.TransactionConstants;
+import org.apache.jackrabbit.webdav.transaction.TransactionInfo;
+import org.apache.jackrabbit.webdav.version.DeltaVConstants;
+import org.apache.jackrabbit.webdav.version.LabelInfo;
+import org.apache.jackrabbit.webdav.version.MergeInfo;
+import org.apache.jackrabbit.webdav.version.OptionsInfo;
+import org.apache.jackrabbit.webdav.version.UpdateInfo;
import org.apache.jackrabbit.webdav.version.report.ReportInfo;
-import org.apache.jackrabbit.webdav.ordering.*;
-import org.apache.jackrabbit.webdav.header.DepthHeader;
-import org.apache.jackrabbit.webdav.header.IfHeader;
-import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
import org.apache.jackrabbit.util.Text;
-import org.jdom.input.SAXBuilder;
-import org.jdom.JDOMException;
+import org.apache.log4j.Logger;
import org.jdom.Document;
import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
-import javax.servlet.http.HttpServletRequest;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletInputStream;
import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import javax.servlet.ServletInputStream;
-import javax.servlet.RequestDispatcher;
-import java.io.InputStream;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStream;
import java.io.UnsupportedEncodingException;
-import java.io.BufferedReader;
-import java.util.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.Principal;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
/**
* <code>WebdavRequestImpl</code>...
@@ -79,8 +94,8 @@
this.ifHeader = new IfHeader(httpRequest);
String host = getHeader("Host");
- String scheme = getScheme();
- hrefPrefix = scheme + "://" + host + getContextPath();
+ String scheme = getScheme();
+ hrefPrefix = scheme + "://" + host + getContextPath();
}
/**
@@ -101,7 +116,7 @@
// add all token present in the the If header to the session as well.
Iterator it = ifHeader.getAllTokens();
while (it.hasNext()) {
- String ifHeaderToken = (String)it.next();
+ String ifHeaderToken = (String) it.next();
session.addLockToken(ifHeaderToken);
}
}
@@ -140,27 +155,26 @@
public DavResourceLocator getDestinationLocator() {
String destination = httpRequest.getHeader(HEADER_DESTINATION);
if (destination != null) {
- try {
- URI uri = new URI(destination);
- if (uri.getAuthority().equals(httpRequest.getHeader("Host"))) {
- destination = Text.unescape(uri.getPath());
- }
- } catch (URISyntaxException e) {
- log.debug("Destination is path is not a valid URI ("+e.getMessage()+".");
- int pos = destination.lastIndexOf(":");
- if (pos > 0) {
- destination = destination.substring(destination.indexOf("/",pos));
- log.debug("Tried to retrieve resource destination path from invalid URI: "+destination);
- }
- }
-
- // cut off the context path
- String contextPath = httpRequest.getContextPath();
- if (destination.startsWith(contextPath)) {
- destination = destination.substring(contextPath.length());
- }
- }
- return factory.createResourceLocator(hrefPrefix, destination);
+ try {
+ URI uri = new URI(destination);
+ if (uri.getAuthority().equals(httpRequest.getHeader("Host"))) {
+ destination = Text.unescape(uri.getRawPath());
+ }
+ } catch (URISyntaxException e) {
+ log.debug("Destination is path is not a valid URI (" + e.getMessage() + ".");
+ int pos = destination.lastIndexOf(":");
+ if (pos > 0) {
+ destination = Text.unescape(destination.substring(destination.indexOf("/", pos)));
+ log.debug("Tried to retrieve resource destination path from invalid URI: " + destination);
+ }
+ }
+ // cut off the context path
+ String contextPath = httpRequest.getContextPath();
+ if (destination.startsWith(contextPath)) {
+ destination = destination.substring(contextPath.length());
+ }
+ }
+ return factory.createResourceLocator(hrefPrefix, destination);
}
/**
@@ -171,19 +185,19 @@
* @see DavServletRequest#isOverwrite()
*/
public boolean isOverwrite() {
- boolean doOverwrite = true;
- String overwriteHeader = httpRequest.getHeader(HEADER_OVERWRITE);
- if (overwriteHeader != null && !overwriteHeader.equalsIgnoreCase(NO_OVERWRITE)){
- doOverwrite = false;
- }
- return doOverwrite;
+ boolean doOverwrite = true;
+ String overwriteHeader = httpRequest.getHeader(HEADER_OVERWRITE);
+ if (overwriteHeader != null && !overwriteHeader.equalsIgnoreCase(NO_OVERWRITE)) {
+ doOverwrite = false;
+ }
+ return doOverwrite;
}
/**
* @see DavServletRequest#getDepth(int)
*/
public int getDepth(int defaultValue) {
- return DepthHeader.parse(httpRequest, defaultValue).getDepth();
+ return DepthHeader.parse(httpRequest, defaultValue).getDepth();
}
/**
@@ -204,27 +218,27 @@
* @see DavServletRequest#getTimeout()
*/
public long getTimeout() {
- String timeoutStr = httpRequest.getHeader(HEADER_TIMEOUT);
- long timeout = UNDEFINED_TIMEOUT;
- if (timeoutStr != null && timeoutStr.length() > 0) {
- int secondsInd = timeoutStr.indexOf("Second-");
- if (secondsInd >= 0) {
- secondsInd += 7; // read over "Second-"
- int i = secondsInd;
+ String timeoutStr = httpRequest.getHeader(HEADER_TIMEOUT);
+ long timeout = UNDEFINED_TIMEOUT;
+ if (timeoutStr != null && timeoutStr.length() > 0) {
+ int secondsInd = timeoutStr.indexOf("Second-");
+ if (secondsInd >= 0) {
+ secondsInd += 7; // read over "Second-"
+ int i = secondsInd;
while (i < timeoutStr.length() && Character.isDigit(timeoutStr.charAt(i))) {
i++;
}
- try {
- timeout = 1000L * Long.parseLong(timeoutStr.substring(secondsInd, i));
- } catch (NumberFormatException ignore) {
- // ignore an let the lock define the default timeout
- log.error("Invalid timeout format: "+timeoutStr);
- }
- } else if (timeoutStr.equalsIgnoreCase(TIMEOUT_INFINITE)) {
- timeout = INFINITE_TIMEOUT;
- }
- }
- return timeout;
+ try {
+ timeout = 1000L * Long.parseLong(timeoutStr.substring(secondsInd, i));
+ } catch (NumberFormatException ignore) {
+ // ignore an let the lock define the default timeout
+ log.error("Invalid timeout format: " + timeoutStr);
+ }
+ } else if (timeoutStr.equalsIgnoreCase(TIMEOUT_INFINITE)) {
+ timeout = INFINITE_TIMEOUT;
+ }
+ }
+ return timeout;
}
/**
@@ -249,7 +263,7 @@
try {
InputStream in = httpRequest.getInputStream();
if (in != null) {
- SAXBuilder builder = new SAXBuilder(false);
+ SAXBuilder builder = new SAXBuilder(false);
requestDocument = builder.build(in);
}
} catch (IOException e) {
@@ -299,35 +313,35 @@
propfindProps = new DavPropertyNameSet();
Document requestDocument = getRequestDocument();
- // propfind httpRequest with empty body or invalid Xml >> retrieve all property
- // TODO: spec requires a 'BAD REQUEST' error code
- if (requestDocument == null) {
- return;
- }
-
- // propfind httpRequest with invalid body >> treat as if empty body
- Element root = requestDocument.getRootElement();
- if (!root.getName().equals(XML_PROPFIND)) {
- log.info("PropFind-Request has no <profind> tag.");
- return;
- }
-
- List childList = root.getChildren();
- for (int i = 0; i < childList.size(); i++) {
- Element child = (Element) childList.get(i);
- String nodeName = child.getName();
- if (XML_PROP.equals(nodeName)) {
- propfindType = PROPFIND_BY_PROPERTY;
- propfindProps = new DavPropertyNameSet(child);
+ // propfind httpRequest with empty body or invalid Xml >> retrieve all property
+ // TODO: spec requires a 'BAD REQUEST' error code
+ if (requestDocument == null) {
+ return;
+ }
+
+ // propfind httpRequest with invalid body >> treat as if empty body
+ Element root = requestDocument.getRootElement();
+ if (!root.getName().equals(XML_PROPFIND)) {
+ log.info("PropFind-Request has no <profind> tag.");
+ return;
+ }
+
+ List childList = root.getChildren();
+ for (int i = 0; i < childList.size(); i++) {
+ Element child = (Element) childList.get(i);
+ String nodeName = child.getName();
+ if (XML_PROP.equals(nodeName)) {
+ propfindType = PROPFIND_BY_PROPERTY;
+ propfindProps = new DavPropertyNameSet(child);
break;
- } else if (XML_PROPNAME.equals(nodeName)) {
- propfindType = PROPFIND_PROPERTY_NAMES;
+ } else if (XML_PROPNAME.equals(nodeName)) {
+ propfindType = PROPFIND_PROPERTY_NAMES;
break;
- } else if (XML_ALLPROP.equals(nodeName)) {
- propfindType = PROPFIND_ALL_PROP;
+ } else if (XML_ALLPROP.equals(nodeName)) {
+ propfindType = PROPFIND_ALL_PROP;
break;
- }
- }
+ }
+ }
}
/**
@@ -416,23 +430,23 @@
* {@link org.apache.jackrabbit.webdav.lock.LockInfo#isRefreshLock()}
*
* @return lock info object or <code>null</code> if an error occured while
- * parsing the request body.
+ * parsing the request body.
* @see DavServletRequest#getLockInfo()
*/
public LockInfo getLockInfo() {
LockInfo lockInfo = null;
boolean isDeep = (getDepth(DEPTH_INFINITY) == DEPTH_INFINITY);
- Document requestDocument = getRequestDocument();
+ Document requestDocument = getRequestDocument();
// check if XML request body is present. It SHOULD have one for
- // 'create Lock' request and missing for a 'refresh Lock' request
- if (requestDocument != null) {
- Element root = requestDocument.getRootElement();
- if (root.getName().equals(XML_LOCKINFO)) {
+ // 'create Lock' request and missing for a 'refresh Lock' request
+ if (requestDocument != null) {
+ Element root = requestDocument.getRootElement();
+ if (root.getName().equals(XML_LOCKINFO)) {
lockInfo = new LockInfo(root, getTimeout(), isDeep);
- } else {
- log.debug("Lock-Request has no <lockinfo> tag.");
- }
- } else {
+ } else {
+ log.debug("Lock-Request has no <lockinfo> tag.");
+ }
+ } else {
lockInfo = new LockInfo(null, getTimeout(), isDeep);
}
return lockInfo;
@@ -451,9 +465,7 @@
*
* @param resource Webdav resources being operated on
* @return true if the test is successful and the preconditions for the
- * request processing are fulfilled.
- * @param resource
- * @return
+ * request processing are fulfilled.
* @see DavServletRequest#matchesIfHeader(DavResource)
* @see IfHeader#matches(String, String, String)
* @see DavResource#hasLock(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope)
@@ -483,7 +495,7 @@
public boolean matchesIfHeader(String href, String token, String eTag) {
return ifHeader.matches(href, token, eTag);
}
-
+
//-----------------------------< TransactionDavServletRequest Interface >---
/**
* @see org.apache.jackrabbit.webdav.transaction.TransactionDavServletRequest#getTransactionId()
@@ -550,7 +562,7 @@
try {
pos = new Position(typeNSegment[0], typeNSegment[1]);
} catch (IllegalArgumentException e) {
- log.error("Cannot parse Position header: "+e.getMessage());
+ log.error("Cannot parse Position header: " + e.getMessage());
}
}
}
@@ -559,7 +571,7 @@
/**
* @return <code>OrderPatch</code> object representing the orderpatch request
- * body or <code>null</code> if the
+ * body or <code>null</code> if the
* @see org.apache.jackrabbit.webdav.ordering.OrderingDavServletRequest#getOrderPatch()
*/
public OrderPatch getOrderPatch() {
@@ -606,7 +618,7 @@
Element root = requestDocument.getRootElement();
int depth = getDepth(DEPTH_0);
try {
- lInfo = new LabelInfo(root, depth);
+ lInfo = new LabelInfo(root, depth);
} catch (IllegalArgumentException e) {
log.error(e.getMessage());
}
@@ -622,7 +634,7 @@
Document requestDocument = getRequestDocument();
if (requestDocument != null) {
try {
- mInfo = new MergeInfo(requestDocument.getRootElement());
+ mInfo = new MergeInfo(requestDocument.getRootElement());
} catch (IllegalArgumentException e) {
log.error(e.getMessage());
}
@@ -638,7 +650,7 @@
Document requestDocument = getRequestDocument();
if (requestDocument != null) {
try {
- uInfo = new UpdateInfo(requestDocument.getRootElement());
+ uInfo = new UpdateInfo(requestDocument.getRootElement());
} catch (IllegalArgumentException e) {
log.error(e.getMessage());
}
@@ -848,7 +860,7 @@
}
public void removeAttribute(String s) {
- httpRequest.removeAttribute(s);
+ httpRequest.removeAttribute(s);
}
public Locale getLocale() {
Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/DefaultActiveLock.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/DefaultActiveLock.java?rev=209471&r1=209470&r2=209471&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/DefaultActiveLock.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/lock/DefaultActiveLock.java Wed Jul 6 08:46:44 2005
@@ -15,7 +15,7 @@
*/
package org.apache.jackrabbit.webdav.lock;
-import org.apache.jackrabbit.util.uuid.UUID;
+import org.apache.jackrabbit.uuid.UUID;
import org.apache.jackrabbit.webdav.DavConstants;
/**