diff --git a/source/java/org/alfresco/repo/blog/cannedqueries/AbstractBlogPostsCannedQueryFactory.java b/source/java/org/alfresco/repo/blog/cannedqueries/AbstractBlogPostsCannedQueryFactory.java index 6c48420a56..e0b52989ae 100644 --- a/source/java/org/alfresco/repo/blog/cannedqueries/AbstractBlogPostsCannedQueryFactory.java +++ b/source/java/org/alfresco/repo/blog/cannedqueries/AbstractBlogPostsCannedQueryFactory.java @@ -24,132 +24,26 @@ import java.util.List; import org.alfresco.model.BlogIntegrationModel; import org.alfresco.model.ContentModel; -import org.alfresco.query.AbstractCannedQueryFactory; -import org.alfresco.query.CannedQueryPageDetails; import org.alfresco.query.CannedQuerySortDetails; -import org.alfresco.query.PagingRequest; import org.alfresco.query.CannedQuerySortDetails.SortOrder; -import org.alfresco.repo.domain.node.NodeDAO; -import org.alfresco.repo.domain.qname.QNameDAO; -import org.alfresco.repo.domain.query.CannedQueryDAO; -import org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityBean; -import org.alfresco.repo.tenant.TenantService; +import org.alfresco.repo.query.AbstractQNameAwareCannedQueryFactory; import org.alfresco.service.cmr.blog.BlogService.BlogPostInfo; -import org.alfresco.service.cmr.repository.InvalidNodeRefException; -import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair; -import org.alfresco.util.PropertyCheck; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; /** * * @author Neil Mc Erlean, janv * @since 4.0 */ -public abstract class AbstractBlogPostsCannedQueryFactory extends AbstractCannedQueryFactory +public abstract class AbstractBlogPostsCannedQueryFactory extends AbstractQNameAwareCannedQueryFactory { - private Log logger = LogFactory.getLog(getClass()); - - protected MethodSecurityBean methodSecurity; - protected NodeDAO nodeDAO; - protected QNameDAO qnameDAO; - protected CannedQueryDAO cannedQueryDAO; - protected TenantService tenantService; - - public void setNodeDAO(NodeDAO nodeDAO) - { - this.nodeDAO = nodeDAO; - } - - public void setQnameDAO(QNameDAO qnameDAO) - { - this.qnameDAO = qnameDAO; - } - - public void setCannedQueryDAO(CannedQueryDAO cannedQueryDAO) - { - this.cannedQueryDAO = cannedQueryDAO; - } - - public void setTenantService(TenantService tenantService) - { - this.tenantService = tenantService; - } - - public void setMethodSecurity(MethodSecurityBean methodSecurity) - { - this.methodSecurity = methodSecurity; - } - protected CannedQuerySortDetails createCQSortDetails(QName sortProp, SortOrder sortOrder) { List> singlePair = new ArrayList>(1); singlePair.add(new Pair(sortProp, sortOrder)); - return this.createCQSortDetails(singlePair); - } - - protected CannedQuerySortDetails createCQSortDetails(List> sortPairs) - { - CannedQuerySortDetails cqsd = new CannedQuerySortDetails(sortPairs); - return cqsd; - } - - protected CannedQueryPageDetails createCQPageDetails(PagingRequest pagingReq) - { - int skipCount = pagingReq.getSkipCount(); - if (skipCount == -1) - { - skipCount = CannedQueryPageDetails.DEFAULT_SKIP_RESULTS; - } - - int maxItems = pagingReq.getMaxItems(); - if (maxItems == -1) - { - maxItems = CannedQueryPageDetails.DEFAULT_PAGE_SIZE; - } - - // page details - CannedQueryPageDetails cqpd = new CannedQueryPageDetails(skipCount, maxItems); - return cqpd; - } - - protected Long getQNameId(QName qname) - { - Pair qnamePair = qnameDAO.getQName(qname); - if (qnamePair == null) - { - if (logger.isTraceEnabled()) - { - logger.trace("QName does not exist: " + qname); // possible ... eg. blg:blogPost if a blog has never been posted externally - } - return null; - } - return qnamePair.getFirst(); - } - - protected Long getNodeId(NodeRef nodeRef) - { - Pair nodePair = nodeDAO.getNodePair(tenantService.getName(nodeRef)); - if (nodePair == null) - { - throw new InvalidNodeRefException("Node ref does not exist: " + nodeRef, nodeRef); - } - return nodePair.getFirst(); - } - - @Override - public void afterPropertiesSet() throws Exception - { - super.afterPropertiesSet(); - - PropertyCheck.mandatory(this, "methodSecurity", methodSecurity); - PropertyCheck.mandatory(this, "nodeDAO", nodeDAO); - PropertyCheck.mandatory(this, "qnameDAO", qnameDAO); - PropertyCheck.mandatory(this, "cannedQueryDAO", cannedQueryDAO); - PropertyCheck.mandatory(this, "tenantService", tenantService); + return new CannedQuerySortDetails(singlePair); } /** diff --git a/source/java/org/alfresco/repo/blog/cannedqueries/BlogEntity.java b/source/java/org/alfresco/repo/blog/cannedqueries/BlogEntity.java index a8d2500020..3c6f8c51c5 100644 --- a/source/java/org/alfresco/repo/blog/cannedqueries/BlogEntity.java +++ b/source/java/org/alfresco/repo/blog/cannedqueries/BlogEntity.java @@ -18,8 +18,7 @@ */ package org.alfresco.repo.blog.cannedqueries; -import org.alfresco.repo.domain.node.NodeEntity; -import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.repo.query.NodeBackedEntity; /** * Blog Entity - used by GetBlogs CQ @@ -27,14 +26,8 @@ import org.alfresco.service.cmr.repository.NodeRef; * @author janv * @since 4.0 */ -public class BlogEntity +public class BlogEntity extends NodeBackedEntity { - private Long id; // node id - - private NodeEntity node; - - private String name; - private String publishedDate; private String postedDate; @@ -52,10 +45,12 @@ public class BlogEntity */ public BlogEntity() { + super(); } public BlogEntity(Long parentNodeId, Long nameQNameId, Long publishedQNameId, Long contentTypeQNameId, Long blogIntAspectQNameId, Long blogIntPostedQNameId) { + super(); this.parentNodeId = parentNodeId; this.nameQNameId = nameQNameId; this.publishedQNameId = publishedQNameId; @@ -65,54 +60,6 @@ public class BlogEntity this.blogIntPostedQNameId = blogIntPostedQNameId; } - public Long getId() - { - return id; - } - - public void setId(Long id) - { - this.id = id; - } - - // helper - public NodeRef getNodeRef() - { - return (node != null ? node.getNodeRef() : null); - } - - // helper (ISO 8061) - public String getCreatedDate() - { - return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreated() : null); - } - - // helper - public String getCreator() - { - return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreator() : null); - } - - public NodeEntity getNode() - { - return node; - } - - public void setNode(NodeEntity childNode) - { - this.node = childNode; - } - - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - // (ISO-8061) public String getPublishedDate() { diff --git a/source/java/org/alfresco/repo/blog/cannedqueries/DraftsAndPublishedBlogPostsCannedQueryFactory.java b/source/java/org/alfresco/repo/blog/cannedqueries/DraftsAndPublishedBlogPostsCannedQueryFactory.java index a9a6924912..fec4ee0e89 100644 --- a/source/java/org/alfresco/repo/blog/cannedqueries/DraftsAndPublishedBlogPostsCannedQueryFactory.java +++ b/source/java/org/alfresco/repo/blog/cannedqueries/DraftsAndPublishedBlogPostsCannedQueryFactory.java @@ -29,7 +29,6 @@ import org.alfresco.query.CannedQueryPageDetails; import org.alfresco.query.CannedQueryParameters; import org.alfresco.query.CannedQuerySortDetails; import org.alfresco.query.PagingRequest; -import org.alfresco.query.CannedQuerySortDetails.SortOrder; import org.alfresco.service.cmr.blog.BlogService.BlogPostInfo; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; @@ -72,12 +71,12 @@ public class DraftsAndPublishedBlogPostsCannedQueryFactory extends AbstractBlogP CannedQueryPageDetails cqpd = createCQPageDetails(pagingReq); - List> sortPairs = new ArrayList>(2); + List> sortPairs = new ArrayList>(2); // Sort by created then published. We want a list of all published (most recently published first), // followed by all unpublished (most recently created first) - sortPairs.add(new Pair(ContentModel.PROP_CREATED, SortOrder.DESCENDING)); - sortPairs.add(new Pair(ContentModel.PROP_PUBLISHED, SortOrder.DESCENDING)); + sortPairs.add(new Pair(ContentModel.PROP_CREATED, Boolean.FALSE)); + sortPairs.add(new Pair(ContentModel.PROP_PUBLISHED, Boolean.FALSE)); CannedQuerySortDetails cqsd = createCQSortDetails(sortPairs); diff --git a/source/java/org/alfresco/repo/calendar/cannedqueries/CalendarEntity.java b/source/java/org/alfresco/repo/calendar/cannedqueries/CalendarEntity.java index e98fd3bc2b..0457e782fd 100644 --- a/source/java/org/alfresco/repo/calendar/cannedqueries/CalendarEntity.java +++ b/source/java/org/alfresco/repo/calendar/cannedqueries/CalendarEntity.java @@ -18,9 +18,8 @@ */ package org.alfresco.repo.calendar.cannedqueries; -import org.alfresco.repo.domain.node.NodeEntity; +import org.alfresco.repo.query.NodeBackedEntity; import org.alfresco.service.cmr.calendar.CalendarEntry; -import org.alfresco.service.cmr.repository.NodeRef; /** * Calendar Entity - low level representation of parts of a @@ -29,14 +28,8 @@ import org.alfresco.service.cmr.repository.NodeRef; * @author Nick Burch * @since 4.0 */ -public class CalendarEntity +public class CalendarEntity extends NodeBackedEntity { - private Long id; // node id - - private NodeEntity node; - - private String name; - private String fromDate; private String toDate; private String recurrenceRule; @@ -56,12 +49,14 @@ public class CalendarEntity */ public CalendarEntity() { + super(); } public CalendarEntity(Long parentNodeId, Long nameQNameId, Long contentTypeQNameId, Long fromDateQNameId, Long toDateQNameId, Long recurrenceRuleQNameId, Long recurrenceLastMeetingQNameId) { + super(); this.parentNodeId = parentNodeId; this.nameQNameId = nameQNameId; this.contentTypeQNameId = contentTypeQNameId; @@ -71,54 +66,6 @@ public class CalendarEntity this.recurrenceLastMeetingQNameId = recurrenceLastMeetingQNameId; } - public Long getId() - { - return id; - } - - public void setId(Long id) - { - this.id = id; - } - - // helper - public NodeRef getNodeRef() - { - return (node != null ? node.getNodeRef() : null); - } - - // helper (ISO 8061) - public String getCreatedDate() - { - return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreated() : null); - } - - // helper - public String getCreator() - { - return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreator() : null); - } - - public NodeEntity getNode() - { - return node; - } - - public void setNode(NodeEntity childNode) - { - this.node = childNode; - } - - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - // (ISO-8061) public String getFromDate() { diff --git a/source/java/org/alfresco/repo/calendar/cannedqueries/GetCalendarEntriesCannedQueryFactory.java b/source/java/org/alfresco/repo/calendar/cannedqueries/GetCalendarEntriesCannedQueryFactory.java index 9907671c89..640867d776 100644 --- a/source/java/org/alfresco/repo/calendar/cannedqueries/GetCalendarEntriesCannedQueryFactory.java +++ b/source/java/org/alfresco/repo/calendar/cannedqueries/GetCalendarEntriesCannedQueryFactory.java @@ -23,7 +23,6 @@ import java.util.Date; import java.util.List; import org.alfresco.model.ContentModel; -import org.alfresco.query.AbstractCannedQueryFactory; import org.alfresco.query.CannedQuery; import org.alfresco.query.CannedQueryFactory; import org.alfresco.query.CannedQueryPageDetails; @@ -32,14 +31,9 @@ import org.alfresco.query.CannedQuerySortDetails; import org.alfresco.query.PagingRequest; import org.alfresco.query.CannedQuerySortDetails.SortOrder; import org.alfresco.repo.calendar.CalendarModel; -import org.alfresco.repo.domain.node.NodeDAO; -import org.alfresco.repo.domain.qname.QNameDAO; -import org.alfresco.repo.domain.query.CannedQueryDAO; -import org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityBean; -import org.alfresco.repo.tenant.TenantService; +import org.alfresco.repo.query.AbstractQNameAwareCannedQueryFactory; import org.alfresco.service.cmr.calendar.CalendarEntry; import org.alfresco.service.cmr.calendar.CalendarService; -import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.tagging.TaggingService; @@ -47,8 +41,6 @@ import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair; import org.alfresco.util.ParameterCheck; import org.alfresco.util.PropertyCheck; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; /** * A {@link CannedQueryFactory} for various queries relating to {@link CalendarEntry calendar entries}. @@ -60,65 +52,28 @@ import org.apache.commons.logging.LogFactory; * @see CalendarService#listCalendarEntries(String[], PagingRequest) * @see CalendarService#listCalendarEntries(String[], Date, Date, PagingRequest) */ -public class GetCalendarEntriesCannedQueryFactory extends AbstractCannedQueryFactory +public class GetCalendarEntriesCannedQueryFactory extends AbstractQNameAwareCannedQueryFactory { - private Log logger = LogFactory.getLog(getClass()); - - protected MethodSecurityBean methodSecurity; - protected NodeDAO nodeDAO; - protected QNameDAO qnameDAO; protected NodeService nodeService; - protected TenantService tenantService; protected TaggingService taggingService; - protected CannedQueryDAO cannedQueryDAO; - - public void setNodeDAO(NodeDAO nodeDAO) - { - this.nodeDAO = nodeDAO; - } - - public void setQnameDAO(QNameDAO qnameDAO) - { - this.qnameDAO = qnameDAO; - } - - public void setCannedQueryDAO(CannedQueryDAO cannedQueryDAO) - { - this.cannedQueryDAO = cannedQueryDAO; - } public void setNodeService(NodeService nodeService) { this.nodeService = nodeService; } - public void setTenantService(TenantService tenantService) - { - this.tenantService = tenantService; - } - public void setTaggingService(TaggingService taggingService) { this.taggingService = taggingService; } - public void setMethodSecurity(MethodSecurityBean methodSecurity) - { - this.methodSecurity = methodSecurity; - } - @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); - PropertyCheck.mandatory(this, "methodSecurity", methodSecurity); - PropertyCheck.mandatory(this, "nodeDAO", nodeDAO); - PropertyCheck.mandatory(this, "qnameDAO", qnameDAO); - PropertyCheck.mandatory(this, "cannedQueryDAO", cannedQueryDAO); - PropertyCheck.mandatory(this, "tenantService", tenantService); - PropertyCheck.mandatory(this, "taggingService", taggingService); PropertyCheck.mandatory(this, "nodeService", nodeService); + PropertyCheck.mandatory(this, "taggingService", taggingService); } @Override @@ -175,47 +130,4 @@ public class GetCalendarEntriesCannedQueryFactory extends AbstractCannedQueryFac return new CannedQuerySortDetails(sort); } - - protected CannedQueryPageDetails createCQPageDetails(PagingRequest pagingReq) - { - int skipCount = pagingReq.getSkipCount(); - if (skipCount == -1) - { - skipCount = CannedQueryPageDetails.DEFAULT_SKIP_RESULTS; - } - - int maxItems = pagingReq.getMaxItems(); - if (maxItems == -1) - { - maxItems = CannedQueryPageDetails.DEFAULT_PAGE_SIZE; - } - - // page details - CannedQueryPageDetails cqpd = new CannedQueryPageDetails(skipCount, maxItems); - return cqpd; - } - - protected Long getQNameId(QName qname) - { - Pair qnamePair = qnameDAO.getQName(qname); - if (qnamePair == null) - { - if (logger.isTraceEnabled()) - { - logger.trace("QName does not exist: " + qname); // possible ... eg. blg:blogPost if a blog has never been posted externally - } - return null; - } - return qnamePair.getFirst(); - } - - protected Long getNodeId(NodeRef nodeRef) - { - Pair nodePair = nodeDAO.getNodePair(tenantService.getName(nodeRef)); - if (nodePair == null) - { - throw new InvalidNodeRefException("Node ref does not exist: " + nodeRef, nodeRef); - } - return nodePair.getFirst(); - } } diff --git a/source/java/org/alfresco/repo/query/AbstractQNameAwareCannedQueryFactory.java b/source/java/org/alfresco/repo/query/AbstractQNameAwareCannedQueryFactory.java new file mode 100644 index 0000000000..14aa078852 --- /dev/null +++ b/source/java/org/alfresco/repo/query/AbstractQNameAwareCannedQueryFactory.java @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.query; + +import java.util.ArrayList; +import java.util.List; + +import org.alfresco.query.AbstractCannedQueryFactory; +import org.alfresco.query.CannedQueryPageDetails; +import org.alfresco.query.CannedQuerySortDetails; +import org.alfresco.query.PagingRequest; +import org.alfresco.query.CannedQuerySortDetails.SortOrder; +import org.alfresco.repo.domain.node.NodeDAO; +import org.alfresco.repo.domain.qname.QNameDAO; +import org.alfresco.repo.domain.query.CannedQueryDAO; +import org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityBean; +import org.alfresco.repo.tenant.TenantService; +import org.alfresco.service.cmr.repository.InvalidNodeRefException; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.namespace.QName; +import org.alfresco.util.Pair; +import org.alfresco.util.PropertyCheck; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * An intermediate {@link AbstractCannedQueryFactory} layer, for various + * implementations that need to know about QName IDs and similar + * + * @author Nick Burch + * @since 4.0 + */ +public abstract class AbstractQNameAwareCannedQueryFactory extends AbstractCannedQueryFactory +{ + private Log logger = LogFactory.getLog(getClass()); + + protected MethodSecurityBean methodSecurity; + protected NodeDAO nodeDAO; + protected QNameDAO qnameDAO; + protected TenantService tenantService; + protected CannedQueryDAO cannedQueryDAO; + + public void setNodeDAO(NodeDAO nodeDAO) + { + this.nodeDAO = nodeDAO; + } + + public void setQnameDAO(QNameDAO qnameDAO) + { + this.qnameDAO = qnameDAO; + } + + public void setCannedQueryDAO(CannedQueryDAO cannedQueryDAO) + { + this.cannedQueryDAO = cannedQueryDAO; + } + + public void setTenantService(TenantService tenantService) + { + this.tenantService = tenantService; + } + + public void setMethodSecurity(MethodSecurityBean methodSecurity) + { + this.methodSecurity = methodSecurity; + } + + @Override + public void afterPropertiesSet() throws Exception + { + super.afterPropertiesSet(); + + PropertyCheck.mandatory(this, "methodSecurity", methodSecurity); + PropertyCheck.mandatory(this, "nodeDAO", nodeDAO); + PropertyCheck.mandatory(this, "qnameDAO", qnameDAO); + PropertyCheck.mandatory(this, "cannedQueryDAO", cannedQueryDAO); + PropertyCheck.mandatory(this, "tenantService", tenantService); + } + + /** + * Creates a Canned Query sort details, for the given list of properties + * and if they should be Ascending or Descending + */ + protected CannedQuerySortDetails createCQSortDetails(List> sort) + { + List> details = new ArrayList>(); + for(Pair sortProp : sort) + { + details.add(new Pair( + sortProp.getFirst(), + (sortProp.getSecond() ? SortOrder.ASCENDING : SortOrder.DESCENDING) + )); + } + return new CannedQuerySortDetails(details); + } + + protected CannedQueryPageDetails createCQPageDetails(PagingRequest pagingReq) + { + int skipCount = pagingReq.getSkipCount(); + if (skipCount == -1) + { + skipCount = CannedQueryPageDetails.DEFAULT_SKIP_RESULTS; + } + + int maxItems = pagingReq.getMaxItems(); + if (maxItems == -1) + { + maxItems = CannedQueryPageDetails.DEFAULT_PAGE_SIZE; + } + + // page details + CannedQueryPageDetails cqpd = new CannedQueryPageDetails(skipCount, maxItems); + return cqpd; + } + + protected Long getQNameId(QName qname) + { + Pair qnamePair = qnameDAO.getQName(qname); + if (qnamePair == null) + { + if (logger.isTraceEnabled()) + { + logger.trace("QName does not exist: " + qname); // possible ... eg. blg:blogPost if a blog has never been posted externally + } + return null; + } + return qnamePair.getFirst(); + } + + protected Long getNodeId(NodeRef nodeRef) + { + Pair nodePair = nodeDAO.getNodePair(tenantService.getName(nodeRef)); + if (nodePair == null) + { + throw new InvalidNodeRefException("Node ref does not exist: " + nodeRef, nodeRef); + } + return nodePair.getFirst(); + } +} diff --git a/source/java/org/alfresco/repo/query/NodeBackedEntity.java b/source/java/org/alfresco/repo/query/NodeBackedEntity.java new file mode 100644 index 0000000000..c9a72f9408 --- /dev/null +++ b/source/java/org/alfresco/repo/query/NodeBackedEntity.java @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.query; + +import org.alfresco.repo.domain.node.NodeEntity; +import org.alfresco.service.cmr.repository.NodeRef; + +/** + * Parent class of Canned Query Entities which are a + * {@link NodeEntity} with additional properties + * + * @author Nick Burch + * @since 4.0 + */ +public abstract class NodeBackedEntity +{ + private Long id; // node id + + private NodeEntity node; + + private String name; + + /** + * Default constructor + */ + public NodeBackedEntity() + { + } + + public Long getId() + { + return id; + } + + public void setId(Long id) + { + this.id = id; + } + + // helper + public NodeRef getNodeRef() + { + return (node != null ? node.getNodeRef() : null); + } + + // helper (ISO 8061) + public String getCreatedDate() + { + return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreated() : null); + } + + // helper + public String getCreator() + { + return ((node != null && node.getAuditableProperties() != null) ? node.getAuditableProperties().getAuditCreator() : null); + } + + public NodeEntity getNode() + { + return node; + } + + public void setNode(NodeEntity childNode) + { + this.node = childNode; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } +}