|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.avm.locking.AVMLockingServiceImpl
public class AVMLockingServiceImpl
Implementation of the lock service.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.alfresco.service.cmr.avm.locking.AVMLockingService |
|---|
AVMLockingService.Type |
| Field Summary | |
|---|---|
static java.lang.String |
LOCK_TABLE
|
static java.lang.String |
STORES
|
static java.lang.String |
USERS
|
static java.lang.String |
WEB_PROJECTS
|
| Constructor Summary | |
|---|---|
AVMLockingServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addWebProject(java.lang.String webProject)
Add a web project to the locking tables if it doesn't already exist. |
AVMLock |
getLock(java.lang.String webProject,
java.lang.String path)
Get a lock on a given path |
java.util.List |
getStoreLocks(java.lang.String store)
Get all locks that reside in a given store. |
java.util.List |
getUsersLocks(java.lang.String user)
Get all the locks that a user owns. |
java.util.List |
getWebProjectLocks(java.lang.String webProject)
Get all locks in a give web project. |
java.util.List |
getWebProjects()
Get the names of all the web projects the service knows about. |
boolean |
hasAccess(NodeRef webProjectRef,
java.lang.String avmPath,
java.lang.String user)
Is the user allowed to do anything to the given asset, other than read? |
boolean |
hasAccess(java.lang.String webProject,
java.lang.String avmPath,
java.lang.String user)
Is the user allowed to do anything to the given asset, other than read? |
void |
init()
|
void |
lockPath(AVMLock lock)
Creates a lock of the given type on a path. |
void |
modifyLock(java.lang.String webProject,
java.lang.String path,
java.lang.String newPath,
java.lang.String newStore,
java.util.List usersToRemove,
java.util.List usersToAdd)
Modify a lock. |
void |
removeLock(java.lang.String webProject,
java.lang.String path)
Remove a lock. |
void |
removeLocksInDirectory(java.lang.String webProject,
java.lang.String store,
java.lang.String path)
Remove all locks on files contained within a directory. |
void |
removeStoreLocks(java.lang.String store)
Removes all locks residing in a store. |
void |
removeWebProject(java.lang.String webProject)
Remove a web project and all associated data from the locking tables. |
void |
setAttributeService(AttributeService service)
Setter for AttributeService reference. |
void |
setAuthorityService(AuthorityService service)
Set the authority service reference. |
void |
setNodeService(NodeService service)
|
void |
setPersonService(PersonService service)
Set the person service reference. |
void |
setRetryingTransactionHelper(RetryingTransactionHelper helper)
Setter for RetryingTransactionHelper reference. |
void |
setSearchService(SearchService service)
|
void |
setWebProjectStore(java.lang.String webProjectStore)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LOCK_TABLE
public static final java.lang.String WEB_PROJECTS
public static final java.lang.String USERS
public static final java.lang.String STORES
| Constructor Detail |
|---|
public AVMLockingServiceImpl()
| Method Detail |
|---|
public void setWebProjectStore(java.lang.String webProjectStore)
webProjectStore - The webProjectStore to setpublic void setAttributeService(AttributeService service)
service - public void setAuthorityService(AuthorityService service)
service - public void setPersonService(PersonService service)
service - public void setRetryingTransactionHelper(RetryingTransactionHelper helper)
helper - public void setSearchService(SearchService service)
public void setNodeService(NodeService service)
public void init()
public AVMLock getLock(java.lang.String webProject,
java.lang.String path)
AVMLockingService
getLock in interface AVMLockingServicewebProject - The website for which to get the lock.path - The path to check for a lock.
public java.util.List getUsersLocks(java.lang.String user)
AVMLockingService
getUsersLocks in interface AVMLockingServiceuser - The name of the user.
public void lockPath(AVMLock lock)
AVMLockingService
lockPath in interface AVMLockingServicelock - The lock structure to create.
public void removeLock(java.lang.String webProject,
java.lang.String path)
AVMLockingService
removeLock in interface AVMLockingServicewebProject - The web project the lock lives in.path - The store relative path of the lock.
public void removeLocksInDirectory(java.lang.String webProject,
java.lang.String store,
java.lang.String path)
AVMLockingService
removeLocksInDirectory in interface AVMLockingServicepublic void addWebProject(java.lang.String webProject)
AVMLockingService
addWebProject in interface AVMLockingServicewebProject - The web project name.public java.util.List getWebProjectLocks(java.lang.String webProject)
AVMLockingService
getWebProjectLocks in interface AVMLockingServicewebProject - The web project name.
public void removeWebProject(java.lang.String webProject)
AVMLockingService
removeWebProject in interface AVMLockingServicewebProject - The web project name.public java.util.List getStoreLocks(java.lang.String store)
AVMLockingService
getStoreLocks in interface AVMLockingServicestore - The store name.
public void modifyLock(java.lang.String webProject,
java.lang.String path,
java.lang.String newPath,
java.lang.String newStore,
java.util.List usersToRemove,
java.util.List usersToAdd)
AVMLockingService
modifyLock in interface AVMLockingServicewebProject - The name of the web project.path - The path of the lock.newPath - The path that the lock should be given. (may be null)newStore - The store that the lock should be given. (may be null)usersToRemove - List of users to remove from the lock. (may be null)usersToAdd - List of users to add to the lock. (may be null)public void removeStoreLocks(java.lang.String store)
AVMLockingService
removeStoreLocks in interface AVMLockingServicestore - The store name.
public boolean hasAccess(java.lang.String webProject,
java.lang.String avmPath,
java.lang.String user)
AVMLockingService
hasAccess in interface AVMLockingServicewebProject - The name of the web project that this path is being checked in.avmPath - A full avmPathuser - The name of the user, group, role to check on.
public boolean hasAccess(NodeRef webProjectRef,
java.lang.String avmPath,
java.lang.String user)
AVMLockingService
hasAccess in interface AVMLockingServicewebProjectRef - The NodeRef to the web project that this path is being checked in.avmPath - A full avmPathuser - The name of the user, group, role to check on.
public java.util.List getWebProjects()
AVMLockingService
getWebProjects in interface AVMLockingService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||