mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
VS2 - version store refactor (merged from DEV/VS2 to HEAD)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10574 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -36,6 +36,7 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.version.common.VersionUtil;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.InvalidAspectException;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
@@ -54,6 +55,8 @@ import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.QNamePattern;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
||||
/**
|
||||
@@ -63,10 +66,12 @@ import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
*/
|
||||
public class NodeServiceImpl implements NodeService, VersionModel
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(NodeServiceImpl.class);
|
||||
|
||||
/**
|
||||
* Error messages
|
||||
*/
|
||||
private final static String MSG_UNSUPPORTED =
|
||||
protected final static String MSG_UNSUPPORTED =
|
||||
"This operation is not supported by a version store implementation of the node service.";
|
||||
|
||||
/**
|
||||
@@ -331,7 +336,23 @@ public class NodeServiceImpl implements NodeService, VersionModel
|
||||
if (isMultiValue.booleanValue() == false)
|
||||
{
|
||||
value = this.dbNodeService.getProperty(versionedAttribute, PROP_QNAME_VALUE);
|
||||
value = (Serializable)DefaultTypeConverter.INSTANCE.convert(propDef.getDataType(), value);
|
||||
|
||||
if (propDef != null)
|
||||
{
|
||||
DataTypeDefinition dataTypeDef = propDef.getDataType();
|
||||
if (dataTypeDef != null)
|
||||
{
|
||||
value = (Serializable)DefaultTypeConverter.INSTANCE.convert(dataTypeDef, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Null dataTypeDefinition for: " + propDef);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Null propertyDefinition for: " + qName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user