You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2006/07/12 15:33:27 UTC

svn commit: r421270 [19/23] - in /jackrabbit/trunk/contrib/spi: ./ commons/ commons/src/ commons/src/main/ commons/src/main/java/ commons/src/main/java/org/ commons/src/main/java/org/apache/ commons/src/main/java/org/apache/jackrabbit/ commons/src/main...

Added: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java (added)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,132 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.jackrabbit.jcr2spi.xml;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.Locator;
+import org.xml.sax.Attributes;
+import org.apache.jackrabbit.util.Text;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
+import javax.jcr.Workspace;
+import javax.jcr.RepositoryException;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.TransformerConfigurationException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.FileInputStream;
+
+/**
+ * <code>WorkspaceContentHandler</code>...
+ */
+public class WorkspaceContentHandler implements ContentHandler {
+
+    private static Logger log = LoggerFactory.getLogger(WorkspaceContentHandler.class);
+
+    private final String parentAbsPath;
+    private final int uuidBehavior;
+    private final Workspace workspace;
+
+    private final File tmpFile;
+    private final ContentHandler delegatee;
+
+    public WorkspaceContentHandler(Workspace workspace, String parentAbsPath, int uuidBehavior) throws RepositoryException {
+        this.workspace = workspace;
+        this.parentAbsPath = parentAbsPath;
+        this.uuidBehavior = uuidBehavior;
+
+        try {
+            String tmpName = Text.md5(parentAbsPath);
+            this.tmpFile = File.createTempFile("___" + tmpName, ".xml");
+
+            SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
+            TransformerHandler th = stf.newTransformerHandler();
+            th.setResult(new StreamResult(new FileOutputStream(tmpFile)));
+            th.getTransformer().setParameter(OutputKeys.METHOD, "xml");
+            th.getTransformer().setParameter(OutputKeys.ENCODING, "UTF-8");
+            th.getTransformer().setParameter(OutputKeys.INDENT, "no");
+            this.delegatee = th;
+
+        } catch (FileNotFoundException e) {
+            throw new RepositoryException(e);
+        } catch (IOException e) {
+            throw new RepositoryException(e);
+        } catch (TransformerConfigurationException e) {
+            throw new RepositoryException(e);
+        }
+    }
+
+    public void endDocument() throws SAXException {
+        delegatee.endDocument();
+
+        try {
+            workspace.importXML(parentAbsPath, new FileInputStream(tmpFile), uuidBehavior);
+        } catch (IOException e) {
+            throw new SAXException(e);
+        } catch (RepositoryException e) {
+            throw new SAXException(e);
+        } finally {
+            tmpFile.delete();
+        }
+    }
+
+    public void startDocument() throws SAXException {
+        delegatee.startDocument();
+    }
+
+    public void characters(char ch[], int start, int length) throws SAXException {
+        delegatee.characters(ch, start, length);
+    }
+
+    public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
+        delegatee.ignorableWhitespace(ch, start, length);
+    }
+
+    public void endPrefixMapping(String prefix) throws SAXException {
+        delegatee.endPrefixMapping(prefix);
+    }
+
+    public void skippedEntity(String name) throws SAXException {
+        delegatee.skippedEntity(name);
+    }
+
+    public void setDocumentLocator(Locator locator) {
+        delegatee.setDocumentLocator(locator);
+    }
+
+    public void processingInstruction(String target, String data) throws SAXException {
+        delegatee.processingInstruction(target, data);
+    }
+
+    public void startPrefixMapping(String prefix, String uri) throws SAXException {
+        delegatee.startPrefixMapping(prefix, uri);
+    }
+
+    public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
+        delegatee.endElement(namespaceURI, localName, qName);
+    }
+
+    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+        delegatee.startElement(namespaceURI, localName, qName, atts);
+    }
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/WorkspaceContentHandler.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/maven.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/maven.xml?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/maven.xml (added)
+++ jackrabbit/trunk/contrib/spi/maven.xml Wed Jul 12 06:33:19 2006
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<project default="multiproject:install" xmlns:ant="jelly:ant" xmlns:m="jelly:maven">
+    <goal name="clean">
+           <attainGoal name="multiproject:clean"/>
+    </goal>
+    <goal name="idea">
+           <attainGoal name="idea:multiproject"/>
+    </goal>
+</project>

