mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-9155 Canned query for links and wiki finding
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29524 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
package org.alfresco.repo.query;
|
||||
|
||||
import org.alfresco.repo.domain.node.NodeEntity;
|
||||
import org.alfresco.repo.security.permissions.PermissionCheckValue;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
@@ -28,13 +29,16 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
* @author Nick Burch
|
||||
* @since 4.0
|
||||
*/
|
||||
public abstract class NodeBackedEntity
|
||||
public class NodeBackedEntity implements PermissionCheckValue
|
||||
{
|
||||
private Long id; // node id
|
||||
|
||||
private String name;
|
||||
private NodeEntity node;
|
||||
|
||||
private String name;
|
||||
// Supplemental query-related parameters
|
||||
private Long parentNodeId;
|
||||
private Long nameQNameId;
|
||||
private Long contentTypeQNameId;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
@@ -43,6 +47,16 @@ public abstract class NodeBackedEntity
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Query constructor
|
||||
*/
|
||||
public NodeBackedEntity(Long parentNodeId, Long nameQNameId, Long contentTypeQNameId)
|
||||
{
|
||||
this.parentNodeId = parentNodeId;
|
||||
this.nameQNameId = nameQNameId;
|
||||
this.contentTypeQNameId = contentTypeQNameId;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
@@ -71,6 +85,18 @@ public abstract class NodeBackedEntity
|
||||
return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreator() : null);
|
||||
}
|
||||
|
||||
// helper (ISO 8061)
|
||||
public String getModifiedDate()
|
||||
{
|
||||
return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditModified() : null);
|
||||
}
|
||||
|
||||
// helper
|
||||
public String getModifier()
|
||||
{
|
||||
return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditModifier() : null);
|
||||
}
|
||||
|
||||
public NodeEntity getNode()
|
||||
{
|
||||
return node;
|
||||
@@ -90,4 +116,22 @@ public abstract class NodeBackedEntity
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
// Supplemental query-related parameters
|
||||
|
||||
public Long getParentNodeId()
|
||||
{
|
||||
return parentNodeId;
|
||||
}
|
||||
|
||||
public Long getNameQNameId()
|
||||
{
|
||||
return nameQNameId;
|
||||
}
|
||||
|
||||
public Long getContentTypeQNameId()
|
||||
{
|
||||
return contentTypeQNameId;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user