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
71 lines
2.2 KiB
Java
71 lines
2.2 KiB
Java
package org.alfresco.repo.content;
|
|
|
|
import org.alfresco.service.cmr.repository.ContentReader;
|
|
import org.alfresco.service.cmr.repository.NodeRef;
|
|
import org.alfresco.service.namespace.QName;
|
|
import org.springframework.extensions.surf.util.ParameterCheck;
|
|
|
|
/**
|
|
* Context information for node-related content.
|
|
*
|
|
* @author Derek Hulley
|
|
*/
|
|
public class NodeContentContext extends ContentContext
|
|
{
|
|
private static final long serialVersionUID = -1836714367516857907L;
|
|
|
|
private NodeRef nodeRef;
|
|
private QName propertyQName;
|
|
|
|
/**
|
|
* Construct the instance with the content URL.
|
|
*
|
|
* @param existingContentReader content with which to seed the new writer - may be <tt>null</tt>
|
|
* @param contentUrl the content URL - may be <tt>null</tt>
|
|
* @param nodeRef the node holding the content metadata - may not be <tt>null</tt>
|
|
* @param propertyQName the property holding the content metadata - may not be <tt>null</tt>
|
|
*/
|
|
public NodeContentContext(
|
|
ContentReader existingContentReader,
|
|
String contentUrl,
|
|
NodeRef nodeRef,
|
|
QName propertyQName)
|
|
{
|
|
super(existingContentReader, contentUrl);
|
|
ParameterCheck.mandatory("nodeRef", nodeRef);
|
|
ParameterCheck.mandatory("propertyQName", propertyQName);
|
|
this.nodeRef = nodeRef;
|
|
this.propertyQName = propertyQName;
|
|
}
|
|
|
|
@Override
|
|
public String toString()
|
|
{
|
|
StringBuilder sb = new StringBuilder(128);
|
|
sb.append("NodeContentContext")
|
|
.append("[ contentUrl=").append(getContentUrl())
|
|
.append(", existing=").append((getExistingContentReader() == null ? false : true))
|
|
.append(", nodeRef=").append(nodeRef)
|
|
.append(", propertyQName=").append(propertyQName)
|
|
.append("]");
|
|
return sb.toString();
|
|
}
|
|
|
|
/**
|
|
* @return Returns the node holding the content metadata
|
|
*/
|
|
public NodeRef getNodeRef()
|
|
{
|
|
return nodeRef;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return Returns the property holding the content metadata
|
|
*/
|
|
public QName getPropertyQName()
|
|
{
|
|
return propertyQName;
|
|
}
|
|
}
|