CMIS bag of stuff;:

- Add CMIS Allowable Actions to Abdera CMIS extension
- Add testAllowableActions(), testQueryAllowableActions
- Pass all AppClientTest (AtomPub server test suite) tests
- Fix encoding issues while parsing Atom requests
- Fix ignoring of Atom slug
- Fix support of pure Atom entries (those without CMIS extensions)
- Add test suite for custom sub-types / props (CMISCustomTypeTest)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13921 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-04-09 15:19:47 +00:00
parent 4fd502de4b
commit 7205e4b956
8 changed files with 52 additions and 23 deletions

View File

@@ -321,8 +321,8 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
boolean isMatchingType = (matchingType == null);
if (property != null && matchingType != null)
{
Map<CMISPropertyId, CMISPropertyDefinition> props = matchingType.getPropertyDefinitions();
if (props.containsKey(property.getPropertyId()))
Map<String, CMISPropertyDefinition> props = matchingType.getPropertyDefinitions();
if (props.containsKey(property.getPropertyId().getName()))
{
isMatchingType = true;
}
@@ -362,7 +362,7 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
createDefinitions(registry);
for (CMISAbstractTypeDefinition objectTypeDef : registry.objectDefsByTypeId.values())
{
Map<CMISPropertyId, CMISPropertyDefinition> propDefs = objectTypeDef.createProperties(cmisMapping, dictionaryService);
Map<String, CMISPropertyDefinition> propDefs = objectTypeDef.createProperties(cmisMapping, dictionaryService);
for (CMISPropertyDefinition propDef : propDefs.values())
{
registry.registerPropertyDefinition(propDef);

View File

@@ -79,9 +79,9 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
protected boolean includeInSuperTypeQuery;
protected Collection<CMISTypeId> subTypeIds = new ArrayList<CMISTypeId>();
protected Collection<CMISTypeDefinition> subTypes = new ArrayList<CMISTypeDefinition>();
protected Map<CMISPropertyId, CMISPropertyDefinition> properties = new HashMap<CMISPropertyId, CMISPropertyDefinition>();
protected Map<CMISPropertyId, CMISPropertyDefinition> inheritedProperties = new HashMap<CMISPropertyId, CMISPropertyDefinition>();
protected Map<CMISPropertyId, CMISPropertyDefinition> ownedProperties = new HashMap<CMISPropertyId, CMISPropertyDefinition>();
protected Map<String, CMISPropertyDefinition> properties = new HashMap<String, CMISPropertyDefinition>();
protected Map<String, CMISPropertyDefinition> inheritedProperties = new HashMap<String, CMISPropertyDefinition>();
protected Map<String, CMISPropertyDefinition> ownedProperties = new HashMap<String, CMISPropertyDefinition>();
protected Map<CMISAllowedActionEnum, CMISActionEvaluator> actionEvaluators;
@@ -92,7 +92,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
* @param dictionaryService
* @return
*/
/*package*/ Map<CMISPropertyId, CMISPropertyDefinition> createProperties(CMISMapping cmisMapping, DictionaryService dictionaryService)
/*package*/ Map<String, CMISPropertyDefinition> createProperties(CMISMapping cmisMapping, DictionaryService dictionaryService)
{
// map properties directly defined on this type
for (PropertyDefinition propDef : cmisClassDef.getProperties().values())
@@ -102,7 +102,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
if (cmisMapping.getDataType(propDef.getDataType()) != null)
{
CMISPropertyDefinition cmisPropDef = createProperty(cmisMapping, propDef);
properties.put(cmisPropDef.getPropertyId(), cmisPropDef);
properties.put(cmisPropDef.getPropertyId().getName(), cmisPropDef);
}
}
}
@@ -374,7 +374,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
* (non-Javadoc)
* @see org.alfresco.cmis.dictionary.CMISTypeDefinition#getPropertyDefinitions()
*/
public Map<CMISPropertyId, CMISPropertyDefinition> getPropertyDefinitions()
public Map<String, CMISPropertyDefinition> getPropertyDefinitions()
{
return inheritedProperties;
}
@@ -383,7 +383,7 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
* (non-Javadoc)
* @see org.alfresco.cmis.dictionary.CMISTypeDefinition#getOwnedPropertyDefinitions()
*/
public Map<CMISPropertyId, CMISPropertyDefinition> getOwnedPropertyDefinitions()
public Map<String, CMISPropertyDefinition> getOwnedPropertyDefinitions()
{
return ownedProperties;
}

View File

@@ -31,7 +31,6 @@ import java.util.Map;
import org.alfresco.cmis.CMISDictionaryModel;
import org.alfresco.cmis.CMISPropertyDefinition;
import org.alfresco.cmis.CMISPropertyId;
import org.alfresco.cmis.CMISScope;
import org.alfresco.cmis.CMISTypeDefinition;
import org.alfresco.cmis.CMISTypeId;
@@ -120,7 +119,7 @@ public class CMISRelationshipTypeDefinition extends CMISAbstractTypeDefinition
* @see org.alfresco.cmis.dictionary.CMISObjectTypeDefinition#createProperties(org.alfresco.cmis.dictionary.CMISMapping, org.alfresco.service.cmr.dictionary.DictionaryService)
*/
@Override
/*package*/ Map<CMISPropertyId, CMISPropertyDefinition> createProperties(CMISMapping cmisMapping, DictionaryService dictionaryService)
/*package*/ Map<String, CMISPropertyDefinition> createProperties(CMISMapping cmisMapping, DictionaryService dictionaryService)
{
if (objectTypeId.equals(CMISDictionaryModel.RELATIONSHIP_TYPE_ID))
{