Merged WEBAPP-API (5.2.1) to 5.2.N (5.2.1)

136749 jkaabimofrad: Minor re-formatting (replace tabs with spaces) noted via APPSREPO-147.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@136756 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2017-05-15 15:38:41 +00:00
parent ea8994f297
commit 4aa5513c75
7 changed files with 3654 additions and 3654 deletions

View File

@@ -39,13 +39,13 @@ public interface Favourites
{ {
String PARAM_INCLUDE_PATH = Nodes.PARAM_INCLUDE_PATH; String PARAM_INCLUDE_PATH = Nodes.PARAM_INCLUDE_PATH;
/** /**
* Add a favourite for user personId * Add a favourite for user personId
* *
* @param personId the personId for which the favourite is to be added * @param personId the personId for which the favourite is to be added
* @param favourite the favourite to add * @param favourite the favourite to add
*/ */
Favourite addFavourite(String personId, Favourite favourite); Favourite addFavourite(String personId, Favourite favourite);
/** /**
* Add a favourite for user personId taking parameters into account * Add a favourite for user personId taking parameters into account
@@ -56,30 +56,30 @@ public interface Favourites
*/ */
Favourite addFavourite(String personId, Favourite favourite, Parameters parameters); Favourite addFavourite(String personId, Favourite favourite, Parameters parameters);
/** /**
* Add a favourite for user personId * Add a favourite for user personId
* *
* @param personId the personId for which the favourite is to be removed * @param personId the personId for which the favourite is to be removed
* @param id the id of the favourite to remove (id is a uuid) * @param id the id of the favourite to remove (id is a uuid)
*/ */
void removeFavourite(String personId, String id); void removeFavourite(String personId, String id);
/** /**
* Get a paged list of favourites for user personId * Get a paged list of favourites for user personId
* *
* @param personId the personId for which the favourite is to be removed * @param personId the personId for which the favourite is to be removed
* @param parameters Parameters * @param parameters Parameters
* @return paged favourites * @return paged favourites
*/ */
CollectionWithPagingInfo<Favourite> getFavourites(String personId, final Parameters parameters); CollectionWithPagingInfo<Favourite> getFavourites(String personId, final Parameters parameters);
/** /**
* Get a specific favourite for user personId * Get a specific favourite for user personId
* *
* @param personId the personId for which the favourite is to be removed * @param personId the personId for which the favourite is to be removed
* @param favouriteId the favourite id * @param favouriteId the favourite id
* @return the favourite * @return the favourite
*/ */
Favourite getFavourite(String personId, String favouriteId); Favourite getFavourite(String personId, String favouriteId);
/** /**

View File

@@ -49,12 +49,12 @@ RelationshipResourceAction.Create<Favourite>, RelationshipResourceAction.Delete
private Favourites favourites; private Favourites favourites;
public void setFavourites(Favourites favourites) public void setFavourites(Favourites favourites)
{ {
this.favourites = favourites; this.favourites = favourites;
} }
@Override @Override
public void afterPropertiesSet() public void afterPropertiesSet()
{ {
ParameterCheck.mandatory("favourites", this.favourites); ParameterCheck.mandatory("favourites", this.favourites);
@@ -72,34 +72,34 @@ RelationshipResourceAction.Create<Favourite>, RelationshipResourceAction.Delete
return favourites.getFavourites(personId, parameters); return favourites.getFavourites(personId, parameters);
} }
/** /**
* Adds the given site as a favourite site for the user. * Adds the given site as a favourite site for the user.
* *
* @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.Create#create(String, java.util.List, org.alfresco.rest.framework.resource.parameters.Parameters) * @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.Create#create(String, java.util.List, org.alfresco.rest.framework.resource.parameters.Parameters)
*/ */
@Override @Override
@WebApiDescription(title = "Add Person Favorite", description = "Favorite something") @WebApiDescription(title = "Add Person Favorite", description = "Favorite something")
public List<Favourite> create(String personId, List<Favourite> entity, Parameters parameters) public List<Favourite> create(String personId, List<Favourite> entity, Parameters parameters)
{ {
List<Favourite> ret = new ArrayList<Favourite>(entity.size()); List<Favourite> ret = new ArrayList<Favourite>(entity.size());
for(Favourite favourite : entity) for(Favourite favourite : entity)
{ {
ret.add(favourites.addFavourite(personId, favourite, parameters)); ret.add(favourites.addFavourite(personId, favourite, parameters));
} }
return ret; return ret;
} }
@Override @Override
@WebApiDescription(title = "Remove Person Favorite", description = "Un-favorite something") @WebApiDescription(title = "Remove Person Favorite", description = "Un-favorite something")
public void delete(String personId, String id, Parameters parameters) public void delete(String personId, String id, Parameters parameters)
{ {
favourites.removeFavourite(personId, id); favourites.removeFavourite(personId, id);
} }
@Override @Override
public Favourite readById(String personId, String favouriteId, Parameters parameters) public Favourite readById(String personId, String favouriteId, Parameters parameters)
throws RelationshipResourceNotFoundException throws RelationshipResourceNotFoundException
{ {
return favourites.getFavourite(personId, favouriteId, parameters); return favourites.getFavourite(personId, favouriteId, parameters);
} }
} }

