jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1171186 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: JcrVersionManager.java NodeImpl.java WorkspaceImpl.java
Date Thu, 15 Sep 2011 17:33:20 GMT
Author: mduerig
Date: Thu Sep 15 17:33:20 2011
New Revision: 1171186

URL: http://svn.apache.org/viewvc?rev=1171186&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
refactor: specialise JcrVersionManager to reduce casting 

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java?rev=1171186&r1=1171185&r2=1171186&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
Thu Sep 15 17:33:20 2011
@@ -231,7 +231,7 @@ public class JcrVersionManager implement
     }
 
     @Override
-    public Node getActivity() throws RepositoryException {
+    public NodeImpl getActivity() throws RepositoryException {
         session.checkIsAlive();
         session.checkSupportedOption(Repository.OPTION_ACTIVITIES_SUPPORTED);
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=1171186&r1=1171185&r2=1171186&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Thu Sep 15 17:33:20 2011
@@ -814,7 +814,7 @@ public class NodeImpl extends ItemImpl<N
             log.debug("Node " + safeGetJCRPath() + " is already checked out.");
         } else {
             if (session.isSupportedOption(Repository.OPTION_ACTIVITIES_SUPPORTED)) {
-                NodeImpl activity = (NodeImpl) session.getWorkspace().getVersionManager().getActivity();
+                NodeImpl activity = session.getWorkspace().getVersionManager().getActivity();
                 NodeId activityId = activity == null ? null : activity.getNodeState().getNodeId();
                 session.getVersionStateManager().checkout(getNodeState(), activityId);
             } else {
@@ -830,7 +830,7 @@ public class NodeImpl extends ItemImpl<N
         if (isCheckedOut()) {
             NodeEntry newVersion;
             if (session.isSupportedOption(Repository.OPTION_ACTIVITIES_SUPPORTED)) {
-                NodeImpl activity = (NodeImpl) session.getWorkspace().getVersionManager().getActivity();
+                NodeImpl activity = session.getWorkspace().getVersionManager().getActivity();
                 NodeId activityId = activity == null ? null : activity.getNodeState().getNodeId();
                 newVersion = session.getVersionStateManager().checkpoint(getNodeState(),
activityId);
             } else {
@@ -884,7 +884,9 @@ public class NodeImpl extends ItemImpl<N
             }
         }
         if (!isConflicting) {
-            String msg = "Unable to resolve merge conflict. Specified version is not in jcr:mergeFailed
property: " + safeGetJCRPath();
+            String msg = "Unable to resolve merge conflict. Specified version is not in jcr:mergeFailed
property: " +
+                    safeGetJCRPath();
+            
             log.error(msg);
             throw new VersionException(msg);
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java?rev=1171186&r1=1171185&r2=1171186&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
Thu Sep 15 17:33:20 2011
@@ -93,7 +93,7 @@ public class WorkspaceImpl implements Wo
     private VersionManager versionManager;
 
     private LockManager jcrLockManager;
-    private javax.jcr.version.VersionManager jcrVersionManager;
+    private JcrVersionManager jcrVersionManager;
 
     public WorkspaceImpl(String name, SessionImpl session, RepositoryConfig config, SessionInfo
sessionInfo)
             throws RepositoryException {
@@ -334,7 +334,7 @@ public class WorkspaceImpl implements Wo
     }
 
     @Override
-    public synchronized javax.jcr.version.VersionManager getVersionManager() throws RepositoryException
{
+    public synchronized JcrVersionManager getVersionManager() throws RepositoryException
{
         session.checkIsAlive();
         session.checkSupportedOption(Repository.OPTION_VERSIONING_SUPPORTED);
         if (jcrVersionManager == null) {



Mime
View raw message