mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged CMIS063 to HEAD
15185: 0.62c upgrade: service document 15198: 0.62c upgrade: allowable actions 15228: 0.62c upgrade: types and properties git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17227 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -110,7 +110,6 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
}
|
||||
|
||||
|
||||
// TODO: read / write locks
|
||||
/** CMIS Dictionary Registry (tenant-aware) */
|
||||
private Map<String, DictionaryRegistry> registryMap = new ConcurrentHashMap<String, DictionaryRegistry>(4);
|
||||
|
||||
@@ -130,7 +129,7 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
Map<String, CMISTypeDefinition> typeDefsByTable = new HashMap<String, CMISTypeDefinition>();
|
||||
|
||||
// Property Definitions Index
|
||||
Map<String, CMISPropertyDefinition> propDefsByName = new HashMap<String, CMISPropertyDefinition>();
|
||||
Map<String, CMISPropertyDefinition> propDefsById = new HashMap<String, CMISPropertyDefinition>();
|
||||
Map<QName, CMISPropertyDefinition> propDefsByQName = new HashMap<QName, CMISPropertyDefinition>();
|
||||
Map<CMISPropertyId, CMISPropertyDefinition> propDefsByPropId = new HashMap<CMISPropertyId, CMISPropertyDefinition>();
|
||||
|
||||
@@ -190,13 +189,13 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
|
||||
propDefsByPropId.put(propDef.getPropertyId(), propDef);
|
||||
propDefsByQName.put(propDef.getPropertyId().getQName(), propDef);
|
||||
propDefsByName.put(propDef.getPropertyId().getName().toLowerCase(), propDef);
|
||||
propDefsById.put(propDef.getPropertyId().getId().toLowerCase(), propDef);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Registered property " + propDef.getPropertyId().getId());
|
||||
logger.debug(" QName: " + propDef.getPropertyId().getQName());
|
||||
logger.debug(" Name: " + propDef.getPropertyId().getName());
|
||||
logger.debug(" Id: " + propDef.getPropertyId().getId());
|
||||
logger.debug(" Owning Type: " + propDef.getOwningType().getTypeId());
|
||||
logger.debug(" Property Accessor: " + propDef.getPropertyAccessor() + " , mappedProperty=" + propDef.getPropertyAccessor().getMappedProperty());
|
||||
logger.debug(" Property Lucene Builder: " + propDef.getPropertyLuceneBuilder());
|
||||
@@ -334,7 +333,7 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
*/
|
||||
public CMISPropertyDefinition findProperty(String property, CMISTypeDefinition matchingType)
|
||||
{
|
||||
CMISPropertyDefinition propDef = getRegistry().propDefsByName.get(property.toLowerCase());
|
||||
CMISPropertyDefinition propDef = getRegistry().propDefsById.get(property.toLowerCase());
|
||||
return getProperty(propDef, matchingType);
|
||||
}
|
||||
|
||||
@@ -351,7 +350,7 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
if (property != null && matchingType != null)
|
||||
{
|
||||
Map<String, CMISPropertyDefinition> props = matchingType.getPropertyDefinitions();
|
||||
if (props.containsKey(property.getPropertyId().getName()))
|
||||
if (props.containsKey(property.getPropertyId().getId()))
|
||||
{
|
||||
isMatchingType = true;
|
||||
}
|
||||
@@ -441,6 +440,12 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
}
|
||||
}
|
||||
|
||||
// phase 4: assert valid
|
||||
for (CMISAbstractTypeDefinition typeDef : registry.objectDefsByTypeId.values())
|
||||
{
|
||||
typeDef.assertComplete();
|
||||
}
|
||||
|
||||
// publish new registry
|
||||
registryMap.put(tenantService.getCurrentUserDomain(), registry);
|
||||
|
||||
|
Reference in New Issue
Block a user