View File

@@ -49,127 +49,127 @@ import org.json.simple.JSONObject;
*/ */
public class FavouriteDocument extends FavouriteNode implements ExpectedComparison, JSONAble public class FavouriteDocument extends FavouriteNode implements ExpectedComparison, JSONAble
{ {
private static final long serialVersionUID = -5890002728061039516L; private static final long serialVersionUID = -5890002728061039516L;
private String mimeType; private String mimeType;
private BigInteger sizeInBytes; private BigInteger sizeInBytes;
private String versionLabel; private String versionLabel;
/** /**
* For POSTs * For POSTs
* @param guid String * @param guid String
*/ */
public FavouriteDocument(String guid) public FavouriteDocument(String guid)
{ {
super(guid); super(guid);
} }
public FavouriteDocument(String id, String guid) public FavouriteDocument(String id, String guid)
{ {
super(id, guid); super(id, guid);
} }
// public Document(String id, String guid, Map<String, Serializable> properties) // public Document(String id, String guid, Map<String, Serializable> properties)
// { // {
// super(id, guid, properties); // super(id, guid, properties);
// } // }
public static FavouriteDocument getDocument(String id, String guid, Properties props) public static FavouriteDocument getDocument(String id, String guid, Properties props)
{ {
FavouriteDocument document = new FavouriteDocument(id, guid); FavouriteDocument document = new FavouriteDocument(id, guid);
Map<String, PropertyData<?>> properties = props.getProperties(); Map<String, PropertyData<?>> properties = props.getProperties();
document.setName((String)properties.get(PropertyIds.NAME).getFirstValue()); document.setName((String)properties.get(PropertyIds.NAME).getFirstValue());
document.setTitle((String)properties.get(ContentModel.PROP_TITLE.toString()).getFirstValue()); document.setTitle((String)properties.get(ContentModel.PROP_TITLE.toString()).getFirstValue());
document.setCreatedBy((String)properties.get(PropertyIds.CREATED_BY).getFirstValue()); document.setCreatedBy((String)properties.get(PropertyIds.CREATED_BY).getFirstValue());
document.setModifiedBy((String)properties.get(PropertyIds.LAST_MODIFIED_BY).getFirstValue()); document.setModifiedBy((String)properties.get(PropertyIds.LAST_MODIFIED_BY).getFirstValue());
GregorianCalendar modifiedAt = (GregorianCalendar)properties.get(PropertyIds.LAST_MODIFICATION_DATE).getFirstValue(); GregorianCalendar modifiedAt = (GregorianCalendar)properties.get(PropertyIds.LAST_MODIFICATION_DATE).getFirstValue();
document.setModifiedAt(modifiedAt.getTime()); document.setModifiedAt(modifiedAt.getTime());
GregorianCalendar createdAt = (GregorianCalendar)properties.get(PropertyIds.CREATION_DATE).getFirstValue(); GregorianCalendar createdAt = (GregorianCalendar)properties.get(PropertyIds.CREATION_DATE).getFirstValue();
document.setCreatedAt(createdAt.getTime()); document.setCreatedAt(createdAt.getTime());
//document.setDescription((String)props.get(PropertyIds.DE).getFirstValue()); //document.setDescription((String)props.get(PropertyIds.DE).getFirstValue());
document.setMimeType((String)properties.get(PropertyIds.CONTENT_STREAM_MIME_TYPE).getFirstValue()); document.setMimeType((String)properties.get(PropertyIds.CONTENT_STREAM_MIME_TYPE).getFirstValue());
document.setSizeInBytes((BigInteger)properties.get(PropertyIds.CONTENT_STREAM_LENGTH).getFirstValue()); document.setSizeInBytes((BigInteger)properties.get(PropertyIds.CONTENT_STREAM_LENGTH).getFirstValue());
document.setVersionLabel((String)properties.get(PropertyIds.VERSION_LABEL).getFirstValue()); document.setVersionLabel((String)properties.get(PropertyIds.VERSION_LABEL).getFirstValue());
return document; return document;
} }
public String getMimeType() public String getMimeType()
{ {
return mimeType; return mimeType;
} }
public BigInteger getSizeInBytes() public BigInteger getSizeInBytes()
{ {
return sizeInBytes; return sizeInBytes;
} }
public String getVersionLabel() public String getVersionLabel()
{ {
return versionLabel; return versionLabel;
} }
public void setMimeType(String mimeType) public void setMimeType(String mimeType)
{ {
this.mimeType = mimeType; this.mimeType = mimeType;
} }
public void setSizeInBytes(BigInteger sizeInBytes) public void setSizeInBytes(BigInteger sizeInBytes)
{ {
this.sizeInBytes = sizeInBytes; this.sizeInBytes = sizeInBytes;
} }
public void setVersionLabel(String versionLabel) public void setVersionLabel(String versionLabel)
{ {
this.versionLabel = versionLabel; this.versionLabel = versionLabel;
} }
public JSONObject toJSON() public JSONObject toJSON()
{ {
JSONObject json = super.toJSON(); JSONObject json = super.toJSON();
return json; return json;
} }
@Override @Override
public void expected(Object o) public void expected(Object o)
{ {
super.expected(o); super.expected(o);
assertTrue(o instanceof FavouriteDocument); assertTrue(o instanceof FavouriteDocument);
FavouriteDocument other = (FavouriteDocument)o; FavouriteDocument other = (FavouriteDocument)o;
AssertUtil.assertEquals("mimeType", mimeType, other.getMimeType()); AssertUtil.assertEquals("mimeType", mimeType, other.getMimeType());
AssertUtil.assertEquals("sizeInBytes", sizeInBytes, other.getSizeInBytes()); AssertUtil.assertEquals("sizeInBytes", sizeInBytes, other.getSizeInBytes());
AssertUtil.assertEquals("versionLabel", versionLabel, other.getVersionLabel()); AssertUtil.assertEquals("versionLabel", versionLabel, other.getVersionLabel());
} }
public static FavouriteDocument parseDocument(JSONObject jsonObject) throws ParseException public static FavouriteDocument parseDocument(JSONObject jsonObject) throws ParseException
{ {
String id = (String)jsonObject.get("id"); String id = (String)jsonObject.get("id");
String guid = (String)jsonObject.get("guid"); String guid = (String)jsonObject.get("guid");
String name = (String)jsonObject.get("name"); String name = (String)jsonObject.get("name");
String title = (String)jsonObject.get("title"); String title = (String)jsonObject.get("title");
String description = (String)jsonObject.get("description"); String description = (String)jsonObject.get("description");
Date createdAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("createdAt")); Date createdAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("createdAt"));
Date modifiedAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("modifiedAt")); Date modifiedAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("modifiedAt"));
String createdBy = (String)jsonObject.get("createdBy"); String createdBy = (String)jsonObject.get("createdBy");
String modifiedBy = (String)jsonObject.get("modifiedBy"); String modifiedBy = (String)jsonObject.get("modifiedBy");
String mimeType = (String)jsonObject.get("mimeType"); String mimeType = (String)jsonObject.get("mimeType");
Long sizeInBytes = (Long)jsonObject.get("sizeInBytes"); Long sizeInBytes = (Long)jsonObject.get("sizeInBytes");
String versionLabel = (String)jsonObject.get("versionLabel"); String versionLabel = (String)jsonObject.get("versionLabel");
FavouriteDocument document = new FavouriteDocument(id, guid); FavouriteDocument document = new FavouriteDocument(id, guid);
document.setName(name); document.setName(name);
document.setTitle(title); document.setTitle(title);
document.setCreatedBy(createdBy); document.setCreatedBy(createdBy);
document.setModifiedBy(modifiedBy); document.setModifiedBy(modifiedBy);
document.setModifiedAt(modifiedAt); document.setModifiedAt(modifiedAt);
document.setCreatedAt(createdAt); document.setCreatedAt(createdAt);
document.setDescription(description); document.setDescription(description);
document.setMimeType(mimeType); document.setMimeType(mimeType);
document.setSizeInBytes(BigInteger.valueOf(sizeInBytes)); document.setSizeInBytes(BigInteger.valueOf(sizeInBytes));
document.setVersionLabel(versionLabel); document.setVersionLabel(versionLabel);
// set path if available // set path if available
document.parseAndSetPath(jsonObject); document.parseAndSetPath(jsonObject);
return document; return document;

