Fix WCM-857

Added AVMLockingService.removeLocksInDirectory() which, given the state of AttributeService, is a bit
of a sledgehammer.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6932 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-10-08 15:14:11 +00:00
parent e5bef04dbf
commit 2a47726733
3 changed files with 113 additions and 103 deletions

View File

@@ -15,11 +15,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing
*/
@@ -40,15 +40,15 @@ public interface AVMLockingService
{
DISCRETIONARY
};
/**
* Creates a lock of the given type on a path.
* The lock is used to control access to all the
* The lock is used to control access to all the
* corresponding paths in the given path's web project.
* @param lock The lock structure to create.
*/
public void lockPath(AVMLock lock);
/**
* Get a lock on a given path
* @param webProject The website for which to get the lock.
@@ -56,7 +56,7 @@ public interface AVMLockingService
* @return The Lock structure or null if there is no lock.
*/
public AVMLock getLock(String webProject, String path);
/**
* Modify a lock. Null change parameters are ignored.
* @param webProject The name of the web project.
@@ -69,53 +69,61 @@ public interface AVMLockingService
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.
* @param path The store relative path of the lock.
*/
public void removeLock(String webProject, String path);
/**
* Remove all locks on files contained within a directory.
* @param webProject
* @param store
* @param path
*/
public void removeLocksInDirectory(String webProject, String store, 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.
* @return The (possibly empty list) of the user's locks.
*/
public List<AVMLock> getUsersLocks(String user);
/**
* Add a web project to the locking tables if it doesn't already exist.
* @param webProject The web project name.
*/
public void addWebProject(String webProject);
/**
* Remove a web project and all associated data from the locking tables.
* @param webProject The web project name.
*/
public void removeWebProject(String webProject);
/**
* Get all locks in a give web project.
* @param webProject The web project name.
* @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.
@@ -124,7 +132,7 @@ public interface AVMLockingService
* @return Whether the user has access.
*/
public boolean hasAccess(String webProject, String avmPath, String user);
/**
* Is the user allowed to do anything to the given asset, other than read?
* @param webProjectRef The NodeRef to the web project that this path is being checked in.
@@ -133,7 +141,7 @@ public interface AVMLockingService
* @return Whether the user has access.
*/
public boolean hasAccess(NodeRef webProjectRef, String avmPath, String user);
/**
* Get the names of all the web projects the service knows about.
* @return The list of web project names.