mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Added extension sample project to contain extenstion samples and used to test extension capabilities
- Added contentHits sample aspect that, when applied, counts the number of times a node of content is read and updated. - Fix to web service sample - Prevented onContentRead policy being fired when content is updated. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2287 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -233,6 +233,11 @@ public class RoutingContentService implements ContentService
|
||||
}
|
||||
|
||||
public ContentReader getReader(NodeRef nodeRef, QName propertyQName)
|
||||
{
|
||||
return getReader(nodeRef, propertyQName, true);
|
||||
}
|
||||
|
||||
private ContentReader getReader(NodeRef nodeRef, QName propertyQName, boolean fireContentReadPolicy)
|
||||
{
|
||||
// ensure that the node property is of type content
|
||||
PropertyDefinition contentPropDef = dictionaryService.getProperty(propertyQName);
|
||||
@@ -263,7 +268,7 @@ public class RoutingContentService implements ContentService
|
||||
reader.setEncoding(contentData.getEncoding());
|
||||
|
||||
// Fire the content read policy
|
||||
if (reader != null)
|
||||
if (reader != null && fireContentReadPolicy == true)
|
||||
{
|
||||
// Fire the content update policy
|
||||
Set<QName> types = new HashSet<QName>(this.nodeService.getAspects(nodeRef));
|
||||
@@ -280,7 +285,7 @@ public class RoutingContentService implements ContentService
|
||||
public ContentWriter getWriter(NodeRef nodeRef, QName propertyQName, boolean update)
|
||||
{
|
||||
// check for an existing URL - the get of the reader will perform type checking
|
||||
ContentReader existingContentReader = getReader(nodeRef, propertyQName);
|
||||
ContentReader existingContentReader = getReader(nodeRef, propertyQName, false);
|
||||
|
||||
// TODO: Choose the store to write to at runtime
|
||||
|
||||
|
Reference in New Issue
Block a user