View File

@@ -46,80 +46,80 @@ import org.json.simple.JSONObject;
*/ */
public class FavouriteFolder extends FavouriteNode implements ExpectedComparison, JSONAble public class FavouriteFolder extends FavouriteNode implements ExpectedComparison, JSONAble
{ {
private static final long serialVersionUID = 5020819866533183524L; private static final long serialVersionUID = 5020819866533183524L;
/** /**
* For POSTs * For POSTs
* @param guid String * @param guid String
*/ */
public FavouriteFolder(String guid) public FavouriteFolder(String guid)
{ {
super(guid); super(guid);
} }
public FavouriteFolder(String id, String guid) public FavouriteFolder(String id, String guid)
{ {
super(id, guid); super(id, guid);
} }
// public Folder(String id, String guid, Map<String, Serializable> properties) // public Folder(String id, String guid, Map<String, Serializable> properties)
// { // {
// super(id, guid, properties); // super(id, guid, properties);
// } // }
public static FavouriteFolder getFolder(String id, String guid, Properties props) public static FavouriteFolder getFolder(String id, String guid, Properties props)
{ {
FavouriteFolder folder = new FavouriteFolder(id, guid); FavouriteFolder folder = new FavouriteFolder(id, guid);
Map<String, PropertyData<?>> properties = props.getProperties(); Map<String, PropertyData<?>> properties = props.getProperties();
folder.setName((String)properties.get(PropertyIds.NAME).getFirstValue()); folder.setName((String)properties.get(PropertyIds.NAME).getFirstValue());
folder.setTitle((String)properties.get(ContentModel.PROP_TITLE.toString()).getFirstValue()); folder.setTitle((String)properties.get(ContentModel.PROP_TITLE.toString()).getFirstValue());
folder.setCreatedBy((String)properties.get(PropertyIds.CREATED_BY).getFirstValue()); folder.setCreatedBy((String)properties.get(PropertyIds.CREATED_BY).getFirstValue());
folder.setModifiedBy((String)properties.get(PropertyIds.LAST_MODIFIED_BY).getFirstValue()); folder.setModifiedBy((String)properties.get(PropertyIds.LAST_MODIFIED_BY).getFirstValue());
GregorianCalendar modifiedAt = (GregorianCalendar)properties.get(PropertyIds.LAST_MODIFICATION_DATE).getFirstValue(); GregorianCalendar modifiedAt = (GregorianCalendar)properties.get(PropertyIds.LAST_MODIFICATION_DATE).getFirstValue();
folder.setModifiedAt(modifiedAt.getTime()); folder.setModifiedAt(modifiedAt.getTime());
GregorianCalendar createdAt = (GregorianCalendar)properties.get(PropertyIds.CREATION_DATE).getFirstValue(); GregorianCalendar createdAt = (GregorianCalendar)properties.get(PropertyIds.CREATION_DATE).getFirstValue();
folder.setCreatedAt(createdAt.getTime()); folder.setCreatedAt(createdAt.getTime());
//document.setDescription((String)props.get(PropertyIds.DE).getFirstValue()); //document.setDescription((String)props.get(PropertyIds.DE).getFirstValue());
return folder; return folder;
} }
public JSONObject toJSON() public JSONObject toJSON()
{ {
JSONObject json = super.toJSON(); JSONObject json = super.toJSON();
return json; return json;
} }
public static FavouriteFolder parseFolder(JSONObject jsonObject) throws ParseException public static FavouriteFolder parseFolder(JSONObject jsonObject) throws ParseException
{ {
String id = (String)jsonObject.get("id"); String id = (String)jsonObject.get("id");
String guid = (String)jsonObject.get("guid"); String guid = (String)jsonObject.get("guid");
String name = (String)jsonObject.get("name"); String name = (String)jsonObject.get("name");
String title = (String)jsonObject.get("title"); String title = (String)jsonObject.get("title");
String description = (String)jsonObject.get("description"); String description = (String)jsonObject.get("description");
Date createdAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("createdAt")); Date createdAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("createdAt"));
Date modifiedAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("modifiedAt")); Date modifiedAt = PublicApiDateFormat.getDateFormat().parse((String)jsonObject.get("modifiedAt"));
String createdBy = (String)jsonObject.get("createdBy"); String createdBy = (String)jsonObject.get("createdBy");
String modifiedBy = (String)jsonObject.get("modifiedBy"); String modifiedBy = (String)jsonObject.get("modifiedBy");
FavouriteFolder folder = new FavouriteFolder(id, guid); FavouriteFolder folder = new FavouriteFolder(id, guid);
folder.setName(name); folder.setName(name);
folder.setTitle(title); folder.setTitle(title);
folder.setCreatedBy(createdBy); folder.setCreatedBy(createdBy);
folder.setModifiedBy(modifiedBy); folder.setModifiedBy(modifiedBy);
folder.setModifiedAt(modifiedAt); folder.setModifiedAt(modifiedAt);
folder.setCreatedAt(createdAt); folder.setCreatedAt(createdAt);
folder.setDescription(description); folder.setDescription(description);
// set path if available // set path if available
folder.parseAndSetPath(jsonObject); folder.parseAndSetPath(jsonObject);
return folder; return folder;
} }
@Override @Override
public void expected(Object o) public void expected(Object o)
{ {
super.expected(o); super.expected(o);
} }
@Override @Override
public String toString() public String toString()

