mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
AVMLockingService is mostly complete. Basic test is in place.
Ran across and fixed bug in MapAttributeImpl. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5539 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,10 +30,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.repo.attributes.Attribute;
|
||||
import org.alfresco.repo.attributes.BooleanAttributeImpl;
|
||||
import org.alfresco.repo.attributes.BooleanAttributeValue;
|
||||
import org.alfresco.repo.attributes.MapAttribute;
|
||||
import org.alfresco.repo.attributes.MapAttributeImpl;
|
||||
import org.alfresco.repo.attributes.StringAttributeImpl;
|
||||
import org.alfresco.repo.attributes.MapAttributeValue;
|
||||
import org.alfresco.repo.attributes.StringAttributeValue;
|
||||
|
||||
/**
|
||||
* Struct representing an AVM lock.
|
||||
@@ -99,16 +99,16 @@ public class AVMLock implements Serializable
|
||||
|
||||
public Attribute getAttribute()
|
||||
{
|
||||
MapAttribute lockData = new MapAttributeImpl();
|
||||
lockData.put(PATH, new StringAttributeImpl(fPath));
|
||||
lockData.put(STORE, new StringAttributeImpl(fStore));
|
||||
lockData.put(TYPE, new StringAttributeImpl(fType.name()));
|
||||
lockData.put(WEBPROJECT, new StringAttributeImpl(fWebProject));
|
||||
MapAttribute owners = new MapAttributeImpl();
|
||||
MapAttribute lockData = new MapAttributeValue();
|
||||
lockData.put(PATH, new StringAttributeValue(fPath));
|
||||
lockData.put(STORE, new StringAttributeValue(fStore));
|
||||
lockData.put(TYPE, new StringAttributeValue(fType.name()));
|
||||
lockData.put(WEBPROJECT, new StringAttributeValue(fWebProject));
|
||||
MapAttribute owners = new MapAttributeValue();
|
||||
for (String owner : fOwners)
|
||||
{
|
||||
// The value is a dummy.
|
||||
owners.put(owner, new BooleanAttributeImpl(true));
|
||||
owners.put(owner, new BooleanAttributeValue(true));
|
||||
}
|
||||
lockData.put(OWNERS, owners);
|
||||
return lockData;
|
||||
|
@@ -70,21 +70,21 @@ public interface AVMLockingService
|
||||
public List<AVMLock> getUsersLocks(String user);
|
||||
|
||||
/**
|
||||
* Get all locks in a webProject.
|
||||
* @param webProject
|
||||
* @return A List (possibly empty) of all locks in a web project.
|
||||
*/
|
||||
public List<AVMLock> getLocks(String webProject);
|
||||
|
||||
/**
|
||||
* Add a web project.
|
||||
* Add a web project to the locking tables.
|
||||
* @param webProject The web project name.
|
||||
*/
|
||||
public void addWebProject(String webProject);
|
||||
|
||||
/**
|
||||
* Remove a web project from the locking tables.
|
||||
* 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user