mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV to HEAD
- ALF-8806 RINF 41: Lucene Removal: Fix CopyService - ALF-9028: RINF 41: Fix Aspect cm:copiedFrom - ALF-9029 RINF 49: Lucene Removal: CheckOutCheckInService API - ALF-9032: RINF 49: fixes to cm:workingcopy aspect 28996: Dev branch for De-Lucene work pending patches 29004: Evaluator runs in read-only txn 29006: Additional PermissionCheckedCollection.create method - Use an existing collection's permission check data (cut-off, etc) to wrap a new collection 29007: CopyService and CheckOutCheckInService refactors to remove Lucene CopyService: Removed cm:source property from cm:copiedfrom aspect and replaced with a cm:original association. Added CQ-based APIs to query for copies Added APIs to support bi-directional walking of copy association Fixed sundry uses of cm:copiedfrom esp. all uses related to cm:workingcopy CheckOutCheckInService: Check-out now creates a source aspect cm:checkedOut with 1:1 relationship to cm:workingcopy via cm:workingcopylink Removed explicit use of cm:workingcopy aspect and replaced it with calls to COCI API 29083: Audit tests fail when indexing is turned off. Also removed a getReader() call during rule evaluation, leading to a 'sub-action' read being recorded. 29113: NodeDAO.getNodesWithAspects supports paging 29135: Removed unused patch queries 29139: Basic patch (still terminates with error) to upgrade cm:copiedfrom and cm:workingcopy 29157: Tested patch for cm:copiedfrom and cm:workingcopy aspects git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29159 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,7 +22,6 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.service.Auditable;
|
||||
import org.alfresco.service.PublicService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
@@ -176,4 +175,33 @@ public interface CheckOutCheckInService
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
public NodeRef getWorkingCopy(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Helper method to retrieve the original node (check-out source) for a working copy.
|
||||
* <p/>
|
||||
* A <tt>null</tt> node reference is returned if the node is not a working copy.
|
||||
*
|
||||
* @param nodeRef the (potential) working copy
|
||||
* @return the original (source) node or <tt>null</tt> if it is not a working copy
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
public NodeRef getCheckedOut(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Determine if a node is a working copy or not
|
||||
*
|
||||
* @param nodeRef the (potential) working copy
|
||||
* @return <tt>true</tt> if the node is a working copy otherwise <tt>false</tt>
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
public boolean isWorkingCopy(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Determine if a node has been checked out or not
|
||||
*
|
||||
* @param nodeRef the (potentially) checked out node
|
||||
* @return <tt>true</tt> if the node has been checked out otherwise <tt>false</tt>
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
public boolean isCheckedOut(NodeRef nodeRef);
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.service.Auditable;
|
||||
import org.alfresco.service.PublicService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
|
||||
@@ -137,7 +136,7 @@ public interface LockService
|
||||
throws UnableToAquireLockException;
|
||||
|
||||
/**
|
||||
* Removes the lock on a node.
|
||||
* Removes the lock on a node; if there is no lock then nothing is done.
|
||||
* <p>
|
||||
* The user must have sufficient permissions to remove the lock (ie: be the
|
||||
* owner of the lock or have admin rights) otherwise an exception will be raised.
|
||||
|
@@ -19,10 +19,10 @@
|
||||
package org.alfresco.service.cmr.repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.security.permissions.PermissionCheckValue;
|
||||
import org.alfresco.service.Auditable;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
@@ -160,6 +160,16 @@ public interface CopyService
|
||||
@Auditable(parameters = {"sourceNodeRef", "destinationNodeRef"})
|
||||
public void copy(NodeRef sourceNodeRef, NodeRef destinationNodeRef);
|
||||
|
||||
/**
|
||||
* Get the original for a given copied node
|
||||
*
|
||||
* @param copiedNodeRef the copied node reference
|
||||
* @return the original node reference or <tt>null</tt> if it isn't a
|
||||
* copy or the original has been deleted
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
public NodeRef getOriginal(NodeRef copiedNodeRef);
|
||||
|
||||
/**
|
||||
* Gets all the copies of a given node that have been made using this service.
|
||||
*
|
||||
@@ -176,19 +186,15 @@ public interface CopyService
|
||||
* @author Derek Hulley
|
||||
* @since 4.0
|
||||
*/
|
||||
public class CopyInfo
|
||||
public class CopyInfo implements PermissionCheckValue
|
||||
{
|
||||
private final NodeRef nodeRef;
|
||||
private final String name;
|
||||
private final NodeRef parentNodeRef;
|
||||
private final String parentName;
|
||||
|
||||
public CopyInfo(NodeRef nodeRef, String name, NodeRef parentNodeRef, String parentName)
|
||||
public CopyInfo(NodeRef nodeRef, String name)
|
||||
{
|
||||
this.nodeRef = nodeRef;
|
||||
this.name = name;
|
||||
this.parentNodeRef = parentNodeRef;
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,22 +212,6 @@ public interface CopyService
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the parent of the node copy
|
||||
*/
|
||||
public NodeRef getParentNodeRef()
|
||||
{
|
||||
return parentNodeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name of the parent of the node copy
|
||||
*/
|
||||
public String getParentName()
|
||||
{
|
||||
return parentName;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,7 +221,7 @@ public interface CopyService
|
||||
* @param pagingRequest page request details
|
||||
* @return the page(s) of nodes that were copied from the given node
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
@Auditable(parameters = {"originalNodeRef"})
|
||||
public PagingResults<CopyInfo> getCopies(NodeRef originalNodeRef, PagingRequest pagingRequest);
|
||||
|
||||
/**
|
||||
@@ -243,10 +233,9 @@ public interface CopyService
|
||||
* @param pagingRequest page request details
|
||||
* @return the page(s) of nodes that were copied from the given node
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef"})
|
||||
@Auditable(parameters = {"originalNodeRef", "copyParentNodeRef"})
|
||||
public PagingResults<CopyInfo> getCopies(
|
||||
NodeRef originalNodeRef,
|
||||
NodeRef copyParentNodeRef,
|
||||
Set<QName> copyNodeAspectsToIgnore,
|
||||
PagingRequest pagingRequest);
|
||||
}
|
||||
|
Reference in New Issue
Block a user