jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1159321 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src: main/java/org/apache/jackrabbit/spi2microkernel/ main/java/org/apache/jackrabbit/spi2microkernel/util/ test/java/org/apache/jackrabbit/spi2microkernel/ test/jav...
Date Thu, 18 Aug 2011 17:29:04 GMT
Author: mduerig
Date: Thu Aug 18 17:29:03 2011
New Revision: 1159321

URL: http://svn.apache.org/viewvc?rev=1159321&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
- missing override

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QBinaryValue.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Spi2MicrokernelRepositoryServiceFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonHandlerBase.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/NodeTypes.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Predicates.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/tck/RepositoryStubImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QBinaryValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QBinaryValue.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QBinaryValue.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QBinaryValue.java
Thu Aug 18 17:29:03 2011
@@ -49,14 +49,17 @@ public class QBinaryValue implements QVa
         this.microKernel = microKernel;
     }
 
+    @Override
     public int getType() {
         return PropertyType.BINARY;   
     }
 
+    @Override
     public long getLength() throws RepositoryException {
         return microKernel.getLength(blobId);
     }
 
+    @Override
     public InputStream getStream() throws RepositoryException {
         return new InputStream(){
             int pos;
@@ -92,6 +95,7 @@ public class QBinaryValue implements QVa
         };
     }
 
