mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Additions to the AVMLockingService API. All but one are implemented. None are tested.
Oh AVMLockingServiceTest will fail if not started from a clean database. I'll fix that up in a bit. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5845 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -97,7 +97,6 @@ public class AVMLock implements Serializable
|
||||
fOwners = owners;
|
||||
}
|
||||
|
||||
|
||||
public AVMLock(Attribute lockData)
|
||||
{
|
||||
fPath = lockData.get(PATH).getStringValue();
|
||||
@@ -142,6 +141,15 @@ public class AVMLock implements Serializable
|
||||
{
|
||||
return fPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the path of this lock.
|
||||
* @param path
|
||||
*/
|
||||
public void setPath(String path)
|
||||
{
|
||||
fPath = path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Store
|
||||
@@ -150,6 +158,15 @@ public class AVMLock implements Serializable
|
||||
{
|
||||
return fStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the store of this lock.
|
||||
* @param store
|
||||
*/
|
||||
public void setStore(String store)
|
||||
{
|
||||
fStore = store;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Type
|
||||
|
@@ -55,6 +55,19 @@ public interface AVMLockingService
|
||||
*/
|
||||
public AVMLock getLock(String webProject, String path);
|
||||
|
||||
/**
|
||||
* Modify a lock. Null change parameters are ignored.
|
||||
* @param webProject The name of the web project.
|
||||
* @param path The path of the lock.
|
||||
* @param newPath The path that the lock should be given. (may be null)
|
||||
* @param newStore The store that the lock should be given. (may be null)
|
||||
* @param usersToRemove List of users to remove from the lock. (may be null)
|
||||
* @param usersToAdd List of users to add to the lock. (may be null)
|
||||
*/
|
||||
public void modifyLock(String webProject, String path, String newPath,
|
||||
String newStore, List<String> usersToRemove,
|
||||
List<String> usersToAdd);
|
||||
|
||||
/**
|
||||
* Remove a lock.
|
||||
* @param webProject The web project the lock lives in.
|
||||
@@ -62,6 +75,12 @@ public interface AVMLockingService
|
||||
*/
|
||||
public void removeLock(String webProject, String path);
|
||||
|
||||
/**
|
||||
* Removes all locks residing in a store.
|
||||
* @param store The store name.
|
||||
*/
|
||||
public void removeStoreLocks(String store);
|
||||
|
||||
/**
|
||||
* Get all the locks that a user owns.
|
||||
* @param user The name of the user.
|
||||
@@ -87,4 +106,20 @@ public interface AVMLockingService
|
||||
* @return All the locks found.
|
||||
*/
|
||||
public List<AVMLock> getWebProjectLocks(String webProject);
|
||||
|
||||
/**
|
||||
* Get all locks that reside in a given store.
|
||||
* @param store The store name.
|
||||
* @return All the locks found.
|
||||
*/
|
||||
public List<AVMLock> getStoreLocks(String store);
|
||||
|
||||
/**
|
||||
* Is the user allowed to do anything to the given asset, other than read?
|
||||
* @param webProject The name of the web project that this path is being checked in.
|
||||
* @param avmPath A full avmPath
|
||||
* @param user The name of the user, group, role to check on.
|
||||
* @return Mother's verdict.
|
||||
*/
|
||||
public boolean motherMayI(String webProject, String avmPath, String user);
|
||||
}
|
||||
|
Reference in New Issue
Block a user