jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r787219 - in /jackrabbit/trunk: jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/ jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/ ...
Date Mon, 22 Jun 2009 12:27:30 GMT
Author: mreutegg
Date: Mon Jun 22 12:27:30 2009
New Revision: 787219

URL: http://svn.apache.org/viewvc?rev=787219&view=rev
Log:
JCR-2087: Upgrade to Java 5 as the base platform

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
Mon Jun 22 12:27:30 2009
@@ -32,9 +32,9 @@
 import org.apache.jackrabbit.spi.QueryInfo;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.ItemInfo;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping;
 import org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefReader;
-import org.apache.jackrabbit.spi.commons.nodetype.compact.QNodeTypeDefinitionsBuilderImpl;
 import org.apache.jackrabbit.spi.commons.nodetype.compact.ParseException;
 
 import javax.jcr.RepositoryException;
@@ -80,13 +80,13 @@
  */
 public abstract class AbstractReadableRepositoryService extends AbstractRepositoryService
{
 
-    protected static final Set WRITE_ACTIONS = new HashSet(Arrays.asList(
-            new String[]{"add_node", "set_property", "remove"}));
+    protected static final Set<String> WRITE_ACTIONS = new HashSet<String>(
+            Arrays.asList("add_node", "set_property", "remove"));
 
     /**
      * The repository descriptors.
      */
-    protected final Map descriptors;
+    protected final Map<String, String> descriptors;
 
     /**
      * The fixed set of namespaces known to the repository service.
@@ -96,7 +96,7 @@
     /**
      * The fixed set of node type definitions known to the repository service.
      */
-    protected final Map nodeTypeDefs = new HashMap();
+    protected final Map<Name, QNodeTypeDefinition> nodeTypeDefs = new HashMap<Name,
QNodeTypeDefinition>();
 
     /**
      * The node definition of the root node.
@@ -106,7 +106,7 @@
     /**
      * The list of workspaces that this repository service exposes.
      */
-    protected final List wspNames;
+    protected final List<String> wspNames;
 
