mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/V3.4 to HEAD:
23345: Merged BRANCHES/DEV/DC33E to BRANCHES/V3.4: 23305: Resolve ALF-5324: SDK is missing alfresco-share-3.4.a.jar 23306: Resolve ALF-5321: Jar generated in SDK example "CustomAspect" is not correct. 23307: Resolve ALF-5294: Internal Target throws an exception when try to edit it 23308: Resolve ALF-5332: Exception in SDK CustomAspect 23309: Resolve ALF-5162: CMIS Web Services: getTypeDescendants() returns a flat list, not a tree 23326: Resolve ALF-5039: Change events for documents creation are not returned 23356: Fix to continuous.xml 23482: Resolve ALF-5438: Required flag is wrong for most CMIS spec defined property definitions 23488: Resolve ALF-5439: Updatability of cmis:contentStreamFileName must be read-only 23501: Resolve ALF-5440: Some property definitions don't have descriptions 23502: Resolve ALF-5534: Subtypes of F:cm:systemfolder should not be creatable CMIS fixes for cmis.alfresco.com. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23532 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
<description>The unique object id (a node ref)</description>
|
||||
<type>cmis:id</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -65,7 +65,7 @@
|
||||
<description>Id of the object’s type</description>
|
||||
<type>cmis:id</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -76,7 +76,7 @@
|
||||
<description>Id of the base object type for the object</description>
|
||||
<type>cmis:id</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>true</tokenised>
|
||||
@@ -87,7 +87,7 @@
|
||||
<description>The authority who created this object</description>
|
||||
<type>d:text</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -98,7 +98,7 @@
|
||||
<description>The object creation date</description>
|
||||
<type>d:datetime</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -109,7 +109,7 @@
|
||||
<description>The authority who last modified this object</description>
|
||||
<type>d:text</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -120,7 +120,7 @@
|
||||
<description>The date this object was last modified</description>
|
||||
<type>d:datetime</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -131,7 +131,7 @@
|
||||
<description>Change Token</description>
|
||||
<type>d:text</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="false" />
|
||||
</property>
|
||||
@@ -147,7 +147,7 @@
|
||||
<description>Name</description>
|
||||
<type>d:text</type>
|
||||
<protected>false</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>both</tokenised>
|
||||
@@ -175,7 +175,7 @@
|
||||
<description>Is this the latest version of the document?</description>
|
||||
<type>d:boolean</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="false" />
|
||||
</property>
|
||||
@@ -202,7 +202,7 @@
|
||||
<description>The version label</description>
|
||||
<type>d:text</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="false"/>
|
||||
</property>
|
||||
@@ -211,7 +211,7 @@
|
||||
<description>The version series id</description>
|
||||
<type>cmis:id</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="false"/>
|
||||
</property>
|
||||
@@ -220,7 +220,7 @@
|
||||
<description>Is the version series checked out?</description>
|
||||
<type>d:boolean</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="false" />
|
||||
</property>
|
||||
@@ -277,7 +277,7 @@
|
||||
<title>Content Stream Filename</title>
|
||||
<description>The content stream filename</description>
|
||||
<type>d:text</type>
|
||||
<protected>false</protected>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="false">false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
@@ -306,7 +306,7 @@
|
||||
<description>The parent id of the folder</description>
|
||||
<type>cmis:id</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<tokenised>false</tokenised>
|
||||
@@ -317,7 +317,7 @@
|
||||
<description>The fully qualified path to this folder/description</description>
|
||||
<type>d:text</type>
|
||||
<protected>true</protected>
|
||||
<mandatory enforced="true">true</mandatory>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="false"/>
|
||||
</property>
|
||||
|
@@ -24,9 +24,11 @@ import java.util.HashMap;
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISInvalidArgumentException;
|
||||
import org.alfresco.cmis.CMISServices;
|
||||
import org.alfresco.cmis.CMISTypeDefinition;
|
||||
import org.alfresco.cmis.CMISTypeId;
|
||||
import org.alfresco.repo.audit.extractor.AbstractDataExtractor;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
@@ -70,8 +72,12 @@ public class CMISChangeLogDataExtractor extends AbstractDataExtractor
|
||||
{
|
||||
try
|
||||
{
|
||||
CMISTypeId typeId = cmisService.getTypeDefinition(nodeRef).getBaseType().getTypeId();
|
||||
return typeId.equals(CMISDictionaryModel.DOCUMENT_TYPE_ID) || typeId.equals(CMISDictionaryModel.FOLDER_TYPE_ID);
|
||||
CMISTypeDefinition typeDef = cmisService.getTypeDefinition(nodeRef);
|
||||
if (typeDef != null)
|
||||
{
|
||||
CMISTypeId typeId = typeDef.getBaseType().getTypeId();
|
||||
return typeId.equals(CMISDictionaryModel.DOCUMENT_TYPE_ID) || typeId.equals(CMISDictionaryModel.FOLDER_TYPE_ID);
|
||||
}
|
||||
}
|
||||
catch (CMISInvalidArgumentException e)
|
||||
{
|
||||
@@ -91,6 +97,10 @@ public class CMISChangeLogDataExtractor extends AbstractDataExtractor
|
||||
private NodeRef getNodeRef(Serializable data)
|
||||
{
|
||||
NodeRef nodeRef = null;
|
||||
if (data instanceof ChildAssociationRef)
|
||||
{
|
||||
nodeRef = ((ChildAssociationRef) data).getChildRef();
|
||||
}
|
||||
if (data instanceof FileInfo)
|
||||
{
|
||||
nodeRef = ((FileInfo) data).getNodeRef();
|
||||
|
@@ -91,7 +91,7 @@ public abstract class CMISAbstractTypeDefinition implements CMISTypeDefinition,
|
||||
//if (parentTypeId == null) throw new IllegalStateException("parentTypeId not specified; objectTypeId=" + objectTypeId);
|
||||
if (parentTypeId != null && internalParentType == null) throw new IllegalStateException("parentType not specified; objectTypeId=" + objectTypeId + ",parentTypeId=" + parentTypeId);
|
||||
if (rootType == null) throw new IllegalStateException("rootType not specified; objectTypeId=" + objectTypeId);
|
||||
//if (description == null) throw new IllegalStateException("description not specified; objectTypeId=" + objectTypeId);
|
||||
if (description == null) throw new IllegalStateException("description not specified; objectTypeId=" + objectTypeId);
|
||||
if (creatable == null) throw new IllegalStateException("creatable not specified; objectTypeId=" + objectTypeId);
|
||||
if (queryable == null) throw new IllegalStateException("queryable not specified; objectTypeId=" + objectTypeId);
|
||||
if (fullTextIndexed == null) throw new IllegalStateException("fullTextIndexed not specified; objectTypeId=" + objectTypeId);
|
||||
|
@@ -111,7 +111,7 @@ public class CMISBasePropertyDefinition implements CMISPropertyDefinition, Seria
|
||||
this.typeDef = typeDef;
|
||||
queryName = cmisMapping.buildPrefixEncodedString(propertyId.getQName());
|
||||
displayName = (propDef.getTitle() != null) ? propDef.getTitle() : propertyId.getId();
|
||||
description = propDef.getDescription();
|
||||
description = propDef.getDescription() != null ? propDef.getDescription() : displayName;
|
||||
propertyType = cmisMapping.getDataType(propDef.getDataType());
|
||||
cardinality = propDef.isMultiValued() ? CMISCardinalityEnum.MULTI_VALUED : CMISCardinalityEnum.SINGLE_VALUED;
|
||||
for (ConstraintDefinition constraintDef : propDef.getConstraints())
|
||||
|
@@ -56,7 +56,7 @@ public class CMISDocumentTypeDefinition extends CMISAbstractTypeDefinition
|
||||
this.cmisClassDef = cmisClassDef;
|
||||
objectTypeId = typeId;
|
||||
displayName = (cmisClassDef.getTitle() != null) ? cmisClassDef.getTitle() : typeId.getId();
|
||||
description = cmisClassDef.getDescription();
|
||||
description = cmisClassDef.getDescription() != null ? cmisClassDef.getDescription() : displayName;
|
||||
|
||||
QName parentQName = cmisMapping.getCmisType(cmisClassDef.getParentName());
|
||||
if (typeId == CMISDictionaryModel.DOCUMENT_TYPE_ID)
|
||||
|
@@ -42,7 +42,7 @@ public class CMISFolderTypeDefinition extends CMISAbstractTypeDefinition
|
||||
* @param typeId
|
||||
* @param cmisClassDef
|
||||
*/
|
||||
public CMISFolderTypeDefinition(CMISMapping cmisMapping, CMISTypeId typeId, ClassDefinition cmisClassDef)
|
||||
public CMISFolderTypeDefinition(CMISMapping cmisMapping, CMISTypeId typeId, ClassDefinition cmisClassDef, boolean isSystem)
|
||||
{
|
||||
isPublic = true;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CMISFolderTypeDefinition extends CMISAbstractTypeDefinition
|
||||
this.cmisClassDef = cmisClassDef;
|
||||
objectTypeId = typeId;
|
||||
displayName = (cmisClassDef.getTitle() != null) ? cmisClassDef.getTitle() : typeId.getId();
|
||||
description = cmisClassDef.getDescription();
|
||||
description = cmisClassDef.getDescription() != null ? cmisClassDef.getDescription() : displayName;
|
||||
|
||||
QName parentQName = cmisMapping.getCmisType(cmisClassDef.getParentName());
|
||||
if (typeId == CMISDictionaryModel.FOLDER_TYPE_ID)
|
||||
@@ -73,8 +73,7 @@ public class CMISFolderTypeDefinition extends CMISAbstractTypeDefinition
|
||||
actionEvaluators = cmisMapping.getActionEvaluators(objectTypeId.getScope());
|
||||
|
||||
// TODO: introduce abstract into core alfresco content metamodel
|
||||
// NOTE: system folder cannot be created via FolderFileService
|
||||
creatable = (typeId.getQName().equals(ContentModel.TYPE_SYSTEM_FOLDER) ? false : true);
|
||||
creatable = !isSystem;
|
||||
queryable = true;
|
||||
fullTextIndexed = true;
|
||||
controllablePolicy = false;
|
||||
|
@@ -58,7 +58,7 @@ public class CMISObjectTypeDefinition extends CMISAbstractTypeDefinition
|
||||
{
|
||||
this.cmisClassDef = cmisClassDef;
|
||||
displayName = (cmisClassDef.getTitle() != null) ? cmisClassDef.getTitle() : typeId.getId();
|
||||
description = cmisClassDef.getDescription();
|
||||
description = cmisClassDef.getDescription() != null ? cmisClassDef.getDescription() : displayName;
|
||||
QName parentQName = cmisMapping.getCmisType(cmisClassDef.getParentName());
|
||||
if (parentQName != null)
|
||||
{
|
||||
|
@@ -71,7 +71,7 @@ public class CMISPolicyTypeDefinition extends CMISAbstractTypeDefinition
|
||||
objectTypeQueryName = cmisMapping.buildPrefixEncodedString(typeId.getQName());
|
||||
parentTypeId = CMISDictionaryModel.POLICY_TYPE_ID;
|
||||
}
|
||||
description = cmisClassDef.getDescription();
|
||||
description = cmisClassDef.getDescription() != null ? cmisClassDef.getDescription() : displayName;
|
||||
|
||||
actionEvaluators = cmisMapping.getActionEvaluators(objectTypeId.getScope());
|
||||
|
||||
|
@@ -89,7 +89,7 @@ public class CMISRelationshipTypeDefinition extends CMISAbstractTypeDefinition
|
||||
{
|
||||
parentTypeId = cmisMapping.getCmisTypeId(CMISScope.OBJECT, parentQName);
|
||||
}
|
||||
description = cmisClassDef.getDescription();
|
||||
description = cmisClassDef.getDescription() != null ? cmisClassDef.getDescription() : displayName;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,7 +97,7 @@ public class CMISRelationshipTypeDefinition extends CMISAbstractTypeDefinition
|
||||
displayName = (assocDef.getTitle() != null) ? assocDef.getTitle() : typeId.getId();
|
||||
objectTypeQueryName = cmisMapping.buildPrefixEncodedString(typeId.getQName());
|
||||
parentTypeId = CMISDictionaryModel.RELATIONSHIP_TYPE_ID;
|
||||
description = assocDef.getDescription();
|
||||
description = assocDef.getDescription() != null ? assocDef.getDescription() : displayName;
|
||||
|
||||
CMISTypeId sourceTypeId = cmisMapping.getCmisTypeId(cmisMapping.getCmisType(assocDef.getSourceClass().getName()));
|
||||
if (sourceTypeId != null)
|
||||
|
@@ -22,6 +22,7 @@ import java.util.Collection;
|
||||
|
||||
import org.alfresco.cmis.CMISScope;
|
||||
import org.alfresco.cmis.CMISTypeId;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.ClassDefinition;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -76,7 +77,8 @@ public class CMISStrictDictionaryService extends CMISAbstractDictionaryService
|
||||
}
|
||||
else if (typeId.getScope() == CMISScope.FOLDER)
|
||||
{
|
||||
objectTypeDef = new CMISFolderTypeDefinition(cmisMapping, typeId, classDef);
|
||||
boolean isSystem = dictionaryService.isSubClass(classDef.getName(), ContentModel.TYPE_SYSTEM_FOLDER);
|
||||
objectTypeDef = new CMISFolderTypeDefinition(cmisMapping, typeId, classDef, isSystem);
|
||||
}
|
||||
else if (typeId.getScope() == CMISScope.RELATIONSHIP)
|
||||
{
|
||||
|
@@ -220,7 +220,7 @@ public class TransferServiceImpl2 implements TransferService2
|
||||
properties.put(TransferModel.PROP_ENDPOINT_PROTOCOL, newTarget.getEndpointProtocol());
|
||||
properties.put(TransferModel.PROP_ENDPOINT_PATH, newTarget.getEndpointPath());
|
||||
properties.put(TransferModel.PROP_USERNAME, newTarget.getUsername());
|
||||
properties.put(TransferModel.PROP_PASSWORD, encrypt(newTarget.getPassword()));
|
||||
properties.put(TransferModel.PROP_PASSWORD, new String(encrypt(newTarget.getPassword())));
|
||||
|
||||
// titled aspect
|
||||
properties.put(ContentModel.PROP_TITLE, newTarget.getTitle());
|
||||
@@ -389,7 +389,7 @@ public class TransferServiceImpl2 implements TransferService2
|
||||
properties.put(TransferModel.PROP_ENDPOINT_PROTOCOL, update.getEndpointProtocol());
|
||||
properties.put(TransferModel.PROP_ENDPOINT_PATH, update.getEndpointPath());
|
||||
properties.put(TransferModel.PROP_USERNAME, update.getUsername());
|
||||
properties.put(TransferModel.PROP_PASSWORD, encrypt(update.getPassword()));
|
||||
properties.put(TransferModel.PROP_PASSWORD, new String(encrypt(update.getPassword())));
|
||||
|
||||
// titled aspect
|
||||
properties.put(ContentModel.PROP_TITLE, update.getTitle());
|
||||
|
Reference in New Issue
Block a user