jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r761292 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Date Thu, 02 Apr 2009 13:38:49 GMT
Author: jukka
Date: Thu Apr  2 13:38:49 2009
New Revision: 761292

URL: http://svn.apache.org/viewvc?rev=761292&view=rev
Log:
JCR-1565: JSR 283 lifecycle management

Only nodes with mixin node type mix:lifecycle may participate in a lifecycle.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=761292&r1=761291&r2=761292&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Thu Apr  2 13:38:49 2009
@@ -4737,13 +4737,25 @@
     // TODO: JCR-1565 JSR 283 lifecycle management
     public String[] getAllowedLifecycleTransistions()
             throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
+        if (isNodeType(NameConstants.MIX_LIFECYCLE)) {
+            throw new UnsupportedRepositoryOperationException();
+        } else {
+            throw new UnsupportedRepositoryOperationException(
+                    "Only nodes with mixin node type mix:lifecycle"
+                    + " may participate in a lifecycle.");
+        }
     }
 
     // TODO: JCR-1565 JSR 283 lifecycle management
     public void followLifecycleTransition(String transition)
             throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException();
+        if (isNodeType(NameConstants.MIX_LIFECYCLE)) {
+            throw new UnsupportedRepositoryOperationException();
+        } else {
+            throw new UnsupportedRepositoryOperationException(
+                    "Only nodes with mixin node type mix:lifecycle"
+                    + " may participate in a lifecycle.");
+        }
     }
 
     //--------------------------------------------------------------< Object >



Mime
View raw message