     /**
      * Creates a new <code>AbstractReadableRepositoryService</code>.
@@ -120,22 +120,20 @@
      * @throws RepositoryException if the namespace mappings are invalid.
      * @throws ParseException      if an error occurs while parsing the CND.
      */
-    public AbstractReadableRepositoryService(Map descriptors,
-                                             Map namespaces,
+    public AbstractReadableRepositoryService(Map<String, String> descriptors,
+                                             Map<String, String> namespaces,
                                              Reader cnd,
-                                             List wspNames)
+                                             List<String> wspNames)
             throws RepositoryException, ParseException {
-        this.descriptors = Collections.unmodifiableMap(new HashMap(descriptors));
-        for (Iterator it = namespaces.entrySet().iterator(); it.hasNext(); ) {
-            Map.Entry entry = (Map.Entry) it.next();
-            this.namespaces.setMapping((String) entry.getKey(),
-                    (String) entry.getValue());
+        this.descriptors = Collections.unmodifiableMap(new HashMap<String, String>(descriptors));
+        for (Map.Entry<String, String> entry : namespaces.entrySet()) {
+            this.namespaces.setMapping(entry.getKey(), entry.getValue());
         }
         CompactNodeTypeDefReader reader = new CompactNodeTypeDefReader(cnd, "", this.namespaces);
         for (QNodeTypeDefinition def : reader.getNodeTypeDefinitions()) {
             nodeTypeDefs.put(def.getName(), def);
         }
-        this.wspNames = Collections.unmodifiableList(new ArrayList(wspNames));
+        this.wspNames = Collections.unmodifiableList(new ArrayList<String>(wspNames));
     }
 
     //---------------------------< subclass responsibility >--------------------
@@ -264,7 +262,7 @@
      * This default implementation returns an iterator over the item infos
      * returned by the call to {@link #getNodeInfo(SessionInfo, NodeId)}.
      */
-    public Iterator getItemInfos(SessionInfo sessionInfo, NodeId nodeId) throws
+    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, NodeId
nodeId) throws
             ItemNotFoundException, RepositoryException {
         return Collections.singleton(getNodeInfo(sessionInfo, nodeId)).iterator();
     }
@@ -275,7 +273,7 @@
      * This default implementation returns the descriptors that were passed
      * to the constructor of this repository service.
      */
-    public Map getRepositoryDescriptors() throws RepositoryException {
+    public Map<String, String> getRepositoryDescriptors() throws RepositoryException
{
         return descriptors;
     }
 
@@ -289,7 +287,7 @@
     public String[] getWorkspaceNames(SessionInfo sessionInfo) throws
             RepositoryException {
         checkSessionInfo(sessionInfo);
-        return (String[]) wspNames.toArray(new String[wspNames.size()]);
+        return wspNames.toArray(new String[wspNames.size()]);
     }
 
     //-------------------------< access control >-------------------------------
@@ -305,8 +303,8 @@
                              String[] actions) throws RepositoryException {
         checkSessionInfo(sessionInfo);
         // deny all but read
-        for (int i = 0; i < actions.length; i++) {
-            if (WRITE_ACTIONS.contains(actions[i])) {
+        for (String action : actions) {
+            if (WRITE_ACTIONS.contains(action)) {
                 return false;
             }
         }
@@ -319,7 +317,7 @@
      * This default implementation first calls {@link #checkSessionInfo(SessionInfo)}
      * with the <code>sessionInfo</code>,
      */
-    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo) throws
+    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo)
throws
             RepositoryException {
         checkSessionInfo(sessionInfo);
         return nodeTypeDefs.values().iterator();
@@ -332,15 +330,14 @@
      * is not a valid node type definition then a {@link RepositoryException}
      * is thrown.
      */
-    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames)
+    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo,
Name[] nodetypeNames)
             throws RepositoryException {
         checkSessionInfo(sessionInfo);
-        List ntDefs = new ArrayList();
-        for (int i = 0; i < nodetypeNames.length; i++) {
-            Object def = nodeTypeDefs.get(nodetypeNames[i]);
+        List<QNodeTypeDefinition> ntDefs = new ArrayList<QNodeTypeDefinition>();
+        for (Name nodetypeName : nodetypeNames) {
+            QNodeTypeDefinition def = nodeTypeDefs.get(nodetypeName);
             if (def == null) {
-                throw new RepositoryException("unknown node type: "
-                        + nodetypeNames[i]);
+                throw new RepositoryException("unknown node type: " + nodetypeName);
             }
             ntDefs.add(def);
         }
@@ -399,7 +396,7 @@
      * URL mapping that was provided in the constructor of this repository
      * service.
      */
-    public Map getRegisteredNamespaces(SessionInfo sessionInfo) throws
+    public Map<String, String> getRegisteredNamespaces(SessionInfo sessionInfo) throws
             RepositoryException {
         checkSessionInfo(sessionInfo);
         return namespaces.getPrefixToURIMapping();
@@ -596,23 +593,29 @@
     }
 
     /**
-     * @throws UnsupportedRepositoryOperationException always.
+     * @throws UnsupportedRepositoryOperationException
+     *          always.
      */
-    public Iterator merge(SessionInfo sessionInfo,
-                          NodeId nodeId,
-                          String srcWorkspaceName,
-                          boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException,
MergeException, LockException, InvalidItemStateException, RepositoryException {
+    public Iterator<NodeId> merge(SessionInfo sessionInfo,
+                                  NodeId nodeId,
+                                  String srcWorkspaceName,
+                                  boolean bestEffort) throws
+            NoSuchWorkspaceException, AccessDeniedException, MergeException,
+            LockException, InvalidItemStateException, RepositoryException {
         throw new UnsupportedRepositoryOperationException();
     }
 
     /**
-     * @throws UnsupportedRepositoryOperationException always.
+     * @throws UnsupportedRepositoryOperationException
+     *          always.
      */
-    public Iterator merge(SessionInfo sessionInfo,
-                          NodeId nodeId,
-                          String srcWorkspaceName,
-                          boolean bestEffort,
-                          boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException,
MergeException, LockException, InvalidItemStateException, RepositoryException {
+    public Iterator<NodeId> merge(SessionInfo sessionInfo,
+                                  NodeId nodeId,
+                                  String srcWorkspaceName,
+                                  boolean bestEffort,
+                                  boolean isShallow) throws
+            NoSuchWorkspaceException, AccessDeniedException, MergeException,
+            LockException, InvalidItemStateException, RepositoryException {
         throw new UnsupportedRepositoryOperationException();
     }
 
@@ -784,7 +787,7 @@
     }
 
     public QueryInfo executeQuery(SessionInfo sessionInfo, String statement,
-                                  String language, Map namespaces, long limit,
+                                  String language, Map<String, String> namespaces,
long limit,
                                   long offset, Map<String, QValue> values) throws RepositoryException
{
         throw new UnsupportedRepositoryOperationException();
     }

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/AbstractLogger.java
Mon Jun 22 12:27:30 2009
@@ -77,7 +77,7 @@
      */
     protected Object execute(SafeCallable thunk, String methodName, Object[] args)  {
         writer.enter(methodName, args);
-        Object result = null;
+        Object result;
         try {
             result = thunk.call();
             writer.leave(methodName, args, result);

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/RepositoryServiceLogger.java
Mon Jun 22 12:27:30 2009
@@ -50,6 +50,8 @@
 import org.apache.jackrabbit.spi.Subscription;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.ChildInfo;
+import org.apache.jackrabbit.spi.ItemInfo;
 
 /**
  * Log wrapper for a {@link RepositoryService}.
@@ -107,8 +109,8 @@
         }, "getQValueFactory()", new Object[]{});
     }
 
-    public Map getRepositoryDescriptors() throws RepositoryException {
-        return (Map) execute(new Callable() {
+    public Map<String, String> getRepositoryDescriptors() throws RepositoryException
{
+        return (Map<String, String>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.getRepositoryDescriptors();
             }
@@ -165,12 +167,11 @@
     public boolean isGranted(final SessionInfo sessionInfo, final ItemId itemId, final String[]
actions)
             throws RepositoryException {
 
-        return ((Boolean) execute(new Callable() {
+        return (Boolean) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return Boolean.valueOf(service.isGranted(unwrap(sessionInfo), itemId, actions));
             }
-        }, "isGranted(SessionInfo, ItemId, String[])", new Object[] { unwrap(sessionInfo),
itemId, actions }))
-                .booleanValue();
+        }, "isGranted(SessionInfo, ItemId, String[])", new Object[] { unwrap(sessionInfo),
itemId, actions });
     }
 
     public QNodeDefinition getNodeDefinition(final SessionInfo sessionInfo, final NodeId
nodeId)
@@ -203,20 +204,20 @@
         }, "getNodeInfo(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
     }
 
-    public Iterator getItemInfos(final SessionInfo sessionInfo, final NodeId nodeId)
+    public Iterator<? extends ItemInfo> getItemInfos(final SessionInfo sessionInfo,
final NodeId nodeId)
             throws RepositoryException {
 
-        return (Iterator) execute(new Callable() {
+        return (Iterator<? extends ItemInfo>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.getItemInfos(unwrap(sessionInfo), nodeId);
             }
         }, "getItemInfos(SessionInfo, NodeId)", new Object[]{unwrap(sessionInfo), nodeId});
     }
 
-    public Iterator getChildInfos(final SessionInfo sessionInfo, final NodeId parentId)
+    public Iterator<ChildInfo> getChildInfos(final SessionInfo sessionInfo, final NodeId
parentId)
             throws RepositoryException {
 
-        return (Iterator) execute(new Callable() {
+        return (Iterator<ChildInfo>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.getChildInfos(unwrap(sessionInfo), parentId);
             }
@@ -224,7 +225,7 @@
     }
 
     public Iterator<PropertyId> getReferences(final SessionInfo sessionInfo, final
NodeId nodeId, final Name propertyName, final boolean weakReferences) throws RepositoryException
{
-        return (Iterator) execute(new Callable() {
+        return (Iterator<PropertyId>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.getReferences(unwrap(sessionInfo), nodeId, propertyName, weakReferences);
             }
@@ -268,7 +269,7 @@
                 return null;
             }
         }, "importXml(SessionInfo, NodeId, InputStream, int)",
-                new Object[]{unwrap(sessionInfo), parentId, xmlStream, new Integer(uuidBehaviour)});
+                new Object[]{unwrap(sessionInfo), parentId, xmlStream, uuidBehaviour});
     }
 
     public void move(final SessionInfo sessionInfo, final NodeId srcNodeId, final NodeId
destParentNodeId,
@@ -317,8 +318,7 @@
                 return null;
             }
         }, "clone(SessionInfo, String, NodeId, NodeId, Name, boolean)",
-                new Object[] { unwrap(sessionInfo), srcWorkspaceName, srcNodeId, destParentNodeId,
destName,
-                Boolean.valueOf(removeExisting) });
+                new Object[] { unwrap(sessionInfo), srcWorkspaceName, srcNodeId, destParentNodeId,
destName, removeExisting});
     }
 
     public LockInfo getLockInfo(final SessionInfo sessionInfo, final NodeId nodeId)
@@ -339,7 +339,7 @@
                 return service.lock(unwrap(sessionInfo), nodeId, deep, sessionScoped);
             }
         }, "lock(SessionInfo, NodeId, boolean, boolean)",
-                new Object[]{unwrap(sessionInfo), nodeId, Boolean.valueOf(deep), Boolean.valueOf(sessionScoped)});
+                new Object[]{unwrap(sessionInfo), nodeId, deep, sessionScoped});
     }
 
     public LockInfo lock(final SessionInfo sessionInfo, final NodeId nodeId, final boolean
deep,
@@ -352,7 +352,7 @@
             }
         }, "lock(SessionInfo, NodeId, boolean, boolean, long, String)",
                 new Object[] { unwrap(sessionInfo),
-                nodeId, Boolean.valueOf(deep), Boolean.valueOf(sessionScoped), new Long(timeoutHint),
+                nodeId, deep, sessionScoped, timeoutHint,
                 ownerHint });
     }
 
@@ -427,7 +427,7 @@
                 return null;
             }
         }, "restore(SessionInfo, NodeId, NodeId, boolean)",
-                new Object[]{unwrap(sessionInfo), nodeId, versionId, Boolean.valueOf(removeExisting)});
+                new Object[]{unwrap(sessionInfo), nodeId, versionId, removeExisting});
     }
 
     public void restore(final SessionInfo sessionInfo, final NodeId[] nodeIds, final boolean
removeExisting)
@@ -439,29 +439,29 @@
                 return null;
             }
         }, "restore(SessionInfo, NodeId[], boolean)",
-                new Object[]{unwrap(sessionInfo), nodeIds, Boolean.valueOf(removeExisting)});
+                new Object[]{unwrap(sessionInfo), nodeIds, removeExisting});
     }
 
-    public Iterator merge(final SessionInfo sessionInfo, final NodeId nodeId, final String
srcWorkspaceName,
+    public Iterator<NodeId> merge(final SessionInfo sessionInfo, final NodeId nodeId,
final String srcWorkspaceName,
             final boolean bestEffort) throws RepositoryException {
 
-        return (Iterator) execute(new Callable() {
+        return (Iterator<NodeId>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.merge(unwrap(sessionInfo), nodeId, srcWorkspaceName, bestEffort);
             }
         }, "merge(SessionInfo, NodeId, String, boolean)",
-                new Object[]{unwrap(sessionInfo), nodeId, srcWorkspaceName, Boolean.valueOf(bestEffort)});
+                new Object[]{unwrap(sessionInfo), nodeId, srcWorkspaceName, bestEffort});
     }
 
-    public Iterator merge(final SessionInfo sessionInfo, final NodeId nodeId, final String
srcWorkspaceName,
+    public Iterator<NodeId> merge(final SessionInfo sessionInfo, final NodeId nodeId,
final String srcWorkspaceName,
             final boolean bestEffort, final boolean isShallow) throws RepositoryException
{
 
-        return (Iterator) execute(new Callable() {
+        return (Iterator<NodeId>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.merge(unwrap(sessionInfo), nodeId, srcWorkspaceName, bestEffort,
isShallow);
             }
         }, "merge(SessionInfo, NodeId, String, boolean, boolean)",
-                new Object[]{unwrap(sessionInfo), nodeId, srcWorkspaceName, Boolean.valueOf(bestEffort)});
+                new Object[]{unwrap(sessionInfo), nodeId, srcWorkspaceName, bestEffort});
     }
 
     public void resolveMergeConflict(final SessionInfo sessionInfo, final NodeId nodeId,
@@ -485,7 +485,7 @@
                 return null;
             }
         }, "addVersionLabel(SessionInfo, NodeId, NodeId, Name, boolean)",
-                new Object[]{unwrap(sessionInfo), versionHistoryId, versionId, label, Boolean.valueOf(moveLabel)});
+                new Object[]{unwrap(sessionInfo), versionHistoryId, versionId, label, moveLabel});
     }
 
     public void removeVersionLabel(final SessionInfo sessionInfo, final NodeId versionHistoryId,
@@ -543,7 +543,7 @@
     }
 
     public void checkQueryStatement(final SessionInfo sessionInfo, final String statement,
-            final String language, final Map namespaces) throws RepositoryException {
+            final String language, final Map<String, String> namespaces) throws RepositoryException
{
 
         execute(new Callable() {
             public Object call() throws RepositoryException {
@@ -555,7 +555,7 @@
     }
 
     public QueryInfo executeQuery(final SessionInfo sessionInfo, final String statement,
-            final String language, final Map namespaces) throws RepositoryException {
+            final String language, final Map<String, String> namespaces) throws RepositoryException
{
 
         return (QueryInfo) execute(new Callable() {
             public Object call() throws RepositoryException {
@@ -566,7 +566,7 @@
     }
 
     public QueryInfo executeQuery(final SessionInfo sessionInfo, final String statement,
-                                  final String language, final Map namespaces, final long
limit, final long offset, final Map<String, QValue> values) throws RepositoryException
{
+                                  final String language, final Map<String, String>
namespaces, final long limit, final long offset, final Map<String, QValue> values) throws
RepositoryException {
 
         return (QueryInfo) execute(new Callable() {
             public Object call() throws RepositoryException {
@@ -586,8 +586,8 @@
                        qnodeTypeName, noLocal);
             }
         }, "createEventFilter(SessionInfo, int, Path, boolean, String[], Name[], boolean)",
-                new Object[]{unwrap(sessionInfo), new Integer(eventTypes), absPath, Boolean.valueOf(isDeep),
uuid,
-                qnodeTypeName, Boolean.valueOf(noLocal)});
+                new Object[]{unwrap(sessionInfo), eventTypes, absPath, isDeep, uuid,
+                qnodeTypeName, noLocal});
     }
 
     public Subscription createSubscription(final SessionInfo sessionInfo, final EventFilter[]
filters)
@@ -605,7 +605,7 @@
             throws RepositoryException, InterruptedException {
 
         final String methodName = "getEvents(Subscription, long)";
-        final Object[] args = new Object[]{subscription, new Long(timeout)};
+        final Object[] args = new Object[]{subscription, timeout};
         final InterruptedException[] ex = new InterruptedException[1];
 
         EventBundle[] result = (EventBundle[]) execute(new Callable() {
@@ -648,8 +648,8 @@
         }, "dispose(Subscription)", new Object[]{});
     }
 
-    public Map getRegisteredNamespaces(final SessionInfo sessionInfo) throws RepositoryException
{
-        return (Map) execute(new Callable() {
+    public Map<String, String> getRegisteredNamespaces(final SessionInfo sessionInfo)
throws RepositoryException {
+        return (Map<String, String>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.getRegisteredNamespaces(unwrap(sessionInfo));
             }
@@ -697,15 +697,15 @@
         }, "unregisterNamespace(SessionInfo, String)", new Object[]{unwrap(sessionInfo),
uri});
     }
 
-    public Iterator getQNodeTypeDefinitions(final SessionInfo sessionInfo) throws RepositoryException
{
-        return (Iterator) execute(new Callable() {
+    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(final SessionInfo
sessionInfo) throws RepositoryException {
+        return (Iterator<QNodeTypeDefinition>) execute(new Callable() {
             public Object call() throws RepositoryException {
                 return service.getQNodeTypeDefinitions(unwrap(sessionInfo));
             }
         }, "getQNodeTypeDefinitions(SessionInfo)", new Object[]{unwrap(sessionInfo)});
     }
 
-    public Iterator getQNodeTypeDefinitions(final SessionInfo sessionInfo, final Name[] nodetypeNames)
+    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(final SessionInfo
sessionInfo, final Name[] nodetypeNames)
             throws RepositoryException {
 
         return (Iterator) execute(new Callable() {

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/EventBundle.java
Mon Jun 22 12:27:30 2009
@@ -31,7 +31,7 @@
      *
      * @return the {@link Event events} of this bundle.
      */
-    public Iterator getEvents();
+    public Iterator<Event> getEvents();
 
     /**
      * Returns <code>true</code> if this event bundle is associated with a

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/NodeInfo.java
Mon Jun 22 12:27:30 2009
@@ -68,7 +68,7 @@
      * node based on this info object or an empty array if the node is not
      * referenceable or no references exist.
      * @see PropertyInfo#getId()
-     * @deprecated Use {@link RepositoryService#getReferences(SessionInfo, NodeId, boolean)}
instead.
+     * @deprecated Use {@link RepositoryService#getReferences(SessionInfo, NodeId, Name,
boolean)} instead.
      */
     public PropertyId[] getReferences();
 
@@ -76,7 +76,7 @@
      * @return {@link PropertyId Id}s of children properties
      * @see PropertyInfo#getId()
      */
-    public Iterator getPropertyIds();
+    public Iterator<PropertyId> getPropertyIds();
 
     /**
      * Return the all <code>ChildInfo</code>s of the node represent by
@@ -94,5 +94,5 @@
      * case {@link RepositoryService#getChildInfos(SessionInfo, NodeId)} will
      * be used to load the <code>ChildInfo</code>s.
      */
-    public Iterator getChildInfos();
+    public Iterator<ChildInfo> getChildInfos();
 }

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/QNodeTypeDefinition.java
Mon Jun 22 12:27:30 2009
@@ -122,5 +122,5 @@
      *
      * @return a collection of node type <code>Name</code>s
      */
-    public Collection getDependencies();
+    public Collection<Name> getDependencies();
 }

Modified: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java
Mon Jun 22 12:27:30 2009
@@ -121,7 +121,7 @@
      * @see javax.jcr.Repository#getDescriptorKeys()
      * @see javax.jcr.Repository#getDescriptor(String)
      */
-    public Map getRepositoryDescriptors() throws RepositoryException;
+    public Map<String, String> getRepositoryDescriptors() throws RepositoryException;
 
     //-----------------------------------< SessionInfo creation and release >---
     /**
@@ -289,7 +289,7 @@
      * @see javax.jcr.Node#getVersionHistory()
      * @see javax.jcr.version.Version#getContainingHistory()
      */
-    public Iterator getItemInfos(SessionInfo sessionInfo, NodeId nodeId) throws ItemNotFoundException,
RepositoryException;
+    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, NodeId
nodeId) throws ItemNotFoundException, RepositoryException;
 
     /**
      * Returns an Iterator of <code>ChildInfo</code>s present on the
@@ -302,7 +302,7 @@
      * @throws ItemNotFoundException
      * @throws RepositoryException
      */
-    public Iterator getChildInfos(SessionInfo sessionInfo, NodeId parentId) throws ItemNotFoundException,
RepositoryException;
+    public Iterator<ChildInfo> getChildInfos(SessionInfo sessionInfo, NodeId parentId)
throws ItemNotFoundException, RepositoryException;
 
     /**
      * Returns the {@link PropertyId Id}s of the properties that are referencing
@@ -724,7 +724,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Node#merge(String, boolean)
      */
-    public Iterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName,
boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException;
+    public Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName,
boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException;
 
     /**
      * Merge the node identified by the given <code>NodeId</code> and its subtree
@@ -746,7 +746,7 @@
      * @see javax.jcr.version.VersionManager#merge(String, String, boolean, boolean)
      * @since JCR 2.0
      */
-    public Iterator merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName,
boolean bestEffort, boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException,
MergeException, LockException, InvalidItemStateException, RepositoryException;
+    public Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName,
boolean bestEffort, boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException,
MergeException, LockException, InvalidItemStateException, RepositoryException;
 
     /**
      * Resolve an existing merge conflict present with the node identified by
@@ -881,7 +881,7 @@
      *                               statement.
      * @see javax.jcr.query.QueryManager#createQuery(String, String)
      */
-    public void checkQueryStatement(SessionInfo sessionInfo, String statement, String language,
Map namespaces) throws InvalidQueryException, RepositoryException;
+    public void checkQueryStatement(SessionInfo sessionInfo, String statement, String language,
Map<String, String> namespaces) throws InvalidQueryException, RepositoryException;
 
     /**
      * Execute the given query statement with the specified query language. The
@@ -898,7 +898,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.query.Query#execute()
      */
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map namespaces) throws RepositoryException;
+    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map<String, String> namespaces) throws RepositoryException;
 
     /**
      * Execute the given query statement with the specified query language. The
@@ -919,7 +919,7 @@
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.query.Query#execute()
      */
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException;
+    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values)
throws RepositoryException;
 
     //--------------------------------------------------------< Observation >---
     /**
@@ -1059,7 +1059,7 @@
      * @see javax.jcr.NamespaceRegistry#getPrefixes()
      * @see javax.jcr.NamespaceRegistry#getURIs()
      */
-    public Map getRegisteredNamespaces(SessionInfo sessionInfo) throws RepositoryException;
+    public Map<String, String> getRegisteredNamespaces(SessionInfo sessionInfo) throws
RepositoryException;
 
     /**
      * Returns the namespace URI for the given namespace <code>prefix</code>.
@@ -1127,7 +1127,7 @@
      * @see javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
      * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
      */
-    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException;
+    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo)
throws RepositoryException;
 
     /**
      * Retrieve <code>QNodeTypeDefinition</code>s for the given names. The
@@ -1149,7 +1149,7 @@
      * @see javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
      * @see javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
      */
-    public Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames)
throws RepositoryException;
+    public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo,
Name[] nodetypeNames) throws RepositoryException;
 
