mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
CMIS Relationship support in AtomPub binding
- getRelationships - getRelationship - createRelationship - unit tests for above TODO: delete relationship, includeRelationships flag git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14461 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -276,6 +276,10 @@ public abstract class CMISAbstractDictionaryService extends AbstractLifecycleBea
|
||||
else
|
||||
{
|
||||
typeDef = getRegistry().typeDefsByQName.get(clazz);
|
||||
if (typeDef == null)
|
||||
{
|
||||
typeDef = getRegistry().assocDefsByQName.get(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
// ensure matches one of provided matching scopes
|
||||
|
@@ -450,4 +450,30 @@ public class CMISAbstractTypeDefinition implements CMISTypeDefinition, Serializa
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return objectTypeId.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
final CMISTypeDefinition other = (CMISTypeDefinition) obj;
|
||||
if (objectTypeId == null)
|
||||
{
|
||||
if (other.getTypeId() != null)
|
||||
return false;
|
||||
}
|
||||
else if (!objectTypeId.equals(other.getTypeId()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -77,13 +77,13 @@ public class CMISRelationshipTypeDefinition extends CMISAbstractTypeDefinition
|
||||
|
||||
actionEvaluators = cmisMapping.getActionEvaluators(objectTypeId.getScope());
|
||||
|
||||
creatable = false;
|
||||
queryable = false;
|
||||
controllable = false;
|
||||
|
||||
if (assocDef == null)
|
||||
{
|
||||
// TODO: Add CMIS Association mapping??
|
||||
creatable = false;
|
||||
displayName = (cmisClassDef.getTitle() != null) ? cmisClassDef.getTitle() : typeId.getId();
|
||||
objectTypeQueryName = typeId.getId();
|
||||
QName parentQName = cmisMapping.getCmisType(cmisClassDef.getParentName());
|
||||
@@ -95,6 +95,7 @@ public class CMISRelationshipTypeDefinition extends CMISAbstractTypeDefinition
|
||||
}
|
||||
else
|
||||
{
|
||||
creatable = true;
|
||||
displayName = (assocDef.getTitle() != null) ? assocDef.getTitle() : typeId.getId();
|
||||
objectTypeQueryName = cmisMapping.buildPrefixEncodedString(typeId.getQName(), false);
|
||||
parentTypeId = CMISDictionaryModel.RELATIONSHIP_TYPE_ID;
|
||||
|
Reference in New Issue
Block a user