You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by th...@apache.org on 2010/03/12 20:13:40 UTC
svn commit: r922398 [1/2] - in /jackrabbit/sandbox/jackrabbit-j3: ./ src/
src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/jackrabbit/
src/main/java/org/apache/jackrabbit/j3/ src/main/java/org/apache/jackra...
Author: thomasm
Date: Fri Mar 12 19:13:39 2010
New Revision: 922398
URL: http://svn.apache.org/viewvc?rev=922398&view=rev
Log:
Some code for a Jackrabbit 3 prototype
Added:
jackrabbit/sandbox/jackrabbit-j3/pom.xml
jackrabbit/sandbox/jackrabbit-j3/src/
jackrabbit/sandbox/jackrabbit-j3/src/main/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Cache.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Change.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Constants.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ExceptionFactory.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeIteratorImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeState.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/PropertyImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryFactoryImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/SessionImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ValueImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/McException.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/NodeData.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Storage.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/StorageSession.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Val.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/jdbc/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/jdbc/JdbcStorage.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/jdbc/JdbcStorageSession.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/jdbc/JdbcUtils.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/mem/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/mem/MemStorage.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/mem/MemStorageSession.java
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/observation/
jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/observation/EventImpl.java
jackrabbit/sandbox/jackrabbit-j3/src/test/
jackrabbit/sandbox/jackrabbit-j3/src/test/java/
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestAll.java
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBase.java
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBundle.java
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestConcurrentWrite.java
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNextConfiguration.java
jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestSimple.java
Added: jackrabbit/sandbox/jackrabbit-j3/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/pom.xml?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/pom.xml (added)
+++ jackrabbit/sandbox/jackrabbit-j3/pom.xml Fri Mar 12 19:13:39 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>parent</artifactId>
+ <version>5</version>
+ </parent>
+
+ <artifactId>jackrabbit-j3</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <name>Jackrabbit J3</name>
+ <description>
+ Jackrabbit J3
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>1.2.131</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Cache.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Cache.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Cache.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Cache.java Fri Mar 12 19:13:39 2010
@@ -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.j3;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class Cache<K, V> extends LinkedHashMap<K, V> {
+
+ private final int maxSize;
+
+ public Cache(int maxSize) {
+ this.maxSize = maxSize;
+ }
+
+ protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
+ return size() > maxSize;
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Change.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Change.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Change.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Change.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,31 @@
+package org.apache.jackrabbit.j3;
+
+import org.apache.jackrabbit.j3.mc.Val;
+
+public interface Change {
+
+ void apply(SessionImpl session);
+
+}
+
+class ChangeAddNode implements Change {
+ NodeImpl newNode;
+ Val childName;
+
+ public void apply(SessionImpl session) {
+ newNode.getParentNode().doAddNode(childName, newNode);
+ }
+
+}
+
+class ChangeSetProperty implements Change {
+ NodeImpl node;
+ Val propertyName;
+ Val value;
+ PropertyImpl property;
+
+ public void apply(SessionImpl session) {
+ node.doSetProperty(propertyName, value);
+ }
+
+}
\ No newline at end of file
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Constants.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Constants.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Constants.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/Constants.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,26 @@
+/*
+ * 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.j3;
+
+public class Constants {
+ public static final int VERSION_MAJOR = 3;
+ public static final int VERSION_MINOR = 0;
+ public static final int BUILD = 1000;
+
+ public static final String FULL_VERSION = VERSION_MAJOR + "." + VERSION_MINOR + "." + BUILD;
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ExceptionFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ExceptionFactory.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ExceptionFactory.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ExceptionFactory.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,43 @@
+/*
+ * 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.j3;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import javax.jcr.RepositoryException;
+
+public class ExceptionFactory {
+ final static int CLOSED_0 = 1000;
+ static final int CONCURRENT_UPDATE_1 = 1001;
+
+ final static HashMap<Integer, String> MESSAGE_MAP = new HashMap<Integer, String>();
+
+
+ static {
+ MESSAGE_MAP.put(CLOSED_0, "The repository is closed");
+ }
+
+ public static RepositoryException get(int errorCode, String... params) {
+ return new RepositoryException(getMessage(errorCode, params));
+ }
+
+ static String getMessage(int errorCode, String... params) {
+ String message = MESSAGE_MAP.get(errorCode);
+ message = MessageFormat.format(message, (Object[]) params);
+ return message + " [" + errorCode + "-" + Constants.FULL_VERSION + "]";
+ }
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeImpl.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,594 @@
+/*
+ * 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.j3;
+
+import org.apache.jackrabbit.j3.mc.Val;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.Calendar;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Binary;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.InvalidLifecycleTransitionException;
+import javax.jcr.Item;
+import javax.jcr.ItemExistsException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.ItemVisitor;
+import javax.jcr.MergeException;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.Lock;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.nodetype.NodeDefinition;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.version.ActivityViolationException;
+import javax.jcr.version.Version;
+import javax.jcr.version.VersionException;
+import javax.jcr.version.VersionHistory;
+
+public class NodeImpl implements Node {
+
+ private final NodeState state;
+
+ /**
+ * Parent node. For sharable nodes, this is the access path (not necessarily
+ * the main parent).
+ */
+ private NodeImpl parent;
+
+ NodeImpl(NodeImpl parent, NodeState state) {
+ this.state = state;
+ this.parent = parent;
+ }
+
+ public NodeImpl addNode(String relPath, String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException,
+ NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException {
+ ChangeAddNode change = new ChangeAddNode();
+ SessionImpl s = state.getSession();
+ synchronized (s) {
+ // TODO primaryNodeTypeName is ignored
+ change.newNode = s.createNode(this, state.getId());
+ change.childName = Val.get(relPath);
+ s.addChange(change);
+ return change.newNode;
+ }
+ }
+
+ public void doAddNode(Val childName, NodeImpl newNode) {
+ state.addChild(childName, newNode.state.getId());
+ }
+
+ public NodeImpl addNode(String relPath) throws ItemExistsException, PathNotFoundException, VersionException,
+ ConstraintViolationException, LockException, RepositoryException {
+ // TODO primaryNodeTypeName is incorrect
+ return addNode(relPath, "");
+ }
+
+ public PropertyImpl setProperty(String name, String value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ ChangeSetProperty change = new ChangeSetProperty();
+ SessionImpl s = state.getSession();
+ synchronized (s) {
+ change.node = this;
+ change.propertyName = Val.get(name);
+ change.value = Val.get(value);
+ s.addChange(change);
+ PropertyImpl prop = new PropertyImpl(this, change.propertyName);
+ return prop;
+ }
+ }
+
+ public void doSetProperty(Val propertyName, Val value) {
+ state.setPropertyValue(propertyName, value);
+ }
+
+ public Property getProperty(String relPath) throws PathNotFoundException, RepositoryException {
+ Val propertyName = Val.get(relPath);
+ // just verify that the property exists for now
+ state.getPropertyValue(propertyName);
+ PropertyImpl prop = new PropertyImpl(this, propertyName);
+ return prop;
+ }
+
+ Value getPropertyValue(Val name) {
+ return new ValueImpl(state.getPropertyValue(name));
+ }
+
+ public NodeImpl getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException {
+ return parent;
+ }
+
+ public NodeImpl getParentNode() {
+ return parent;
+ }
+
+ public String getPath() throws RepositoryException {
+ SessionImpl s = state.getSession();
+ synchronized (s) {
+ StringBuilder buff= new StringBuilder();
+ addPath(buff, this);
+ if (buff.length() == 0) {
+ buff.append('/');
+ }
+ return buff.toString();
+ }
+ }
+
+ private void addPath(StringBuilder buff, NodeImpl node) {
+ if (parent != null) {
+ parent.addPath(buff, this);
+ buff.append('/');
+ Val name = state.getName(parent.state);
+ buff.append(name.getString());
+ }
+ }
+
+ public String toString() {
+ return "NodeImpl: " + (parent == null ? "" : "parent=" + parent.state.getId()) + " state=" + state;
+ }
+
+ public String getIdentifier() throws RepositoryException {
+ return state.getIdentifier();
+ }
+
+ public Node getNode(String relPath) throws PathNotFoundException, RepositoryException {
+ Val childName = Val.get(relPath);
+ Val childId = state.getNodeData().getChildId(childName);
+ if (childId == null) {
+ throw new PathNotFoundException();
+ }
+ return state.getSession().getNode(this, childId);
+ }
+
+ public String getName() throws RepositoryException {
+ return state.getName(parent.state).getString();
+ }
+
+ public void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException,
+ ConstraintViolationException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+ }
+
+ public boolean canAddMixin(String mixinName) throws NoSuchNodeTypeException, RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void cancelMerge(Version version) throws VersionException, InvalidItemStateException,
+ UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Version checkin() throws VersionException, UnsupportedRepositoryOperationException,
+ InvalidItemStateException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void checkout() throws UnsupportedRepositoryOperationException, LockException, ActivityViolationException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void doneMerge(Version version) throws VersionException, InvalidItemStateException,
+ UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void followLifecycleTransition(String transition) throws UnsupportedRepositoryOperationException,
+ InvalidLifecycleTransitionException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String[] getAllowedLifecycleTransistions() throws UnsupportedRepositoryOperationException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Version getBaseVersion() throws UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getCorrespondingNodePath(String workspaceName) throws ItemNotFoundException,
+ NoSuchWorkspaceException, AccessDeniedException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeDefinition getDefinition() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getIndex() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Lock getLock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeType[] getMixinNodeTypes() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeIterator getNodes() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeIterator getNodes(String namePattern) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeIterator getNodes(String[] nameGlobs) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Item getPrimaryItem() throws ItemNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeType getPrimaryNodeType() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getProperties() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getProperties(String namePattern) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getProperties(String[] nameGlobs) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getReferences() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getReferences(String name) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeIterator getSharedSet() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public VersionHistory getVersionHistory() throws UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getWeakReferences() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyIterator getWeakReferences(String name) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasNode(String relPath) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean hasNodes() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean hasProperties() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean hasProperty(String relPath) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean holdsLock() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isCheckedOut() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isLocked() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isNodeType(String nodeTypeName) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Lock lock(boolean isDeep, boolean isSessionScoped) throws UnsupportedRepositoryOperationException,
+ LockException, AccessDeniedException, InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NodeIterator merge(String srcWorkspace, boolean bestEffort) throws NoSuchWorkspaceException,
+ AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void orderBefore(String srcChildRelPath, String destChildRelPath)
+ throws UnsupportedRepositoryOperationException, VersionException, ConstraintViolationException,
+ ItemNotFoundException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeMixin(String mixinName) throws NoSuchNodeTypeException, VersionException,
+ ConstraintViolationException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeShare() throws VersionException, LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void restore(String versionName, boolean removeExisting) throws VersionException, ItemExistsException,
+ UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void restore(Version version, boolean removeExisting) throws VersionException, ItemExistsException,
+ InvalidItemStateException, UnsupportedRepositoryOperationException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void restore(Version version, String relPath, boolean removeExisting) throws PathNotFoundException,
+ ItemExistsException, VersionException, ConstraintViolationException,
+ UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void restoreByLabel(String versionLabel, boolean removeExisting) throws VersionException,
+ ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPrimaryType(String nodeTypeName) throws NoSuchNodeTypeException, VersionException,
+ ConstraintViolationException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Property setProperty(String name, Value value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, Value[] values) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, String[] values) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, InputStream value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, Binary value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, boolean value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, double value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, BigDecimal value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, long value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, Calendar value) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, Node value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, Value value, int type) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, Value[] values, int type) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, String[] values, int type) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property setProperty(String name, String value, int type) throws ValueFormatException, VersionException,
+ LockException, ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void unlock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException,
+ InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void update(String srcWorkspace) throws NoSuchWorkspaceException, AccessDeniedException, LockException,
+ InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void accept(ItemVisitor visitor) throws RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Item getAncestor(int depth) throws ItemNotFoundException, AccessDeniedException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getDepth() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Session getSession() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isModified() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isNew() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isNode() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isSame(Item otherItem) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void refresh(boolean keepChanges) throws InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void remove() throws VersionException, LockException, ConstraintViolationException, AccessDeniedException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException,
+ InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException,
+ NoSuchNodeTypeException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeIteratorImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeIteratorImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeIteratorImpl.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,59 @@
+/*
+ * 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.j3;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+
+public class NodeIteratorImpl implements NodeIterator {
+
+ public Node nextNode() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getPosition() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long getSize() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void skip(long skipNum) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean hasNext() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Object next() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void remove() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeState.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeState.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/NodeState.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,89 @@
+/*
+ * 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.j3;
+
+import org.apache.jackrabbit.j3.mc.NodeData;
+import org.apache.jackrabbit.j3.mc.Val;
+
+/**
+ * There is one node state for each session and instance of shareable node. That
+ * means all instances of a shareable nodes use the same node state.
+ */
+public class NodeState {
+
+ final SessionImpl session;
+ private NodeData data;
+ private boolean modified;
+
+ NodeState(SessionImpl session, NodeData data, boolean modified) {
+ this.session = session;
+ this.data = data;
+ this.modified = modified;
+ }
+
+ void modify() {
+ if (!modified) {
+ data = data.clone();
+ session.modify(this);
+ modified = true;
+ }
+ }
+
+ void reset(NodeData data) {
+ modified = false;
+ this.data = data;
+ }
+
+ void setPropertyValue(Val name, Val value) {
+ modify();
+ data.setPropertyValue(name, value);
+ }
+
+ Val getPropertyValue(Val name) {
+ return data.getPropertyValue(name);
+ }
+
+ Val getId() {
+ return data.getId();
+ }
+
+ SessionImpl getSession() {
+ return session;
+ }
+
+ void addChild(Val childName, Val id) {
+ modify();
+ data.addChild(childName, id);
+ }
+
+ Val getName(NodeState parent) {
+ return data.getName(parent.data);
+ }
+
+ public String toString() {
+ return (modified ? "(mod) " : "") + data;
+ }
+
+ NodeData getNodeData() {
+ return data;
+ }
+
+ String getIdentifier() {
+ return session.getStorageSession().convertNodeIdToIdentifier(data.getId());
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/PropertyImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/PropertyImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/PropertyImpl.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,286 @@
+/*
+ * 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.j3;
+
+import org.apache.jackrabbit.j3.mc.Val;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.Calendar;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Binary;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.Item;
+import javax.jcr.ItemExistsException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.ItemVisitor;
+import javax.jcr.Node;
+import javax.jcr.Property;
+import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.nodetype.PropertyDefinition;
+import javax.jcr.version.VersionException;
+
+public class PropertyImpl implements Property {
+
+ private final NodeImpl node;
+ private final Val name;
+
+ PropertyImpl(NodeImpl node, Val name) {
+ this.node = node;
+ this.name = name;
+ }
+
+ public Value getValue() throws ValueFormatException, RepositoryException {
+ return node.getPropertyValue(name);
+ }
+
+ public Binary getBinary() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean getBoolean() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Calendar getDate() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public BigDecimal getDecimal() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public PropertyDefinition getDefinition() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public double getDouble() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long getLength() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long[] getLengths() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getLong() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Node getNode() throws ItemNotFoundException, ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property getProperty() throws ItemNotFoundException, ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public InputStream getStream() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getString() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getType() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Value[] getValues() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isMultiple() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setValue(Value value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(Value[] values) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(String value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(String[] values) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(InputStream value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(Binary value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(long value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(double value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(BigDecimal value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(Calendar value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(boolean value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(Node value) throws ValueFormatException, VersionException, LockException,
+ ConstraintViolationException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void accept(ItemVisitor visitor) throws RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Item getAncestor(int depth) throws ItemNotFoundException, AccessDeniedException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getDepth() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getName() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Node getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getPath() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Session getSession() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isModified() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isNew() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isNode() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isSame(Item otherItem) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void refresh(boolean keepChanges) throws InvalidItemStateException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void remove() throws VersionException, LockException, ConstraintViolationException, AccessDeniedException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException,
+ InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException,
+ NoSuchNodeTypeException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String toString() {
+ return "PropertyImpl:" + name + " node:" + node;
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryFactoryImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryFactoryImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryFactoryImpl.java Fri Mar 12 19:13:39 2010
@@ -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.j3;
+
+import java.util.Map;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.RepositoryFactory;
+
+public class RepositoryFactoryImpl implements RepositoryFactory {
+
+ @SuppressWarnings("unchecked")
+ public Repository getRepository(Map parameters) throws RepositoryException {
+ return new RepositoryImpl(parameters);
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/RepositoryImpl.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,141 @@
+/*
+ * 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.j3;
+
+import org.apache.jackrabbit.j3.mc.McException;
+import org.apache.jackrabbit.j3.mc.Val;
+import org.apache.jackrabbit.j3.mc.NodeData;
+import org.apache.jackrabbit.j3.mc.Storage;
+import org.apache.jackrabbit.j3.mc.StorageSession;
+import org.apache.jackrabbit.j3.mc.jdbc.JdbcStorage;
+import org.apache.jackrabbit.j3.mc.mem.MemStorage;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import javax.jcr.Credentials;
+import javax.jcr.LoginException;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+import javax.jcr.Value;
+
+public class RepositoryImpl implements Repository {
+
+ private final static int CACHE_SIZE = 1000;
+ private final static SimpleCredentials ANONYMOUS_CREDENTIALS = new SimpleCredentials("", new char[0]);
+
+ private final Storage storage;
+ private final Collection<SessionImpl> sessions = new HashSet<SessionImpl>();
+ private final Cache<Val, NodeData> readOnlyCache = new Cache<Val, NodeData>(CACHE_SIZE);
+ private boolean closed;
+
+ public RepositoryImpl(Map<String, String> parameters) {
+ String url = parameters.get("url");
+ if (url.startsWith("jdbc:")) {
+ storage = new JdbcStorage(url);
+ } else if (url.startsWith("mem:")) {
+ storage = new MemStorage();
+ } else {
+ throw new McException("Unsupported url: " + url);
+ }
+ }
+
+ public synchronized Session login(Credentials credentials) throws LoginException, RepositoryException {
+ checkClosed();
+ if (credentials == null) {
+ credentials = ANONYMOUS_CREDENTIALS;
+ }
+ if (credentials instanceof SimpleCredentials) {
+ SimpleCredentials sc = (SimpleCredentials) credentials;
+ StorageSession storageSession = storage.openSession(sc.getUserID(), new String(sc.getPassword()));
+ SessionImpl session = new SessionImpl(this, storageSession);
+ sessions.add(session);
+ return session;
+ }
+ throw new LoginException();
+ }
+
+ public synchronized void close(SessionImpl session) {
+ sessions.remove(session);
+ if (sessions.size() == 0) {
+ storage.close();
+ closed = true;
+ }
+ }
+
+ public NodeData getCachedNodeData(Val nodeId) {
+ return readOnlyCache.get(nodeId);
+ }
+
+ public void cacheNodeData(NodeData data) {
+ readOnlyCache.put(data.getId(), data);
+ }
+
+ public Session login() throws LoginException, RepositoryException {
+ return login(null, null);
+ }
+
+ public String getDescriptor(String key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ private void checkClosed() throws RepositoryException {
+ if (closed) {
+ throw ExceptionFactory.get(ExceptionFactory.CLOSED_0);
+ }
+ }
+
+ public String[] getDescriptorKeys() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Value getDescriptorValue(String key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Value[] getDescriptorValues(String key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isSingleValueDescriptor(String key) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isStandardDescriptor(String key) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Session login(String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Session login(Credentials credentials, String workspaceName) throws LoginException,
+ NoSuchWorkspaceException, RepositoryException {
+ return login(credentials);
+ // TODO
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/SessionImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/SessionImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/SessionImpl.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,375 @@
+/*
+ * 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.j3;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.security.AccessControlException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.WeakHashMap;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Credentials;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.InvalidSerializedDataException;
+import javax.jcr.Item;
+import javax.jcr.ItemExistsException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.LoginException;
+import javax.jcr.NamespaceException;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.Property;
+import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ValueFactory;
+import javax.jcr.Workspace;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.retention.RetentionManager;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.version.VersionException;
+import org.apache.jackrabbit.j3.mc.McException;
+import org.apache.jackrabbit.j3.mc.NodeData;
+import org.apache.jackrabbit.j3.mc.StorageSession;
+import org.apache.jackrabbit.j3.mc.Val;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+public class SessionImpl implements Session {
+
+ private final static int MAX_RETRY = 3;
+ private final RepositoryImpl rep;
+ private final StorageSession storageSession;
+ private final WeakHashMap<Val, NodeState> weakMap = new WeakHashMap<Val, NodeState>();
+ private final HashMap<Val, NodeState> modified = new HashMap<Val, NodeState>();
+ private final LinkedList<Change> changes = new LinkedList<Change>();
+
+ public SessionImpl(RepositoryImpl rep, StorageSession storageSession) {
+ this.rep = rep;
+ this.storageSession = storageSession;
+ }
+
+ public synchronized void logout() {
+ storageSession.close();
+ rep.close(this);
+ }
+
+ NodeImpl getNode(NodeImpl parent, Val nodeId) throws RepositoryException {
+ NodeState state = modified.get(nodeId);
+ if (state == null) {
+ state = weakMap.get(nodeId);
+ }
+ if (state == null) {
+ NodeData data = getPersistedNodeData(nodeId);
+ if (data == null) {
+ throw new RepositoryException("Node not found: " + nodeId);
+ }
+ state = new NodeState(this, data, false);
+ }
+ if (parent == null) {
+ Val parentNodeId = state.getNodeData().getPrimaryParentId();
+ if (parentNodeId != null) {
+ parent = getNode(null, parentNodeId);
+ }
+ }
+ return new NodeImpl(parent, state);
+ }
+
+ NodeData getPersistedNodeData(Val nodeId) {
+ NodeData data = rep.getCachedNodeData(nodeId);
+ if (data == null) {
+ data = storageSession.getNode(nodeId);
+ if (data == null) {
+ return null;
+ }
+ rep.cacheNodeData(data);
+ }
+ return data;
+ }
+
+ public synchronized Node getRootNode() throws RepositoryException {
+ return getNode(null, storageSession.getRootNodeId());
+ }
+
+ synchronized NodeImpl createNode(NodeImpl parent, Val parentId) {
+ Val nodeId = storageSession.newNodeId(parentId);
+ NodeData newData = new NodeData(nodeId, parentId, 0);
+ NodeState state = new NodeState(this, newData, true);
+ modify(state);
+ weakMap.put(nodeId, state);
+ NodeImpl newNode = new NodeImpl(parent, state);
+ return newNode;
+ }
+
+ synchronized void modify(NodeState state) {
+ modified.put(state.getId(), state);
+ }
+
+ public synchronized void save() throws AccessDeniedException, ItemExistsException, ReferentialIntegrityException,
+ ConstraintViolationException, InvalidItemStateException, VersionException, LockException,
+ NoSuchNodeTypeException, RepositoryException {
+ for(int i=0; i<MAX_RETRY; i++) {
+ try {
+ trySave();
+ return;
+ } catch (McException e) {
+ // concurrent update
+ refresh(true);
+ }
+ }
+ throw ExceptionFactory.get(ExceptionFactory.CONCURRENT_UPDATE_1);
+ }
+
+ private void trySave() {
+ NodeData[] changed = new NodeData[modified.size()];
+ Iterator<NodeState> it = modified.values().iterator();
+ for (int i=0; i<modified.size(); i++) {
+ NodeState s = it.next();
+ changed[i] = s.getNodeData();
+ }
+ storageSession.save(changed);
+ for (NodeData n : changed) {
+ rep.cacheNodeData(n);
+ }
+ }
+
+ public synchronized Node getNodeByIdentifier(String id) throws ItemNotFoundException, RepositoryException {
+ Val nodeId = storageSession.convertIdentifierToNodeId(id);
+ return getNode(null, nodeId);
+ }
+
+ public StorageSession getStorageSession() {
+ return storageSession;
+ }
+
+ void addChange(Change change) {
+ change.apply(this);
+ changes.add(change);
+ }
+
+ public synchronized void refresh(boolean keepChanges) throws RepositoryException {
+ Iterator<NodeState> it = modified.values().iterator();
+ for (int i=0; i<modified.size(); i++) {
+ NodeState s = it.next();
+ NodeData data = getPersistedNodeData(s.getId());
+ s.reset(data);
+ }
+ if (keepChanges) {
+ for (Change c : changes) {
+ c.apply(this);
+ }
+ }
+ }
+
+ public void addLockToken(String lt) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void checkPermission(String absPath, String actions) throws AccessControlException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void exportDocumentView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse)
+ throws PathNotFoundException, SAXException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse)
+ throws IOException, PathNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void exportSystemView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse)
+ throws PathNotFoundException, SAXException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void exportSystemView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse)
+ throws IOException, PathNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public AccessControlManager getAccessControlManager() throws UnsupportedRepositoryOperationException,
+ RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getAttribute(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String[] getAttributeNames() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException,
+ ConstraintViolationException, VersionException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Item getItem(String absPath) throws PathNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String[] getLockTokens() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getNamespacePrefix(String uri) throws NamespaceException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String[] getNamespacePrefixes() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getNamespaceURI(String prefix) throws NamespaceException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Node getNode(String absPath) throws PathNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Node getNodeByUUID(String uuid) throws ItemNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Property getProperty(String absPath) throws PathNotFoundException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Repository getRepository() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RetentionManager getRetentionManager() throws UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getUserID() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ValueFactory getValueFactory() throws UnsupportedRepositoryOperationException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Workspace getWorkspace() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasCapability(String methodName, Object target, Object[] arguments) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean hasPendingChanges() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean hasPermission(String absPath, String actions) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Session impersonate(Credentials credentials) throws LoginException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) throws IOException,
+ PathNotFoundException, ItemExistsException, ConstraintViolationException, VersionException,
+ InvalidSerializedDataException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean isLive() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean itemExists(String absPath) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void move(String srcAbsPath, String destAbsPath) throws ItemExistsException, PathNotFoundException,
+ VersionException, ConstraintViolationException, LockException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean nodeExists(String absPath) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean propertyExists(String absPath) throws RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeItem(String absPath) throws VersionException, LockException, ConstraintViolationException,
+ AccessDeniedException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeLockToken(String lt) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setNamespacePrefix(String prefix, String uri) throws NamespaceException, RepositoryException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ValueImpl.java?rev=922398&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ValueImpl.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/ValueImpl.java Fri Mar 12 19:13:39 2010
@@ -0,0 +1,84 @@
+/*
+ * 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.j3;
+
+import org.apache.jackrabbit.j3.mc.Val;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.Calendar;
+import javax.jcr.Binary;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
+
+public class ValueImpl implements Value {
+
+ private final Val value;
+
+ ValueImpl(Val value) {
+ this.value = value;
+ }
+
+ public String getString() throws ValueFormatException, IllegalStateException, RepositoryException {
+ return value.getString();
+ }
+
+ public Binary getBinary() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean getBoolean() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Calendar getDate() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public BigDecimal getDecimal() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public double getDouble() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long getLong() throws ValueFormatException, RepositoryException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public InputStream getStream() throws RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getType() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String toString() {
+ return "ValueImpl: " + value.toString();
+ }
+
+}