     /**
      * Registers the node types with the specified <code>QNodeTypeDefinition</code>s.

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Mon Jun 22 12:27:30 2009
@@ -1678,7 +1678,7 @@
     /**
      * @see RepositoryService#executeQuery(SessionInfo, String, String, Map)
      */
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map namespaces) throws RepositoryException {
+    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map<String, String> namespaces) throws RepositoryException {
         SearchMethod method = null;
         try {
             String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
@@ -1705,7 +1705,7 @@
     /**
      * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
      */
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException
{
+    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values)
throws RepositoryException {
         SearchMethod method = null;
         try {
             String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java?rev=787219&r1=787218&r2=787219&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/RepositoryServiceImpl.java
Mon Jun 22 12:27:30 2009
@@ -1032,7 +1032,7 @@
     public QueryInfo executeQuery(SessionInfo sessionInfo,
                                   String statement,
                                   String language,
-                                  Map namespaces) throws RepositoryException {
+                                  Map<String, String> namespaces) throws RepositoryException
{
         SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
         Query query = createQuery(sInfo.getSession(), statement,
                 language, namespaces);
@@ -1043,7 +1043,7 @@
     /**
      * {@inheritDoc}
      */
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException
{
+    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values)
throws RepositoryException {
         SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
         Query query = createQuery(sInfo.getSession(), statement,
                 language, namespaces);



Mime
View raw message