Merged CMIS063 to HEAD

15242: 0.62c update: Abdera extension / AtomPub tests passing (except query)
  15277: 0.62c upgrade: AtomPub resources/links refactor
  15290: 0.62c Upgrade: AtomPub resource/link compliance.  Updated Test client / Custom Type test client / Abdera extension.
  15293: 0.62 final Upgrade: Introduce schemas and examples
  15318: 0.62 final upgrade: AtomPub server and tests updated
  15321: Fixes for CMIS custom model tests.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17229 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-10-29 16:19:15 +00:00
parent f2e3183a5c
commit 1a5bb784b0
6 changed files with 48 additions and 15 deletions

View File

@@ -127,6 +127,7 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
Map<CMISTypeId, CMISAbstractTypeDefinition> objectDefsByTypeId = new HashMap<CMISTypeId, CMISAbstractTypeDefinition>();
Map<CMISTypeId, CMISTypeDefinition> typeDefsByTypeId = new HashMap<CMISTypeId, CMISTypeDefinition>();
Map<String, CMISTypeDefinition> typeDefsByTable = new HashMap<String, CMISTypeDefinition>();
List<CMISTypeDefinition> baseTypes = new ArrayList<CMISTypeDefinition>();
// Property Definitions Index
Map<String, CMISPropertyDefinition> propDefsById = new HashMap<String, CMISPropertyDefinition>();
@@ -212,6 +213,7 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
StringBuilder builder = new StringBuilder();
builder.append("DictionaryRegistry[");
builder.append("Types=").append(typeDefsByTypeId.size()).append(", ");
builder.append("Base Types=").append(baseTypes.size()).append(", ");
builder.append("Properties=").append(propDefsByPropId.size());
builder.append("]");
return builder.toString();
@@ -307,6 +309,15 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
CMISTypeDefinition typeDef = getRegistry().typeDefsByTable.get(tableName.toLowerCase());
return typeDef;
}
/*
* (non-Javadoc)
* @see org.alfresco.cmis.CMISDictionaryService#getBaseTypes()
*/
public Collection<CMISTypeDefinition> getBaseTypes()
{
return Collections.unmodifiableCollection(getRegistry().baseTypes);
}
/*
* (non-Javadoc)
@@ -446,11 +457,20 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
typeDef.assertComplete();
}
// phase 5: register base types
for (CMISAbstractTypeDefinition typeDef : registry.objectDefsByTypeId.values())
{
if (typeDef.isPublic() && typeDef.getParentType() == null)
{
registry.baseTypes.add(typeDef);
}
}
// publish new registry
registryMap.put(tenantService.getCurrentUserDomain(), registry);
if (logger.isInfoEnabled())
logger.info("Initialized CMIS Dictionary. Types:" + registry.typeDefsByTypeId.size() + ", Properties:" + registry.propDefsByPropId.size());
logger.info("Initialized CMIS Dictionary. Types:" + registry.typeDefsByTypeId.size() + ", Base Types: " + registry.baseTypes.size() + ", Properties:" + registry.propDefsByPropId.size());
}
/*