Propchange: jackrabbit/trunk/contrib/spi/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/spi/project.properties
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/project.properties?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/project.properties (added)
+++ jackrabbit/trunk/contrib/spi/project.properties Wed Jul 12 06:33:19 2006
@@ -0,0 +1,12 @@
+maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/,http://www.day.com/maven/jsr170/javadocs/jcr-0.16.1-pfd/
+maven.repo.remote = http://www.ibiblio.org/maven/,http://www.day.com/maven/
+
+#-------------------------------------------------------
+jackrabbit.build.version.jackrabbit=1.0-SNAPSHOT
+jackrabbit.build.version.jcr=1.0
+jackrabbit.build.version.spi=0.1-dev
+
+
+# compile options
+maven.compile.source=1.4
+maven.compile.target=1.4

Propchange: jackrabbit/trunk/contrib/spi/project.properties
------------------------------------------------------------------------------
    svn = 

Propchange: jackrabbit/trunk/contrib/spi/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/spi/project.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/project.xml?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/project.xml (added)
+++ jackrabbit/trunk/contrib/spi/project.xml Wed Jul 12 06:33:19 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1997-2006 Day Management AG
+  Barfuesserplatz 6, 4001 Basel, Switzerland
+  All Rights Reserved.
+ 
+  This software is the confidential and proprietary information of
+  Day Management AG, ("Confidential Information"). You shall not
+  disclose such Confidential Information and shall use it only in
+  accordance with the terms of the license agreement you entered into
+  with Day.
+ -->
+<project>
+    <!-- ====================================================================== -->
+    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
+    <!-- ====================================================================== -->
+    <pomVersion>3</pomVersion>
+    <groupId>org.apache.jackrabbit</groupId>
+    <name>SPI Contribution</name>
+    <currentVersion>0.1-dev</currentVersion>
+    <inceptionYear>2006</inceptionYear>
+    <description/>
+    <shortDescription/>
+</project>

Propchange: jackrabbit/trunk/contrib/spi/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/spi/spi/maven.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/maven.xml?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/maven.xml (added)
+++ jackrabbit/trunk/contrib/spi/spi/maven.xml Wed Jul 12 06:33:19 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<project default="jar">
+    <!--
+        the 'clean' goal is already redefined in the maven.xml
+        of the parent project. we need to redefine it here
+        again to 'maven clean' works.
+    -->
+    <goal name="clean">
+        <attainGoal name="clean:clean"/>
+    </goal>
+</project>

Propchange: jackrabbit/trunk/contrib/spi/spi/maven.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/spi/spi/project.properties
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/project.properties?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/project.properties (added)
+++ jackrabbit/trunk/contrib/spi/spi/project.properties Wed Jul 12 06:33:19 2006
@@ -0,0 +1,2 @@
+maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/,http://www.day.com/maven/jsr170/javadocs/jcr-0.16.1-pfd/
+maven.repo.remote = http://www.ibiblio.org/maven/,http://www.day.com/maven/

Propchange: jackrabbit/trunk/contrib/spi/spi/project.properties
------------------------------------------------------------------------------
    svn = 

Propchange: jackrabbit/trunk/contrib/spi/spi/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/spi/spi/project.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/project.xml?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/project.xml (added)
+++ jackrabbit/trunk/contrib/spi/spi/project.xml Wed Jul 12 06:33:19 2006
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<project>
+    <!-- ====================================================================== -->
+    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
+    <!-- ====================================================================== -->
+    <extend>${basedir}/../project.xml</extend>
+    <artifactId>jackrabbit-spi</artifactId>
+    <name>Service Provider Interface (SPI)</name>
+    <package>org.apache.jackrabbit.spi.*</package>
+
+    <!-- ====================================================================== -->
+    <!-- D E P E N D E N C I E S                                                -->
+    <!-- ====================================================================== -->
+    <dependencies>
+        <!-- jackrabbit dependencies -->
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-jcr-commons</artifactId>
+            <version>${jackrabbit.build.version.jackrabbit}</version>
+        </dependency>
+        <!-- external dependencies -->
+        <dependency>
+            <groupId>jsr170</groupId>
+            <artifactId>jcr</artifactId>
+            <version>${jackrabbit.build.version.jcr}</version>
+            <url>http://jcp.org/en/jsr/detail?id=170</url>
+        </dependency>
+    </dependencies>
+
+    <!-- ====================================================================== -->
+    <!-- B U I L D  D E S C R I P T I O N                                       -->
+    <!-- ====================================================================== -->
+    <build>
+        <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.xsd</include>
+                    <include>**/*.properties</include>
+                    <include>**/*.dtd</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+</project>

