mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
93 lines
2.2 KiB
Java
93 lines
2.2 KiB
Java
package org.alfresco.repo.discussion.cannedqueries;
|
|
|
|
import java.util.List;
|
|
|
|
import org.alfresco.repo.domain.node.NodeEntity;
|
|
import org.alfresco.repo.query.NodeBackedEntity;
|
|
|
|
/**
|
|
* An extension of a {@link NodeEntity} which has the name
|
|
* of all children of it, used with the discussions
|
|
* canned queries.
|
|
* As well as the name comes some auditable information, but
|
|
* not full nodes as we don't do permissions checking on
|
|
* the children.
|
|
*
|
|
* @author Nick Burch
|
|
* @since 4.0
|
|
*/
|
|
public class NodeWithChildrenEntity extends NodeBackedEntity
|
|
{
|
|
private List<NameAndCreatedAt> children;
|
|
|
|
// Supplemental query-related parameters
|
|
private Long childrenTypeQNameId;
|
|
|
|
/**
|
|
* Default constructor
|
|
*/
|
|
public NodeWithChildrenEntity()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Query constructor
|
|
*/
|
|
public NodeWithChildrenEntity(Long parentNodeId, Long nameQNameId, Long contentTypeQNameId, Long childrenTypeQNameId)
|
|
{
|
|
super(parentNodeId, nameQNameId, contentTypeQNameId);
|
|
this.childrenTypeQNameId = childrenTypeQNameId;
|
|
}
|
|
|
|
/**
|
|
* @return Child Node name+created at
|
|
*/
|
|
public List<NameAndCreatedAt> getChildren()
|
|
{
|
|
return children;
|
|
}
|
|
|
|
public void setChildren(List<NameAndCreatedAt> children)
|
|
{
|
|
this.children = children;
|
|
}
|
|
|
|
/**
|
|
* If set, the ID of the children's content type to limit
|
|
* the children too.
|
|
*/
|
|
public Long getChildrenTypeQNameId()
|
|
{
|
|
return childrenTypeQNameId;
|
|
}
|
|
|
|
public static class NameAndCreatedAt
|
|
{
|
|
private final Long nodeId;
|
|
private final String name;
|
|
private final String createdAt;
|
|
|
|
public NameAndCreatedAt(Long nodeId, String name, String createdAt)
|
|
{
|
|
this.nodeId = nodeId;
|
|
this.name = name;
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public Long getNodeId()
|
|
{
|
|
return nodeId;
|
|
}
|
|
|
|
public String getName()
|
|
{
|
|
return name;
|
|
}
|
|
|
|
public String getCreatedAt()
|
|
{
|
|
return createdAt;
|
|
}
|
|
}
|
|
}
|