+    @Override
     public Binary getBinary() throws RepositoryException {
         InputStream is = getStream();
         try {
@@ -105,6 +109,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public String getString() throws RepositoryException {
         InputStream stream = getStream();
         try {
@@ -118,6 +123,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public Calendar getCalendar() throws RepositoryException {
         Calendar cal = ISO8601.parse(getString());
         if (cal == null) {
@@ -128,6 +134,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public BigDecimal getDecimal() throws RepositoryException {
         try {
             return new BigDecimal(getString());
@@ -137,6 +144,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public double getDouble() throws RepositoryException {
         try {
             return Double.parseDouble(getString());
@@ -146,6 +154,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public long getLong() throws RepositoryException {
         try {
             return Long.parseLong(getString());
@@ -155,10 +164,12 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public boolean getBoolean() throws RepositoryException {
         return Boolean.valueOf(getString());
     }
 
+    @Override
     public Name getName() throws RepositoryException {
         try {
             return Paths.stringToName(getString());
@@ -168,6 +179,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public Path getPath() throws RepositoryException {
         try {
             return Paths.stringToPath(getString());
@@ -177,6 +189,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public URI getURI() throws RepositoryException {
         try {
             return URI.create(getString());
@@ -186,6 +199,7 @@ public class QBinaryValue implements QVa
         }
     }
 
+    @Override
     public void discard() {}
 
     public String toString() {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryFactoryImpl.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryFactoryImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryFactoryImpl.java
Thu Aug 18 17:29:03 2011
@@ -28,6 +28,7 @@ import java.util.Map;
 
 public class RepositoryFactoryImpl implements RepositoryFactory {
 
+    @Override
     @SuppressWarnings("unchecked")
     public Repository getRepository(Map parameters) {
         if (parameters == null || parameters.isEmpty()) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Thu Aug 18 17:29:03 2011
@@ -209,6 +209,7 @@ public class RepositoryServiceImpl exten
             : defaultName;
     }
 
+    @Override
     public ItemInfoCache getItemInfoCache(SessionInfo sessionInfo) throws RepositoryException
{
         return new ItemInfoCacheImpl();
     }
@@ -250,6 +251,7 @@ public class RepositoryServiceImpl exten
         sessions.remove(sessionInfo);
     }
 
+    @Override
     public String[] getWorkspaceNames(SessionInfo sessionInfo) throws RepositoryException
{
         String rev = microKernel.getHeadRevision();
 
@@ -311,12 +313,14 @@ public class RepositoryServiceImpl exten
 
     //------------------------------------------< Access Control >---
 
+    @Override
     public boolean isGranted(SessionInfo sessionInfo, ItemId itemId, String[] actions) throws
RepositoryException {
         return true;
     }
 
     //------------------------------------------< Reading Items >---
 
+    @Override
     public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId
itemId) throws RepositoryException {
         try {
             Path itemPath = getPath(itemId);
@@ -329,14 +333,14 @@ public class RepositoryServiceImpl exten
             }
 
             String json = microKernel.getNodes(mkPath, rev);
-            Iterator<? extends ItemInfo> infos = buildItemInfos(nodePath, itemPath,
json, false, readFromDataStore);
-            return infos;
+            return buildItemInfos(nodePath, itemPath, json, false, readFromDataStore);
         }
         catch (MicroKernelException e) {
             throw new RepositoryException(e.getMessage(), e);
         }
     }
 
+    @Override
     public Iterator<ChildInfo> getChildInfos(SessionInfo sessionInfo, NodeId parentId)
throws RepositoryException {
         try {
             Path path = getPath(parentId);
@@ -357,6 +361,7 @@ public class RepositoryServiceImpl exten
         }
     }
 
+    @Override
     public Iterator<PropertyId> getReferences(SessionInfo sessionInfo, NodeId nodeId,
Name propertyName, boolean weakReferences)
             throws RepositoryException {
 
@@ -584,6 +589,7 @@ public class RepositoryServiceImpl exten
     }
 
     private final Function1<QValue, String> saveToDataStore = new Function1<QValue,
String>() {
+        @Override
         public String apply(QValue value) throws Exception {
             if (value.getLength() < BINARY_VALUE_INLINE_THRESHOLD) {
                 return null;
@@ -600,6 +606,7 @@ public class RepositoryServiceImpl exten
     };
 
     private final Function1<String, QValue> readFromDataStore = new Function1<String,
QValue>(){
+        @Override
         public QValue apply(String blobId) throws Exception {
             return new QBinaryValue(blobId, microKernel);
         }
@@ -613,6 +620,7 @@ public class RepositoryServiceImpl exten
             this.sessionInfo = sessionInfo;
         }
 
+        @Override
         public void addNode(NodeId parentId, Name nodeName, Name nodetypeName, String uuid)
throws RepositoryException {
             try {
                 StringBuilder sb = new StringBuilder();
@@ -633,22 +641,27 @@ public class RepositoryServiceImpl exten
             }
         }
 
+        @Override
         public void addProperty(NodeId parentId, Name propertyName, QValue value) throws
RepositoryException {
             setProperty(parentId, propertyName, Values.valueToString(value, saveToDataStore));
         }
 
+        @Override
         public void addProperty(NodeId parentId, Name propertyName, QValue[] values) throws
RepositoryException {
             setProperty(parentId, propertyName, Values.valuesToString(values, saveToDataStore));
         }
 
+        @Override
         public void setValue(PropertyId propertyId, QValue value) throws RepositoryException
{
             setProperty(propertyId.getParentId(), propertyId.getName(), Values.valueToString(value,
saveToDataStore));
         }
 
+        @Override
         public void setValue(PropertyId propertyId, QValue[] values) throws RepositoryException
{
             setProperty(propertyId.getParentId(), propertyId.getName(), Values.valuesToString(values,
saveToDataStore));
         }
 
+        @Override
         public void remove(ItemId itemId) throws RepositoryException {
             if (itemId.denotesNode()) {
                 NodeId nodeId = (NodeId) itemId;
@@ -665,6 +678,7 @@ public class RepositoryServiceImpl exten
             }
         }
 
+        @Override
         public void reorderNodes(NodeId parentId, NodeId srcNodeId, NodeId beforeNodeId)
throws RepositoryException {
             log.error("Not implemented: reorderNodes");
 
@@ -672,6 +686,7 @@ public class RepositoryServiceImpl exten
             //throw new UnsupportedRepositoryOperationException("reorderNodes");
         }
 
+        @Override
         public void setMixins(NodeId nodeId, Name[] mixinNodeTypeNames) throws RepositoryException
{
             if (mixinNodeTypeNames.length == 0) {
                 setProperty(nodeId, JCR_MIXINTYPES, "null");
@@ -689,16 +704,19 @@ public class RepositoryServiceImpl exten
             }
         }
 
+        @Override
         public void setPrimaryType(NodeId nodeId, Name primaryNodeTypeName) throws RepositoryException
{
             setProperty(nodeId, JCR_PRIMARYTYPE, Values.nameToString(primaryNodeTypeName));
         }
 
+        @Override
         public void move(NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws
RepositoryException {
             jsop.append('>').append(target(srcNodeId)).append(" : ").append(target(destParentNodeId,
destName)).append('\n');
         }
 
         public void commit() throws RepositoryException {
             sessionState(sessionInfo).commitWithLock(new Callable<String>() {
+                @Override
                 public String call() throws RepositoryException {
                     String rev = microKernel.getHeadRevision();
                     return microKernel.commit("/", jsop.toString(), rev, ((SessionInfoImpl)
sessionInfo).getUserData());

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Spi2MicrokernelRepositoryServiceFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Spi2MicrokernelRepositoryServiceFactory.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Spi2MicrokernelRepositoryServiceFactory.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Spi2MicrokernelRepositoryServiceFactory.java
Thu Aug 18 17:29:03 2011
@@ -32,6 +32,7 @@ public class Spi2MicrokernelRepositorySe
     public static final String PARAM_DEFAULT_WORKSPACE = PARAM_BASE_NAME + ".default-workspace";
     public static final String PARAM_SYSTEM_WORKSPACE = PARAM_BASE_NAME + ".system-workspace";
 
+    @Override
     public RepositoryService createRepositoryService(Map<?, ?> parameters) throws RepositoryException
{
         Object u = parameters.get(PARAM_URL);
         String url = u == null ? null : u.toString();

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Thu Aug 18 17:29:03 2011
@@ -183,6 +183,7 @@ public class SubscriptionImpl implements
             }
 
             waitForCommit = new FutureTask<String>(new Callable<String>(){
+                @Override
                 public String call() throws Exception {
                     long millis = timeout;
                     long start = System.currentTimeMillis();

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
Thu Aug 18 17:29:03 2011
@@ -31,7 +31,6 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.ItemInfoBuilder.Listener;
 import org.apache.jackrabbit.spi.commons.ItemInfoBuilder.NodeInfoBuilder;
 import org.apache.jackrabbit.spi.commons.ItemInfoBuilder.PropertyInfoBuilder;
-import org.apache.jackrabbit.spi.commons.iterator.Iterators;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
 
@@ -41,10 +40,10 @@ import javax.jcr.RepositoryException;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 
-import static org.apache.jackrabbit.spi.commons.iterator.Iterators.*;
+import static org.apache.jackrabbit.spi.commons.iterator.Iterators.iteratorChain;
+import static org.apache.jackrabbit.spi.commons.iterator.Iterators.singleton;
 import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_MIXINTYPES;
 import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_PRIMARYTYPE;
 import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_UUID;
@@ -61,6 +60,7 @@ public final class ItemInfos {
         final ItemInfo[] targetInfo = new ItemInfo[1];
 
         InfoListener infoListener = new InfoListener() {
+            @Override
             public void createNodeInfo(NodeInfo nodeInfo) {
                 if (nodeInfo.getChildInfos() != null) {  // null indicates an empty node.
Do not include!
                     if (targetPath.equals(nodeInfo.getPath())) {
@@ -72,6 +72,7 @@ public final class ItemInfos {
                 }
             }
 
+            @Override
             public void createPropertyInfo(PropertyInfo propertyInfo) {
                 if (targetPath.equals(propertyInfo.getPath())) {
                     targetInfo[0] = propertyInfo;
@@ -81,8 +82,10 @@ public final class ItemInfos {
                 }
             }
 
+            @Override
             public void createChildInfos(NodeId id, Iterator<ChildInfo> childInfos)
{}
 
+            @Override
             public boolean done() {
                 return stopOnTarget && targetInfo[0] != null;
             }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonHandlerBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonHandlerBase.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonHandlerBase.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/JsonHandlerBase.java
Thu Aug 18 17:29:03 2011
@@ -26,36 +26,45 @@ import java.io.IOException;
 
 
 public abstract class JsonHandlerBase implements ContentHandler {
+    @Override
     public void startJSON() throws ParseException, IOException {
     }
 
+    @Override
     public void endJSON() throws ParseException, IOException {
     }
 
+    @Override
     public boolean startObject() throws ParseException, IOException {
         return true;
     }
 
+    @Override
     public boolean endObject() throws ParseException, IOException {
         return true;
     }
 
+    @Override
     public boolean startObjectEntry(String key) throws ParseException, IOException {
         return true;
     }
 
+    @Override
     public boolean endObjectEntry() throws ParseException, IOException {
         return true;
     }
 
+    @Override
     public boolean startArray() throws ParseException, IOException {
         return true;
     }
 
+    @Override
     public boolean endArray() throws ParseException, IOException {
         return true;
     }
 
+    @Override
     public boolean primitive(Object value) throws ParseException, IOException {
         return true;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/NodeTypes.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/NodeTypes.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/NodeTypes.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/NodeTypes.java
Thu Aug 18 17:29:03 2011
@@ -19,6 +19,7 @@ public class NodeTypes {
 
         try {
             return isDirectSubType(ntName1, ntName2, nodeTypes) || exists(new Predicate1<Name>()
{
+                @Override
                 public Boolean apply(Name ntName) throws Exception {
                     return isSubType(ntName, ntName2, nodeTypes);
                 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Predicates.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Predicates.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Predicates.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Predicates.java
Thu Aug 18 17:29:03 2011
@@ -36,6 +36,7 @@ public class Predicates {
 
     public static <T> boolean containsElement(final T element, Iterator<T> iterator)
throws Exception {
         return exists(new Predicate1<T>(){
+            @Override
             public Boolean apply(T arg) throws Exception {
                 return element.equals(arg);
             }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
Thu Aug 18 17:29:03 2011
@@ -83,10 +83,12 @@ public final class Values {
 
     private static final Map<Object, ValueFactory> VALUE_FACTORIES = new HashMap<Object,
ValueFactory>() {{
         ValueFactory valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 return create((String) value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, STRING);
             }
@@ -95,10 +97,12 @@ public final class Values {
         put(TYPES[STRING], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 return FACTORY.create((Long) value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, LONG);
             }
@@ -107,10 +111,12 @@ public final class Values {
         put(TYPES[LONG], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 return FACTORY.create((Double) value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, DOUBLE);
             }
@@ -119,10 +125,12 @@ public final class Values {
         put(TYPES[DOUBLE], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 return FACTORY.create((Boolean) value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, BOOLEAN);
             }
@@ -131,10 +139,12 @@ public final class Values {
         put(TYPES[BOOLEAN], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, DECIMAL);
             }
@@ -142,10 +152,12 @@ public final class Values {
         put(TYPES[DECIMAL], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, DATE);
             }
@@ -153,10 +165,12 @@ public final class Values {
         put(TYPES[DATE], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, URI);
             }
@@ -164,10 +178,12 @@ public final class Values {
         put(TYPES[URI], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(Paths.stringToName(value));
             }
@@ -175,10 +191,12 @@ public final class Values {
         put(TYPES[NAME], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(Paths.stringToPath(value));
             }
@@ -186,10 +204,12 @@ public final class Values {
         put(TYPES[PATH], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 try {
                     ByteArrayOutputStream os = new ByteArrayOutputStream();
@@ -204,10 +224,12 @@ public final class Values {
         put(TYPES[BINARY], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, REFERENCE);
             }
@@ -215,10 +237,12 @@ public final class Values {
         put(TYPES[REFERENCE], valueFactory);
 
         valueFactory = new ValueFactory() {
+            @Override
             public QValue create(Object value) throws RepositoryException {
                 throw new RepositoryException("Invalid value " + value);
             }
 
+            @Override
             public QValue create(String value) throws RepositoryException {
                 return FACTORY.create(value, WEAKREFERENCE);
             }
@@ -401,6 +425,7 @@ public final class Values {
         }
 
         return new DefaultValueProvider() {
+            @Override
             public Name[] getDefaultProperties() {
                 return propertyNames.toArray(new Name[propertyNames.size()]);
             }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Thu Aug 18 17:29:03 2011
@@ -1144,6 +1144,7 @@ public class RepositoryTest {
         ObservationManager obsMgr = getSession().getWorkspace().getObservationManager();
         obsMgr.setUserData("my user data");
         obsMgr.addEventListener(new EventListener() {
+                @Override
                 public void onEvent(EventIterator events) {
                     while (events.hasNext()) {
                         Event event = events.nextEvent();
@@ -1232,6 +1233,7 @@ public class RepositoryTest {
         ObservationManager obsMgr = getSession().getWorkspace().getObservationManager();
         obsMgr.setUserData("my user data");
         obsMgr.addEventListener(new EventListener() {
+                @Override
                 public void onEvent(EventIterator events) {
                     while (events.hasNext()) {
                         Event event = events.nextEvent();
@@ -1288,6 +1290,7 @@ public class RepositoryTest {
         ObservationManager obsMgr = getSession().getWorkspace().getObservationManager();
         obsMgr.setUserData("my user data");
         obsMgr.addEventListener(new EventListener() {
+                @Override
                 public void onEvent(EventIterator events) {
                     while (events.hasNext()) {
                         failedEvents.add(events.nextEvent());
@@ -1310,6 +1313,7 @@ public class RepositoryTest {
         final ObservationManager obsMgr = getSession().getWorkspace().getObservationManager();
         obsMgr.setUserData("my user data");
         final EventListener listener = new EventListener() {
+            @Override
             public void onEvent(EventIterator events) {
                 while (events.hasNext()) {
                     failedEvents.add(events.nextEvent());
@@ -1321,6 +1325,7 @@ public class RepositoryTest {
             "/", true, null, null, false);
 
         FutureTask<Object> disposer = new FutureTask<Object>(new Callable<Object>()
{
+            @Override
             public Object call() throws Exception {
                 obsMgr.removeEventListener(listener);
                 return null;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/tck/RepositoryStubImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/tck/RepositoryStubImpl.java?rev=1159321&r1=1159320&r2=1159321&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/tck/RepositoryStubImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/tck/RepositoryStubImpl.java
Thu Aug 18 17:29:03 2011
@@ -45,12 +45,14 @@ public class RepositoryStubImpl extends 
     private Repository repository;
 
     private static final Principal KNOWN_PRINCIPAL = new Principal() {
+        @Override
         public String getName() {
             return "an_known_user";
         }
     };
 
     private static final Principal UNKNOWN_PRINCIPAL = new Principal() {
+        @Override
         public String getName() {
             return "an_unknown_user";
         }



Mime
View raw message