mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
REPO-164 / REPO-1086 - V1 REST API: Lock Node
- review suggestions - added more test cases + utility methods git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129751 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,12 +27,14 @@ package org.alfresco.rest.api.model;
|
||||
|
||||
import org.alfresco.repo.lock.mem.Lifetime;
|
||||
import org.alfresco.service.cmr.lock.LockType;
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
|
||||
/**
|
||||
* Representation of a lock info
|
||||
*
|
||||
* @author Ancuta Morarasu
|
||||
*/
|
||||
@JsonIgnoreProperties({"mappedType"})
|
||||
public class LockInfo
|
||||
{
|
||||
private Integer timeToExpire;
|
||||
@@ -85,10 +87,15 @@ public class LockInfo
|
||||
return includeChildren;
|
||||
}
|
||||
|
||||
public LockType getType()
|
||||
public LockType getMappedType()
|
||||
{
|
||||
return type != null ? type.getType() : null;
|
||||
}
|
||||
|
||||
public LockType2 getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
@@ -110,9 +117,9 @@ public class LockInfo
|
||||
{
|
||||
final StringBuilder sb = new StringBuilder("LockInfo{");
|
||||
sb.append("includeChildren='").append(includeChildren).append('\'');
|
||||
sb.append(", timeToExpire=").append(timeToExpire).append('\'');
|
||||
sb.append(", type=").append(type).append('\'');
|
||||
sb.append(", lifetime=").append(lifetime).append('\'');
|
||||
sb.append(", timeToExpire='").append(timeToExpire).append('\'');
|
||||
sb.append(", type='").append(type).append('\'');
|
||||
sb.append(", lifetime='").append(lifetime).append('\'');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user