Propchange: jackrabbit/trunk/contrib/spi/spi/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Batch.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Batch.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Batch.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Batch.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,282 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+import javax.jcr.ItemExistsException;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.RepositoryException;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.version.VersionException;
+import java.io.InputStream;
+
+/**
+ * <code>Batch</code>...
+ */
+public interface Batch {
+
+    /**
+     * @param parentId
+     * @param nodeName Name of the node to be created
+     * @param nodetypeName
+     * @param uuid UUID of the node to be created or <code>null</code>. If due
+     * to an import the uuid of the resulting node is already defined, it must
+     * be passed as separate uuid parameter, indicating a binding value for
+     * the server. Otherwise the uuid must be <code>null</code>.
+     * @throws javax.jcr.ItemExistsException
+     * @throws javax.jcr.PathNotFoundException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.nodetype.NoSuchNodeTypeException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Node#addNode(String)
+     * @see javax.jcr.Node#addNode(String, String)
+     * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
+     * @see javax.jcr.query.Query#storeAsNode(String)
+     */
+    public void addNode(NodeId parentId, QName nodeName, QName nodetypeName, String uuid) throws RepositoryException;
+
+    /**
+     *
+     * @param parentId
+     * @param propertyName Name of the property to be created
+     * @param value
+     * @param propertyType
+     * @throws ValueFormatException
+     * @throws VersionException
+     * @throws LockException
+     * @throws ConstraintViolationException
+     * @throws PathNotFoundException
+     * @throws ItemExistsException
+     * @throws AccessDeniedException
+     * @throws UnsupportedRepositoryOperationException
+     * @throws RepositoryException
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value)
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value, int)
+     * @see javax.jcr.Node#setProperty(String, String)
+     * @see javax.jcr.Node#setProperty(String, String, int)
+     * @see javax.jcr.Node#setProperty(String, java.util.Calendar)
+     * @see javax.jcr.Node#setProperty(String, boolean)
+     * @see javax.jcr.Node#setProperty(String, double)
+     * @see javax.jcr.Node#setProperty(String, long)
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Node)
+     * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
+     * @see javax.jcr.query.Query#storeAsNode(String)
+     */
+    public void addProperty(NodeId parentId, QName propertyName, String value, int propertyType) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
+
+    /**
+     * @param parentId
+     * @param propertyName Name of the property to be created
+     * @param values
+     * @param propertyType the property type
+     * @throws javax.jcr.ValueFormatException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.PathNotFoundException
+     * @throws javax.jcr.ItemExistsException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value[])
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value[], int)
+     * @see javax.jcr.Node#setProperty(String, String[])
+     * @see javax.jcr.Node#setProperty(String, String[], int)
+     * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
+     */
+    public void addProperty(NodeId parentId, QName propertyName, String[] values, int propertyType) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
+
+    /**
+     *
+     * @param parentId
+     * @param propertyName Name of the property to be created
+     * @param value
+     * @param propertyType
+     * @throws ValueFormatException
+     * @throws VersionException
+     * @throws LockException
+     * @throws ConstraintViolationException
+     * @throws PathNotFoundException
+     * @throws ItemExistsException
+     * @throws AccessDeniedException
+     * @throws UnsupportedRepositoryOperationException
+     * @throws RepositoryException
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value, int)
+     * @see javax.jcr.Node#setProperty(String, String, int)
+     * @see javax.jcr.Node#setProperty(String, java.io.InputStream)
+     * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
+     */
+    public void addProperty(NodeId parentId, QName propertyName, InputStream value, int propertyType) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, PathNotFoundException, ItemExistsException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException;
+
+    /**
+     * @param parentId
+     * @param propertyName Name of the property to be created
+     * @param values
+     * @param propertyType the property type
+     * @throws javax.jcr.ValueFormatException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.PathNotFoundException
+     * @throws javax.jcr.ItemExistsException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value[])
+     * @see javax.jcr.Node#setProperty(String, javax.jcr.Value[], int)
+     * @see javax.jcr.Node#setProperty(String, String[])
+     * @see javax.jcr.Node#setProperty(String, String[], int)
+     * @see javax.jcr.Session#importXML(String, java.io.InputStream, int)
+     */
+    public void addProperty(NodeId parentId, QName propertyName, InputStream[] values, int propertyType) throws RepositoryException;
+
+    /**
+     *
+     * @param propertyId
+     * @param value
+     * @param propertyType
+     * @throws ValueFormatException
+     * @throws VersionException
+     * @throws LockException
+     * @throws ConstraintViolationException
+     * @throws AccessDeniedException
+     * @throws UnsupportedRepositoryOperationException
+     * @throws RepositoryException
+     * @see javax.jcr.Property#setValue(javax.jcr.Value)
+     * @see javax.jcr.Property#setValue(String)
+     * @see javax.jcr.Property#setValue(long)
+     * @see javax.jcr.Property#setValue(double)
+     * @see javax.jcr.Property#setValue(java.util.Calendar)
+     * @see javax.jcr.Property#setValue(boolean)
+     * @see javax.jcr.Property#setValue(javax.jcr.Node)
+     */
+    public void setValue(PropertyId propertyId, String value, int propertyType) throws RepositoryException;
+
+    /**
+     * @param propertyId
+     * @param values
+     * @param propertyType the type of the property
+     * @throws javax.jcr.ValueFormatException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Property#setValue(javax.jcr.Value[])
+     * @see javax.jcr.Property#setValue(String[])
+     */
+    public void setValue(PropertyId propertyId, String[] values, int propertyType) throws RepositoryException;
+
+    /**
+     *
+     * @param propertyId
+     * @param value
+     * @param propertyType
+     * @throws ValueFormatException
+     * @throws VersionException
+     * @throws LockException
+     * @throws ConstraintViolationException
+     * @throws AccessDeniedException
+     * @throws UnsupportedRepositoryOperationException
+     * @throws RepositoryException
+     * @see javax.jcr.Property#setValue(javax.jcr.Value)
+     * @see javax.jcr.Property#setValue(java.io.InputStream)
+     */
+    public void setValue(PropertyId propertyId, InputStream value, int propertyType) throws RepositoryException;
+
+    /**
+     * @param propertyId
+     * @param values
+     * @param propertyType the type of the property
+     * @throws javax.jcr.ValueFormatException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Property#setValue(javax.jcr.Value[])
+     */
+    public void setValue(PropertyId propertyId, InputStream[] values, int propertyType) throws RepositoryException;
+
+    /**
+     * @param itemId
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Item#remove()
+     */
+    public void remove(ItemId itemId) throws RepositoryException;
+
+    /**
+     * @param parentId
+     * @param srcNodeId
+     * @param beforeNodeId
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.ItemNotFoundException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Node#orderBefore(String, String)
+     */
+    public void reorderNodes(NodeId srcNodeId, NodeId parentId, NodeId beforeNodeId) throws RepositoryException;
+
+    /**
+     * @param nodeId
+     * @param mixinNodeTypeIds
+     * @throws javax.jcr.nodetype.NoSuchNodeTypeException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Node#addMixin(String)
+     */
+    public void setMixins(NodeId nodeId, QName[] mixinNodeTypeIds) throws RepositoryException;
+
+    /**
+     * @param srcNodeId
+     * @param destParentNodeId
+     * @param destName
+     * @throws javax.jcr.ItemExistsException
+     * @throws javax.jcr.PathNotFoundException
+     * @throws javax.jcr.version.VersionException
+     * @throws javax.jcr.nodetype.ConstraintViolationException
+     * @throws javax.jcr.lock.LockException
+     * @throws javax.jcr.AccessDeniedException
+     * @throws javax.jcr.UnsupportedRepositoryOperationException
+     * @throws javax.jcr.RepositoryException
+     * @see javax.jcr.Session#move(String, String)
+     */
+    public void move(NodeId srcNodeId, NodeId destParentNodeId, QName destName) throws RepositoryException;
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Batch.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Batch.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Event.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Event.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Event.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Event.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,112 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+import org.apache.jackrabbit.name.Path;
+
+/**
+ * <code>Event</code> is similar to the regular JCR Event and adds additional
+ * information about the affected item.
+ */
+public interface Event {
+
+    /**
+     * An event of this type is generated when a node is added.
+     */
+     public static final int NODE_ADDED = javax.jcr.observation.Event.NODE_ADDED;
+
+    /**
+     * An event of this type is generated when a node is removed.
+     */
+     public static final int NODE_REMOVED = javax.jcr.observation.Event.NODE_REMOVED;
+
+    /**
+     * An event of this type is generated when a property is added.
+     */
+     public static final int PROPERTY_ADDED = javax.jcr.observation.Event.PROPERTY_ADDED;
+
+    /**
+     * An event of this type is generated when a property is removed.
+     */
+     public static final int PROPERTY_REMOVED = javax.jcr.observation.Event.PROPERTY_REMOVED;
+
+    /**
+     * An event of this type is generated when a property is changed.
+     */
+     public static final int PROPERTY_CHANGED = javax.jcr.observation.Event.PROPERTY_CHANGED;
+
+    /**
+     * Returns the type of this event: a constant defined by this interface.
+     * One of:
+     * <ul>
+     * <li><code>{@link #NODE_ADDED}</code></li>
+     * <li><code>{@link #NODE_REMOVED}</code></li>
+     * <li><code>{@link #PROPERTY_ADDED}</code></li>
+     * <li><code>{@link #PROPERTY_REMOVED}</code></li>
+     * <li><code>{@link #PROPERTY_CHANGED}</code></li>
+     * </ul>
+     *
+     * @return the type of this event.
+     */
+    public int getType();
+
+    /**
+     * @return the path of the affected item. E.g. the added/removed node or the
+     *         property that was added/removed/changed.
+     */
+    public Path getQPath();
+
+    /**
+     * @return the id of the affected item.
+     */
+    public ItemId getItemId();
+
+    /**
+     * @return the id of the parent node of the affected item.
+     */
+    public NodeId getParentId();
+
+    /**
+     * @return the uuid of the 'associated' node of this event or <code>null</code>
+     * if the node is not referenceable.
+     * @see javax.jcr.observation.ObservationManager#addEventListener
+     */
+    public String getUUID();
+
+    /**
+     * @return the name of the primary node type of the 'associated' node of
+     *         this event.
+     * @see javax.jcr.observation.ObservationManager#addEventListener
+     */
+    public QName getPrimaryNodeTypeName();
+
+    /**
+     * @return the names of the mixin types of the 'associated' node of this
+     *         event.
+     * @see javax.jcr.observation.ObservationManager#addEventListener
+     */
+    public QName[] getMixinTypeNames();
+
+    /**
+     * Returns the user ID connected with this event. This is the string
+     * returned by getUserID of the session that caused the event.
+     *
+     * @return a <code>String</code>.
+     */
+    public String getUserID();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Event.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/Event.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,34 @@
+/*
+ * 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.jackrabbit.spi;
+
+import javax.jcr.RangeIterator;
+
+/**
+ * <code>EventIterator</code>
+ */
+public interface EventIterator extends RangeIterator {
+
+    /**
+     * Returns the next <code>Event</code> in the iteration.
+     *
+     * @return the next <code>Event</code> in the iteration.
+     * @throws java.util.NoSuchElementException if iteration has no more <code>Event</code>s.
+    */
+    public Event nextEvent();
+
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventIterator.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventListener.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventListener.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventListener.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,36 @@
+/*
+ * 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.jackrabbit.spi;
+
+/**
+ * An event listener.
+ * <p>
+ * An <code>EventListener</code> can be registered via the
+ * <code>{@link org.apache.jackrabbit.spi.RepositoryService}</code> object. Event listeners
+ * are notified asynchronously, and see events after they occur and the transaction
+ * is committed. An event listener only sees events for which the session that
+ * registered it has sufficient access rights.
+ */
+public interface EventListener {
+
+    /**
+     * Gets called when an event occurs.
+     *
+     * @param events The event set recieved.
+     */
+    public void onEvent(EventIterator events);
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/EventListener.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,34 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+import org.apache.jackrabbit.name.Path;
+
+/**
+ * <code>IdFactory</code>...
+ */
+public interface IdFactory {
+
+    public PropertyId createPropertyId(NodeId parentId, QName propertyName);
+
+    public NodeId createNodeId(NodeId parentId, Path relativePath);
+
+    public NodeId createNodeId(String uuid, Path relativePath);
+
+    public NodeId createNodeId(String uuid);
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdFactory.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,32 @@
+/*
+ * 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.jackrabbit.spi;
+
+import javax.jcr.RangeIterator;
+
+/**
+ * <code>IdIterator</code>...
+ */
+public interface IdIterator extends RangeIterator {
+    /**
+     * Returns the next item id in the iteration.
+     *
+     * @return the next item id in the iteration.
+     * @throws java.util.NoSuchElementException if no more ids are left.
+     */
+    public ItemId nextId();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/IdIterator.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,31 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.Path;
+
+/**
+ * <code>ItemId</code>...
+ */
+public interface ItemId {
+
+    public boolean denotesNode();
+
+    public String getUUID();
+
+    public Path getRelativePath();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemId.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,40 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+/**
+ * <code>ItemInfo</code>...
+ */
+public interface ItemInfo {
+
+    /**
+     * @return the id of the parent item info
+     */
+    public NodeId getParentId();
+
+    /**
+     * @return Return the qualified representation of the item name
+     */
+    public QName getQName();
+
+    /**
+     * @return Return true if this ItemInfo denotes a node, false otherwise
+     */
+    public boolean denotesNode();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/ItemInfo.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/LockInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/LockInfo.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/LockInfo.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/LockInfo.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.jackrabbit.spi;
+
+/**
+ * <code>LockInfo</code>...
+ */
+public interface LockInfo {
+
+    /**
+     * Id of the node this <code>LockInfo</code> was requested for. Note, that
+     * the id does not represent the id of the lock-holding node.
+     *
+     * @return
+     */
+    // TODO: review if this is needed
+    public NodeId getNodeId();
+
+    public String getLockToken();
+
+    public String getOwner();
+
+    public boolean isDeep();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/LockInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/LockInfo.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeId.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeId.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeId.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,24 @@
+/*
+ * 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.jackrabbit.spi;
+
+/**
+ * <code>NodeId</code>...
+ */
+public interface NodeId extends ItemId {
+
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeId.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,62 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+/**
+ * <code>NodeInfo</code>...
+ */
+public interface NodeInfo extends ItemInfo {
+
+    /**
+     * @return identifier for the item that is based on this info object. the id
+     * can either be an absolute path or a uuid (+ relative path).
+     * @see RepositoryService#getNodeInfo(SessionInfo, NodeId)
+     */
+    public NodeId getId();
+
+    /**
+     * @return QName representing the name of the primary nodetype
+     */
+    public QName getNodetype();
+
+    /**
+     * @return array of QName representing the names of mixin nodetypes.
+     */
+    public QName[] getMixins();
+
+    /**
+     * @return ids of the properties that are referencing the node based on this
+     * info object or an empty array if the node is not referenceable or no references
+     * exist.
+     * @see PropertyInfo#getId()
+     */
+    public PropertyId[] getReferences();
+
+    /**
+     * @return ids of children nodes
+     * @see NodeInfo#getId()
+     */
+    public IdIterator getNodeIds();
+
+    /**
+     * @return ids of children properties
+     * @see PropertyInfo#getId()
+     */
+    public IdIterator getPropertyIds();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,29 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+/**
+ * <code>PropertyId</code>...
+ */
+public interface PropertyId extends ItemId {
+
+    public NodeId getParentId();
+
+    public QName getQName();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyId.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyInfo.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyInfo.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyInfo.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,55 @@
+/*
+ * 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.jackrabbit.spi;
+
+import java.io.InputStream;
+
+/**
+ * <code>PropertyInfo</code>...
+ */
+public interface PropertyInfo extends ItemInfo {
+
+    /**
+     * @return identifier for the item that is based on this info object. the id
+     * can either be an absolute path or a uuid (+ relative path).
+     * @see RepositoryService#getNodeInfo(SessionInfo, NodeId)
+     */
+    public PropertyId getId();
+
+    /**
+     * @return
+     * @see javax.jcr.PropertyType
+     */
+    public int getType();
+
+    /**
+     * @return true if the <code>Property</code> based on this info object is
+     * multivalue.
+     * @see javax.jcr.nodetype.PropertyDefinition#isMultiple()
+     */
+    public boolean isMultiValued();
+
+    /**
+     * @return String representation of the property value(s)
+     */
+    public String[] getValues();
+
+    /**
+     * @return InputStream representation of the property value(s)
+     */
+    public InputStream[] getValuesAsStream();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/PropertyInfo.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,92 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+import javax.jcr.nodetype.ItemDefinition;
+
+/**
+ * <code>QItemDefinition</code> is the qualified SPI representation of
+ * an {@link ItemDefinition item definition}. It refers to <code>QName</code>s
+ * only and is thus isolated from session-specific namespace mappings.
+ *
+ * @see javax.jcr.nodetype.ItemDefinition
+ */
+public interface QItemDefinition {
+
+    public static final QItemDefinition[] EMPTY_ARRAY = new QItemDefinition[0];
+
+    /**
+     * Gets the name of the child item.
+     *
+     * @return the name of the child item.
+     */
+    QName getQName();
+
+    /**
+     * Gets the name of the declaring node type.
+     *
+     * @return the name of the declaring node type.
+     */
+    QName getDeclaringNodeType();
+
+    /**
+     * Determines whether the item is 'autoCreated'.
+     *
+     * @return the 'autoCreated' flag.
+     */
+    boolean isAutoCreated();
+
+    /**
+     * Gets the 'onParentVersion' attribute of the item.
+     *
+     * @return the 'onParentVersion' attribute.
+     */
+    int getOnParentVersion();
+
+    /**
+     * Determines whether the item is 'protected'.
+     *
+     * @return the 'protected' flag.
+     */
+    boolean isProtected();
+
+    /**
+     * Determines whether the item is 'mandatory'.
+     *
+     * @return the 'mandatory' flag.
+     */
+    boolean isMandatory();
+
+    /**
+     * Determines whether this item definition defines a residual set of
+     * child items.
+     *
+     * @return <code>true</code> if this definition defines a residual set;
+     *         <code>false</code> otherwise.
+     */
+    boolean definesResidual();
+
+    /**
+     * Determines whether this item definition defines a node.
+     *
+     * @return <code>true</code> if this is a node definition;
+     *         <code>false</code> otherwise (i.e. it is a property definition).
+     */
+    boolean definesNode();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QItemDefinition.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,54 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+import javax.jcr.nodetype.NodeDefinition;
+
+/**
+ * <code>QNodeDefinition</code> is the qualified SPI representation of
+ * a {@link NodeDefinition node definition}. It refers to <code>QName</code>s only
+ * and is thus isolated from session-specific namespace mappings.
+ *
+ * @see javax.jcr.nodetype.NodeDefinition
+ */
+public interface QNodeDefinition extends QItemDefinition {
+
+    public static final QNodeDefinition[] EMPTY_ARRAY = new QNodeDefinition[0];
+
+    /**
+     * Returns the name of the default primary type.
+     *
+     * @return the name of the default primary type.
+     */
+    QName getDefaultPrimaryType();
+
+    /**
+     * Returns the array of names of the required primary types.
+     *
+     * @return the array of names of the required primary types.
+     */
+    QName[] getRequiredPrimaryTypes();
+
+    /**
+     * Reports whether this node can have same-name siblings.
+     *
+     * @return the 'allowsSameNameSiblings' flag.
+     */
+    boolean allowsSameNameSiblings();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeDefinition.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,98 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+import java.util.Collection;
+
+/**
+ * <code>QNodeTypeDefinition</code>...
+ */
+public interface QNodeTypeDefinition {
+
+    /**
+     * Returns the name of the node type being defined or
+     * <code>null</code> if not set.
+     *
+     * @return the name of the node type or <code>null</code> if not set.
+     */
+    QName getQName();
+
+    /**
+     * Returns an array containing the names of the supertypes or
+     * <code>null</code> if not set.
+     *
+     * @return an array listing the names of the supertypes or
+     *         <code>null</code> if not set.
+     */
+    QName[] getSupertypes();
+
+    /**
+     * Returns the value of the mixin flag.
+     *
+     * @return true if this is a mixin node type; false otherwise.
+     */
+    boolean isMixin();
+
+    /**
+     * Returns the value of the orderableChildNodes flag.
+     *
+     * @return true if nodes of this node type can have orderable child nodes; false otherwise.
+     */
+    boolean hasOrderableChildNodes();
+
+    /**
+     * Returns the name of the primary item (one of the child items of the
+     * node's of this node type) or <code>null</code> if not set.
+     *
+     * @return the name of the primary item or <code>null</code> if not set.
+     */
+    QName getPrimaryItemName();
+
+    /**
+     * Returns an array containing the property definitions or
+     * <code>null</code> if not set.
+     *
+     * @return an array containing the property definitions or
+     *         <code>null</code> if not set.
+     */
+    QPropertyDefinition[] getPropertyDefs();
+
+    /**
+     * Returns an array containing the child node definitions or
+     * <code>null</code> if not set.
+     *
+     * @return an array containing the child node definitions or
+     *         <code>null</code> if not set.
+     */
+    QNodeDefinition[] getChildNodeDefs();
+
+    /**
+     * Returns a collection of node type <code>QName</code>s that are being
+     * referenced by <i>this</i> node type definition (e.g. as supertypes, as
+     * required/default primary types in child node definitions, as REFERENCE
+     * value constraints in property definitions).
+     * <p/>
+     * Note that self-references (e.g. a child node definition that specifies
+     * the declaring node type as the default primary type) are not considered
+     * dependencies.
+     *
+     * @return a collection of node type <code>QName</code>s
+     */
+    Collection getDependencies();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,33 @@
+/*
+ * 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.jackrabbit.spi;
+
+import javax.jcr.RangeIterator;
+
+/**
+ * <code>QNodeTypeDefinitionIterator</code>...
+ */
+public interface QNodeTypeDefinitionIterator extends RangeIterator {
+
+    /**
+     * Returns the next <code>QNodeTypeDefinition</code> in the iteration.
+     *
+     * @return the next <code>QNodeTypeDefinition</code> in the iteration.
+     * @throws java.util.NoSuchElementException if no more ids are left.
+     */
+    public QNodeTypeDefinition nextDefinition();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinitionIterator.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java Wed Jul 12 06:33:19 2006
@@ -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.jackrabbit.spi;
+
+import javax.jcr.nodetype.PropertyDefinition;
+import java.io.InputStream;
+
+/**
+ * <code>QPropertyDefinition</code> is the qualified SPI representation of
+ * a {@link PropertyDefinition property definition}. It refers to
+ * qualified default values and value constraints only and is thus isolated
+ * from session-specific namespace mappings.
+ *
+ * @see javax.jcr.nodetype.PropertyDefinition
+ */
+public interface QPropertyDefinition extends QItemDefinition {
+
+    public static final QPropertyDefinition[] EMPTY_ARRAY = new QPropertyDefinition[0];
+
+    /**
+     * Returns the required type.
+     *
+     * @return the required type.
+     */
+    int getRequiredType();
+
+    /**
+     * Returns the array of value constraints.
+     *
+     * @return the array of value constraints.
+     */
+    String[] getValueConstraints();
+
+    /**
+     * Returns the array of default values.
+     *
+     * @return the array of default values.
+     */
+    String[] getDefaultValues();
+
+    /**
+     * Returns the array of default values.
+     *
+     * @return the array of default values.
+     */
+    InputStream[] getDefaultValuesAsStream();
+
+    /**
+     * Reports whether this property can have multiple values.
+     *
+     * @return the 'multiple' flag.
+     */
+    boolean isMultiple();
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QPropertyDefinition.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java?rev=421270&view=auto
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java (added)
+++ jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java Wed Jul 12 06:33:19 2006
@@ -0,0 +1,58 @@
+/*
+ * 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.jackrabbit.spi;
+
+import org.apache.jackrabbit.name.QName;
+
+import java.io.InputStream;
+
+/**
+ * QueryInfo...
+ */
+public interface QueryInfo {
+
+    /**
+     * @return an array of String representing the node ids present in the
+     * query result
+     * @see javax.jcr.query.QueryResult#getNodes()
+     */
+    public IdIterator getNodeIds();
+
+    /**
+     * @return an array of QName representing the column names of the query
+     *         result.
+     * @see javax.jcr.query.QueryResult#getColumnNames()
+     */
+    public QName[] getColumnNames();
+
+    /**
+     * @return an array of String representing the values present in a single
+     * row of the query result
+     * @see javax.jcr.query.Row#getValue(String)
+     * @see javax.jcr.query.Row#getValues()
+     */
+    public String[] getValues(NodeId nodeId);
+
+    /**
+     * todo really needed? rather use RepositoryService.getPropertyInfo(id).getValuesAsStream()
+     * @return an array of InputStream representing the values present in a single
+     * row of the query result
+     * @see javax.jcr.query.Row#getValue(String)
+     * @see javax.jcr.query.Row#getValues()
+     */
+    public InputStream[] getValuesAsStream(NodeId nodeId);
+}

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/contrib/spi/spi/src/main/java/org/apache/jackrabbit/spi/QueryInfo.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url