View File

@@ -43,138 +43,138 @@ import org.json.simple.JSONObject;
*/ */
public class FavouriteNode implements Serializable, ExpectedComparison public class FavouriteNode implements Serializable, ExpectedComparison
{ {
private static final long serialVersionUID = -6881545732441221372L; private static final long serialVersionUID = -6881545732441221372L;
protected String nodeId; protected String nodeId;
protected String guid; protected String guid;
protected String name; protected String name;
protected String title; protected String title;
protected String description; protected String description;
protected Date createdAt; protected Date createdAt;
protected Date modifiedAt; protected Date modifiedAt;
protected String createdBy; protected String createdBy;
protected String modifiedBy; protected String modifiedBy;
protected PathInfo path; protected PathInfo path;
public FavouriteNode() public FavouriteNode()
{ {
} }
/** /**
* For POSTs * For POSTs
* *
* @param guid String * @param guid String
*/ */
public FavouriteNode(String guid) public FavouriteNode(String guid)
{ {
this.guid = guid; this.guid = guid;
} }
public FavouriteNode(String id, String guid) public FavouriteNode(String id, String guid)
{ {
this.nodeId = id; this.nodeId = id;
this.guid = guid; this.guid = guid;
} }
public void setGuid(String guid) public void setGuid(String guid)
{ {
this.guid = guid; this.guid = guid;
} }
public String getGuid() public String getGuid()
{ {
return guid; return guid;
} }
public String getRawNodeId() public String getRawNodeId()
{ {
return nodeId; return nodeId;
} }
public String getNodeId() public String getNodeId()
{ {
return nodeId; return nodeId;
} }
public boolean isFolder() public boolean isFolder()
{ {
return false; return false;
} }
public String getName() public String getName()
{ {
return name; return name;
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name;
} }
public String getTitle() public String getTitle()
{ {
return title; return title;
} }
public void setTitle(String title) public void setTitle(String title)
{ {
this.title = title; this.title = title;
} }
public String getDescription() public String getDescription()
{ {
return description; return description;
} }
public void setDescription(String description) public void setDescription(String description)
{ {
this.description = description; this.description = description;
} }
public Date getCreatedAt() public Date getCreatedAt()
{ {
return createdAt; return createdAt;
} }
public void setCreatedAt(Date createdAt) public void setCreatedAt(Date createdAt)
{ {
this.createdAt = createdAt; this.createdAt = createdAt;
} }
public Date getModifiedAt() public Date getModifiedAt()
{ {
return modifiedAt; return modifiedAt;
} }
public void setModifiedAt(Date modifiedAt) public void setModifiedAt(Date modifiedAt)
{ {
this.modifiedAt = modifiedAt; this.modifiedAt = modifiedAt;
} }
public String getCreatedBy() public String getCreatedBy()
{ {
return createdBy; return createdBy;
} }
public void setCreatedBy(String createdBy) public void setCreatedBy(String createdBy)
{ {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
public String getModifiedBy() public String getModifiedBy()
{ {
return modifiedBy; return modifiedBy;
} }
public void setModifiedBy(String modifiedBy) public void setModifiedBy(String modifiedBy)
{ {
this.modifiedBy = modifiedBy; this.modifiedBy = modifiedBy;
} }
public void setNodeId(String nodeId) public void setNodeId(String nodeId)
{ {
this.nodeId = nodeId; this.nodeId = nodeId;
} }
public PathInfo getPath() public PathInfo getPath()
{ {
@@ -203,66 +203,66 @@ public class FavouriteNode implements Serializable, ExpectedComparison
} }
@Override @Override
public int hashCode() public int hashCode()
{ {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode()); result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
return result; return result;
} }
@Override @Override
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
if (this == obj) if (this == obj)
return true; return true;
if (obj == null) if (obj == null)
return false; return false;
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
FavouriteNode other = (FavouriteNode) obj; FavouriteNode other = (FavouriteNode) obj;
if (nodeId == null) if (nodeId == null)
{ {
if (other.nodeId != null) if (other.nodeId != null)
return false; return false;
} else if (!nodeId.equals(other.nodeId)) } else if (!nodeId.equals(other.nodeId))
return false; return false;
return true; return true;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public JSONObject toJSON() public JSONObject toJSON()
{ {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("guid", getGuid()); json.put("guid", getGuid());
json.put("id", getNodeId()); json.put("id", getNodeId());
return json; return json;
} }
@Override @Override
public void expected(Object o) public void expected(Object o)
{ {
assertTrue(o instanceof FavouriteNode); assertTrue(o instanceof FavouriteNode);
FavouriteNode other = (FavouriteNode) o; FavouriteNode other = (FavouriteNode) o;
AssertUtil.assertEquals("id", nodeId, other.getNodeId()); AssertUtil.assertEquals("id", nodeId, other.getNodeId());
AssertUtil.assertEquals("guid", guid, other.getGuid()); AssertUtil.assertEquals("guid", guid, other.getGuid());
AssertUtil.assertEquals("name", name, other.getName()); AssertUtil.assertEquals("name", name, other.getName());
AssertUtil.assertEquals("title", title, other.getTitle()); AssertUtil.assertEquals("title", title, other.getTitle());
AssertUtil.assertEquals("description", description, other.getDescription()); AssertUtil.assertEquals("description", description, other.getDescription());
AssertUtil.assertEquals("createdAt", createdAt, other.getCreatedAt()); AssertUtil.assertEquals("createdAt", createdAt, other.getCreatedAt());
if(modifiedAt != null) if(modifiedAt != null)
{ {
assertTrue(modifiedAt.before(other.getModifiedAt()) || modifiedAt.equals(other.getModifiedAt())); assertTrue(modifiedAt.before(other.getModifiedAt()) || modifiedAt.equals(other.getModifiedAt()));
} }
AssertUtil.assertEquals("createdBy", createdBy, other.getCreatedBy()); AssertUtil.assertEquals("createdBy", createdBy, other.getCreatedBy());
AssertUtil.assertEquals("modifiedBy", modifiedBy, other.getModifiedBy()); AssertUtil.assertEquals("modifiedBy", modifiedBy, other.getModifiedBy());
if(path != null) if(path != null)
{ {
path.expected(other.path); path.expected(other.path);
} }
} }
@Override @Override
public String toString() public String toString()