Merged 5.2.N (5.2.1) to HEAD (5.2)

129751 amorarasu: 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/HEAD/root@130223 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 14:42:13 +00:00
parent 94b18c174f
commit 604969ed0e
4 changed files with 102 additions and 59 deletions

View File

@@ -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();
}