mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
OpenCMIS server refactoring
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29544 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,17 +20,16 @@ package org.alfresco.opencmis.mapping;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.opencmis.CMISConnector;
|
||||
import org.alfresco.opencmis.dictionary.CMISNodeInfo;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.apache.chemistry.opencmis.commons.PropertyIds;
|
||||
|
||||
/**
|
||||
* Accessor for CMIS content stream property id
|
||||
*
|
||||
* @author andyh
|
||||
* @author florian.mueller
|
||||
*/
|
||||
public class ContentStreamIdProperty extends AbstractProperty
|
||||
{
|
||||
@@ -39,27 +38,19 @@ public class ContentStreamIdProperty extends AbstractProperty
|
||||
*
|
||||
* @param serviceRegistry
|
||||
*/
|
||||
public ContentStreamIdProperty(ServiceRegistry serviceRegistry)
|
||||
public ContentStreamIdProperty(ServiceRegistry serviceRegistry, CMISConnector connector)
|
||||
{
|
||||
super(serviceRegistry, PropertyIds.CONTENT_STREAM_ID);
|
||||
super(serviceRegistry, connector, PropertyIds.CONTENT_STREAM_ID);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.alfresco.cmis.property.PropertyAccessor#getValue(org.alfresco.service
|
||||
* .cmr.repository.NodeRef)
|
||||
*/
|
||||
public Serializable getValue(NodeRef nodeRef)
|
||||
public Serializable getValueInternal(CMISNodeInfo nodeInfo)
|
||||
{
|
||||
Serializable sValue = getServiceRegistry().getNodeService().getProperty(nodeRef, ContentModel.PROP_CONTENT);
|
||||
if (sValue != null)
|
||||
ContentData contentData = getContentData(nodeInfo);
|
||||
|
||||
if (contentData != null)
|
||||
{
|
||||
ContentData contentData = DefaultTypeConverter.INSTANCE.convert(ContentData.class, sValue);
|
||||
return contentData.getContentUrl();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user