You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "ruchi goel (JIRA)" <ji...@apache.org> on 2007/05/10 07:24:15 UTC

[jira] Created: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

jcr mapping layer does not expose node move and node copy via PersistenceManager.java
-------------------------------------------------------------------------------------

                 Key: JCR-910
                 URL: https://issues.apache.org/jira/browse/JCR-910
             Project: Jackrabbit
          Issue Type: Bug
          Components: jcr-mapping
    Affects Versions: 1.3
            Reporter: ruchi goel


The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart resolved JCR-910.
------------------------------------

    Resolution: Fixed

the unit tests are working now.

> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>            Assignee: Christophe Lombart
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495402 ] 

Christophe Lombart commented on JCR-910:
----------------------------------------

Could you provide some unit tests ?  Thanks 


> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>         Assigned To: Christophe Lombart
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495414 ] 

Christophe Lombart commented on JCR-910:
----------------------------------------

Patch apply. Thanks
It should be nice if you can provide unit test for new features.  
Let me know if you have time for doing it.

> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>         Assigned To: Christophe Lombart
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "ruchi goel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495481 ] 

ruchi goel commented on JCR-910:
--------------------------------

Ok. I see it checked in , in the latest trunk code . For the unit test, can u wait for a while, I am stuck with deliverables. Or if you get a chance , please go ahead with it. 

> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>         Assigned To: Christophe Lombart
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "ruchi goel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495467 ] 

ruchi goel commented on JCR-910:
--------------------------------

"Patch Apply" . Does that mean I checkin the code . Do I have permissions to do so ? I will try to come up with unit test  although I have tested it in my use case. 

> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>         Assigned To: Christophe Lombart
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "ruchi goel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494690 ] 

ruchi goel commented on JCR-910:
--------------------------------

Recommended fix for this issue  : Kindly review .

Add following methods in PersistenceManager.java :

 public void move(String srcPath, String destPath) throws PersistenceException;
    
 public void copy(String srcPath, String destPath) throws PersistenceException;


Add following methods in PersistenceManagerImpl.java
import javax.jcr.Workspace;
 /* added by ruchi */
    public void move(String srcPath, String destPath){
        Workspace workspace = session.getWorkspace();
        try{
            workspace.move(srcPath,destPath);
        }catch(javax.jcr.nodetype.ConstraintViolationException cve){
            throw new PersistenceException(
                    "Cannot move the node from  " + srcPath + " to " + destPath + "." +  " Violation of a nodetype or attempt to move under a property detected", cve);
            
        }catch(javax.jcr.version.VersionException ve){
            throw new VersionException(
                    "Cannot move the node from " + srcPath + " to " + destPath + "." + " Parent node of source or destination is versionable and checked in ", ve);
            
        }catch(javax.jcr.AccessDeniedException ade){
            throw new PersistenceException(
                    "Cannot move the node from " + srcPath +  " to " + destPath + "." + " Session does not have access permissions", ade);
            
        }catch(javax.jcr.PathNotFoundException pnf){
            throw new PersistenceException(
                    "Cannot move the node from " + srcPath + " to " + destPath + "." + " Node at source or destination does not exist ", pnf);
            
        }catch(javax.jcr.ItemExistsException ie){
            throw new PersistenceException(
                    "Cannot move the node from " + srcPath + " to " + destPath + "." +  " It might already exist at destination path.", ie);
            
        }catch(javax.jcr.lock.LockException le){
            throw new PersistenceException(
                    "Cannot move the node from " + srcPath + " to " + destPath + "." +  "Violation of a lock detected", le);
            
        }catch(javax.jcr.RepositoryException re){
            throw new org.apache.portals.graffito.jcr.exception.RepositoryException(
                    "Cannot move the node from " + srcPath + " to " + destPath + "." , re);
        }
    }
    /* added by ruchi */
     public void copy(String srcPath, String destPath){
        Workspace workspace = session.getWorkspace();
        try{
            workspace.copy(srcPath,destPath);
        }catch(javax.jcr.nodetype.ConstraintViolationException cve){
            throw new PersistenceException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." +  "Violation of a nodetype or attempt to copy under property detected ", cve);
            
        }catch(javax.jcr.version.VersionException ve){
            throw new VersionException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." + "Parent node of source or destination is versionable and checked in ", ve);
            
        }catch(javax.jcr.AccessDeniedException ade){
            throw new PersistenceException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." + " Session does not have access permissions", ade);
            
        }catch(javax.jcr.PathNotFoundException pnf){
            throw new PersistenceException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." + "Node at source or destination does not exist ", pnf);
            
        }catch(javax.jcr.ItemExistsException ie){
            throw new PersistenceException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." +  "It might already exist at destination path.", ie);
            
        }catch(javax.jcr.lock.LockException le){
            throw new PersistenceException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." +  "Violation of a lock detected", le);
            
        }catch(javax.jcr.RepositoryException re){
            throw new org.apache.portals.graffito.jcr.exception.RepositoryException(
                    "Cannot copy the node from " + srcPath + " to " + destPath + "." , re);
        }
    } 

> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (JCR-910) jcr mapping layer does not expose node move and node copy via PersistenceManager.java

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart reassigned JCR-910:
--------------------------------------

    Assignee: Christophe Lombart

> jcr mapping layer does not expose node move and node copy via PersistenceManager.java
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-910
>                 URL: https://issues.apache.org/jira/browse/JCR-910
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>    Affects Versions: 1.3
>            Reporter: ruchi goel
>         Assigned To: Christophe Lombart
>
> The PersistenceManagerImpl.java  in jcr-apping layer does not implement move and copy methods for a node.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.