From 34b62b98dc95ce6e69f3c056ecb5666b46928f4c Mon Sep 17 00:00:00 2001 From: David Caruana Date: Fri, 30 Oct 2009 22:34:54 +0000 Subject: [PATCH] Merged CMIS063 to HEAD Resolve merge issues. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17272 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/cmis-ws-context.xml | 3 - .../org/alfresco/cmis/atomentry.lib.atom.ftl | 661 ------------------ .../org/alfresco/cmis/cmis.get.html.ftl | 151 ---- .../org/alfresco/cmis/index.get.html.ftl | 2 +- .../repo/cmis/ws/DMNavigationServicePort.java | 1 + .../repo/cmis/ws/DMRepositoryServicePort.java | 7 - .../repo/cmis/ws/utils/CmisObjectsUtils.java | 38 +- .../repo/cmis/ws/utils/PropertyUtil.java | 23 +- source/wsdl/build.properties | 2 - source/wsdl/build.xml | 54 -- 10 files changed, 20 insertions(+), 922 deletions(-) delete mode 100644 config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl delete mode 100644 config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.html.ftl delete mode 100644 source/wsdl/build.properties delete mode 100644 source/wsdl/build.xml diff --git a/config/alfresco/cmis-ws-context.xml b/config/alfresco/cmis-ws-context.xml index ea0e9b93a3..fb1db41a40 100644 --- a/config/alfresco/cmis-ws-context.xml +++ b/config/alfresco/cmis-ws-context.xml @@ -9,8 +9,6 @@ - diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl b/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl deleted file mode 100644 index 36b9833c33..0000000000 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl +++ /dev/null @@ -1,661 +0,0 @@ -[#ftl] - -[#-- --] -[#-- ATOM Entry --] -[#-- --] - -[#macro entry ns=""] - -[#nested] - -[/#macro] - -[#macro objectCMISProps object propfilter] - - [#assign typedef = cmistype(object)] - - [#list typedef.propertyDefinitions?values as propdef] - [@filter propfilter propdef.queryName][@prop propdef.propertyId.id object propdef.dataType.label/][/@filter] - [/#list] - -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Document --] -[#-- --] - -[#macro document node propfilter="*" includeallowableactions=false includerelationships="none" ns=""] -[@entry ns] -${node.properties.creator!""} -[@contentstream node/] -urn:uuid:${node.id} -[@linksLib.linknodeself node/] -[@linksLib.linkstream node "enclosure"/] -[@linksLib.linknodeedit node/] -[@linksLib.linkstream node "edit-media"/] -[@documentCMISLinks node=node/] -${xmldate(node.properties.created)} -[@contentsummary node/] -${node.name} -${xmldate(node.properties.modified)} -${xmldate(node.properties.modified)} -${absurl(url.context)}${node.icon16} - -[@objectCMISProps node propfilter/] -[#if includeallowableactions][@allowableactions node/][/#if] - -${node.name} -[/@entry] -[/#macro] - -[#macro documentCMISLinks node] -[@linksLib.linkallowableactions node/] -[@linksLib.linkrelationships node/] -[@linksLib.linkparents node/] -[@linksLib.linkversions node/] -[@linksLib.linktype node/] -[@linksLib.linkservice/] -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Version --] -[#-- --] - -[#macro version node version propfilter="*" ns=""] -[@entry ns] -${node.properties.creator} -[@contentstream node/] -urn:uuid:${node.id} -[@linksLib.linknodeself node/] -[@linksLib.linkstream node "enclosure"/] -[@documentCMISLinks node=node/] -${xmldate(node.properties.created)} -[@contentsummary node/] -${node.name} -${xmldate(node.properties.modified)} -${xmldate(node.properties.modified)} -${absurl(url.context)}${node.icon16} - -[@objectCMISProps node propfilter/] - -[/@entry] -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Private Working Copy --] -[#-- --] - -[#macro pwc node propfilter="*" includeallowableactions=false includerelationships="none" ns=""] -[@entry ns] -${node.properties.creator} -[@contentstream node/] -urn:uuid:${node.id} -[#assign pwcuri]/cmis/pwc/[@linksLib.noderef node/][/#assign] -[@linksLib.linkself href="${pwcuri}"/] -[@linksLib.linkstream node "enclosure"/] -[@linksLib.linknodeedit node/] -[@linksLib.linkstream node "edit-media"/] -[@documentCMISLinks node=node/] -${xmldate(node.properties.created)} -[@contentsummary node/] -${node.name} -${xmldate(node.properties.modified)} -${xmldate(node.properties.modified)} -${absurl(url.context)}${node.icon16} - -[@objectCMISProps node propfilter/] -[#if includeallowableactions][@allowableactions node/][/#if] - -${node.name} -[/@entry] -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Folder --] -[#-- --] - -[#macro foldertree node propfilter="*" includeallowableactions=false includerelationships="none" ns="" maxdepth=-1] -[@folder node propfilter "folders" includeallowableactions includerelationships ns 1 maxdepth "" "tree"/] -[/#macro] - -[#macro folder node propfilter="*" typesfilter="any" includeallowableactions=false includerelationships="none" ns="" depth=1 maxdepth=1 relativePathSegment="" nestedkind=""] -[@entry ns] -${node.properties.creator} -${node.id} [#-- TODO --] -urn:uuid:${node.id} -[@linksLib.linknodeself node/] -[@linksLib.linknodeedit node/] -[@folderCMISLinks node/] -${xmldate(node.properties.created)} -${node.properties.description!node.properties.title!""} [#-- TODO --] -${node.name} -${xmldate(node.properties.modified)} -${xmldate(node.properties.modified)} -${absurl(url.context)}${node.icon16} - -[@objectCMISProps node propfilter/] -[#if includeallowableactions][@allowableactions node/][/#if] - -${node.name} -[#if relativePathSegment != ""] -${relativePathSegment} -[/#if] -[#-- recurse for depth greater than 1 --] -[#if maxdepth == -1 || depth < maxdepth] -[#assign nested = cmischildren(node, typesfilter)/] -[#if nested?size > 0] - -[@feedLib.node node "${nestedkind}"] - [#if nestedkind == "tree"][@linksLib.linktree node "self"/][#else][@linksLib.linkdescendants node "self"/][/#if] -[/@feedLib.node] -[#list nested as child] - [#if child.isDocument] - [@document child propfilter includeallowableactions includerelationships/] - [#else] - [@folder child propfilter typesfilter includeallowableactions includerelationships ns depth+1 maxdepth "" nestedkind/] - [/#if] -[/#list] - -[/#if] -[/#if] -[/@entry] -[/#macro] - -[#macro folderCMISLinks node] -[@linksLib.linkallowableactions node/] -[@linksLib.linkrelationships node/] -[#if cmisproperty(node, cmisconstants.PROP_PARENT_ID)?is_string] -[@linksLib.linkparent node/] -[/#if] -[@linksLib.linkchildren node/] -[@linksLib.linkdescendants node/] -[@linksLib.linktree node/] -[@linksLib.linktype node/] -[@linksLib.linkservice/] -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Relationship --] -[#-- --] - -[#macro assoc assoc propfilter="*" includeallowableactions=false ns=""] -[@entry ns] -${xmldate(date)} [#-- TODO: [@namedvalue cmisconstants.PROP_CREATED_BY assoc cmisconstants.DATATYPE_STRING/] --] -[@namedvalue cmisconstants.PROP_OBJECT_ID assoc cmisconstants.DATATYPE_ID/] [#-- TODO: spec id, how to map? --] -[@namedvalue cmisconstants.PROP_OBJECT_ID assoc cmisconstants.DATATYPE_ID/] [#-- TODO: id compliant --] -[@linksLib.linkassocself assoc/] -[@linksLib.linkassocedit assoc/] -[@assocCMISLinks assoc=assoc/] -${xmldate(date)} [#-- TODO: [@namedvalue cmisconstants.PROP_CREATION_DATE assoc cmisconstants.DATATYPE_DATETIME/] --] -[@namedvalue cmisconstants.PROP_OBJECT_ID assoc cmisconstants.DATATYPE_ID/] [#-- TODO: spec id, how to map? --] -[@namedvalue cmisconstants.PROP_OBJECT_ID assoc cmisconstants.DATATYPE_ID/] [#-- TODO: spec id, how to map? --] -${xmldate(date)} [#-- TODO: [@namedvalue cmisconstants.PROP_LAST_MODIFICATION_DATE assoc cmisconstants.DATATYPE_DATETIME/] --] -${xmldate(date)} [#-- TODO: [@namedvalue cmisconstants.PROP_LAST_MODIFICATION_DATE assoc cmisconstants.DATATYPE_DATETIME/] --] - -[@objectCMISProps assoc propfilter/] -[#-- TODO: [#if includeallowableactions][@allowableactions node/][/#if] --] - -[/@entry] -[/#macro] - -[#macro assocCMISLinks assoc] -[#-- TODO: --] -[@linksLib.linktype assoc/] -[@linksLib.linktosource assoc.source/] -[@linksLib.linktotarget assoc.target/] -[@linksLib.linkservice/] -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Query Row --] -[#-- --] - -[#-- TODO: spec issue 47 --] -[#macro row row includeallowableactions=false] -[@entry] -[#-- TODO: calculate multiNodeResultSet from result set --] -[#if row.nodes?? && row.nodes?size == 1][#assign node = row.nodes?first/][/#if] -[#if node??] -${node.properties.creator!""} -[#-- TODO: review if consistent with ATOM --] -[#if node.isDocument] - [@contentstream node/] -[#else] - ${node.id} [#-- TODO --] -[/#if] -urn:uuid:${node.id} -[@linksLib.linknodeself node/] -[@linksLib.linknodeedit node/] -[#if node.isDocument] - [@linksLib.linkstream node "enclosure"/] - [@linksLib.linkstream node "edit-media"/] - [@documentCMISLinks node=node/] -[#else] - [@folderCMISLinks node=node/] -[/#if] -${node.name} -${xmldate(node.properties.modified)} -${absurl(url.context)}${node.icon16} -[#else] -${person.properties.userName} -urn:uuid:row-${row.index?c} -Row ${row.index?c} -${xmldate(now)} -[/#if] - - -[#assign rowvalues = row.values] -[#list rowvalues?keys as colname] - [#assign coltype = row.getColumnType(colname)] - [#if rowvalues[colname]??] - [@propvalue colname rowvalues[colname] coltype/] - [#else] - [@propnull colname coltype/] - [/#if] -[/#list] - -[#if node?? && includeallowableactions][@allowableactions node/][/#if] - -[/@entry] -[/#macro] - - -[#-- --] -[#-- CMIS Properties --] -[#-- --] - -[#macro filter filter value] -[#if filter == "*" || filter?index_of(value) != -1 || filter?matches(value,'i')][#nested][/#if] -[/#macro] - -[#macro prop name object type] -[#assign value=cmisproperty(object, name)/] -[#if value?is_string || value?is_number || value?is_boolean || value?is_date || value?is_enumerable] -[@propvalue name value type/] -[#elseif value.class.canonicalName?ends_with("NULL")] -[@propnull name type/] -[/#if] -[/#macro] - -[#macro propvalue name value type] -[#if type == cmisconstants.DATATYPE_STRING] -[@values value;v][@stringvalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_INTEGER] -[@values value;v][@integervalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_DECIMAL] -[@values value;v][@decimalvalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_BOOLEAN] -[@values value;v][@booleanvalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_DATETIME] -[@values value;v][@datetimevalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_URI] -[#-- TODO: check validity of abs url prefix --] -[@values value;v][@urivalue absurl(url.serviceContext) + v/][/@values] -[#elseif type == cmisconstants.DATATYPE_ID] -[@values value;v][@idvalue v/][/@values] -[#-- TODO: remaining property types --] -[/#if] -[/#macro] - -[#macro propnull name type] -[#if type == cmisconstants.DATATYPE_STRING] - -[#elseif type == cmisconstants.DATATYPE_INTEGER] - -[#elseif type == cmisconstants.DATATYPE_DECIMAL] - -[#elseif type == cmisconstants.DATATYPE_BOOLEAN] - -[#elseif type == cmisconstants.DATATYPE_DATETIME] - -[#elseif type == cmisconstants.DATATYPE_URI] - -[#elseif type == cmisconstants.DATATYPE_ID] - -[#-- TODO: remaining property types --] -[/#if] -[/#macro] - - -[#-- --] -[#-- CMIS Values --] -[#-- --] - -[#macro namedvalue name object type] -[#assign value=cmisproperty(object, name)/] -[#if value?is_string || value?is_number || value?is_boolean || value?is_date || value?is_enumerable][@typedvalue value type/][#elseif value.class.canonicalName?ends_with("NULL")][/#if] -[/#macro] - -[#macro typedvalue value type] -[#if type== cmisconstants.DATATYPE_STRING] -[@values value;v][@stringvalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_INTEGER] -[@values value;v][@integervalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_DECIMAL] -[@values value;v][@decimalvalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_BOOLEAN] -[@values value;v][@booleanvalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_DATETIME] -[@values value;v][@datetimevalue v/][/@values] -[#elseif type == cmisconstants.DATATYPE_URI] -[#-- TODO: check validity of abs url prefix --] -[@values value;v][@urivalue absurl(url.serviceContext) + v/][/@values] -[#elseif type == cmisconstants.DATATYPE_ID] -[@values value;v][@idvalue v/][/@values] -[#-- TODO: remaining property types --] -[/#if] -[/#macro] - -[#macro values vals][#if vals?is_enumerable][#list vals as val][#nested val][/#list][#else][#nested vals][/#if][/#macro] - -[#macro stringvalue value]${value}[/#macro] -[#macro integervalue value]${value?c}[/#macro] -[#macro decimalvalue value]${value?c}[/#macro] -[#macro booleanvalue value]${value?string}[/#macro] -[#macro datetimevalue value]${xmldate(value)}[/#macro] -[#macro urivalue value]${value}[/#macro] -[#macro idvalue value]${value}[/#macro] - - -[#-- --] -[#-- CMIS Allowable Actions --] -[#-- --] - -[#macro allowableactions node ns=""] - -[#nested] -[#assign typedef = cmistype(node)] -[#list typedef.actionEvaluators?values as actionevaluator] - [@allowableaction node actionevaluator/] -[/#list] - -[/#macro] - -[#macro allowableaction node actionevaluator] -${actionevaluator.isAllowed(node.nodeRef)?string} -[/#macro] - - -[#-- --] -[#-- ATOM Entry for Type Definition --] -[#-- --] - -[#macro typedef typedefn includeProperties=true includeInheritedProperties=true ns="" depth=1 maxdepth=1] -[@entry ns=ns] -${person.properties.userName} -${typedefn.typeId.id} [#-- TODO --] -urn:uuid:type-${typedefn.typeId.id} -[@linksLib.linktypeself typedefn/] -[@typedefCMISLinks typedefn/] -[#if typedefn.description??]${typedefn.description?xml}[#else]${typedefn.displayName?xml}[/#if] -${typedefn.displayName} -${xmldate(date)} [#-- TODO --] -[@typedefCMISProps typedefn includeProperties/] -[#-- recurse for depth greater than 1 --] -[#if maxdepth == -1 || depth < maxdepth] -[#assign nested = typedefn.getSubTypes(false)/] -[#if nested?size > 1] - -[@feedLib.generic "urn:uuid:type-${typedefn.typeId.id}-descendants" "Type ${typedefn.displayName} Descendants" "${person.properties.userName}"] - [@linksLib.linktypedescendants typedefn "self"/] -[/@feedLib.generic] -[#list nested as child] - [@typedef child includeProperties includeInheritedProperties ns depth+1 maxdepth/] -[/#list] - -[/#if] -[/#if] -[/@entry] -[/#macro] - -[#macro typedefCMISLinks typedef] -[@linksLib.linktype typedef/] -[#if typedef.parentType??] -[@linksLib.linktypeparent typedef/] -[/#if] -[@linksLib.linktypechildren typedef/] -[@linksLib.linktypedescendants typedef/] -[@linksLib.linkservice/] -[/#macro] - -[#macro typedefCMISProps typedef includeProperties=true includeInheritedProperties=true] -[#if typedef.baseType.typeId.id = cmisconstants.TYPE_DOCUMENT] -[@documenttypedefCMISProps typedef includeProperties includeInheritedProperties/] -[#elseif typedef.baseType.typeId.id = cmisconstants.TYPE_FOLDER] -[@foldertypedefCMISProps typedef includeProperties includeInheritedProperties/] -[#elseif typedef.baseType.typeId.id = cmisconstants.TYPE_RELATIONSHIP] -[@relationshiptypedefCMISProps typedef includeProperties includeInheritedProperties/] -[#elseif typedef.baseType.typeId.id = cmisconstants.TYPE_POLICY] -[@policytypedefCMISProps typedef includeProperties includeInheritedProperties/] -[/#if] -[/#macro] - -[#macro documenttypedefCMISProps typedef includeProperties=true includeInheritedProperties=true] - - [@objecttypedefCMISProps typedef includeProperties includeInheritedProperties/] - ${typedef.versionable?string} - ${typedef.contentStreamAllowed.label} - -[/#macro] - -[#macro foldertypedefCMISProps typedef includeProperties=true includeInheritedProperties=true] - - [@objecttypedefCMISProps typedef includeProperties includeInheritedProperties/] - -[/#macro] - -[#macro relationshiptypedefCMISProps typedef includeProperties=true includeInheritedProperties=true] - - [@objecttypedefCMISProps typedef includeProperties includeInheritedProperties/] - [#list typedef.allowedSourceTypes as allowedSourceType] - ${allowedSourceType.typeId.id} - [/#list] - [#list typedef.allowedTargetTypes as allowedTargetType] - ${allowedTargetType.typeId.id} - [/#list] - -[/#macro] - -[#macro policytypedefCMISProps typedef includeProperties=true includeInheritedProperties=true] - - [@objecttypedefCMISProps typedef includeProperties includeInheritedProperties/] - -[/#macro] - -[#macro objecttypedefCMISProps typedef includeProperties=true includeInheritedProperties=true] - ${typedef.typeId.id} - ${typedef.typeId.localName} - ${typedef.typeId.localNamespace} - [#if typedef.displayName??]${typedef.displayName?xml}[/#if] - ${typedef.queryName} - [#if typedef.description??]${typedef.description?xml}[/#if] - ${typedef.baseType.typeId.id} -[#if typedef.parentType??] - ${typedef.parentType.typeId.id} -[/#if] - ${typedef.creatable?string} - ${typedef.fileable?string} - ${typedef.queryable?string} - ${typedef.fullTextIndexed?string} - ${typedef.includeInSuperTypeQuery?string} - ${typedef.controllablePolicy?string} - ${typedef.controllableACL?string} - [#if includeProperties] - [#assign ownedprops = typedef.ownedPropertyDefinitions?keys] - [#list typedef.propertyDefinitions?values as propdef] - [#assign inherited = !ownedprops?seq_contains(propdef.propertyId)] - [#if includeInheritedProperties || !inherited] - [@propdefCMISProps propdef inherited/] - [/#if] - [/#list] - [/#if] -[/#macro] - -[#macro propdefCMISProps propdef inherited=false] -[#if propdef.dataType.label == cmisconstants.DATATYPE_BOOLEAN] -[@booleanpropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_ID] -[@idpropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_INTEGER] -[@integerpropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_DATETIME] -[@datetimepropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_DECIMAL] -[@decimalpropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_HTML] -[@htmlpropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_STRING] -[@stringpropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_URI] -[@uripropdefCMISProps propdef inherited/] -[#elseif propdef.dataType.label == cmisconstants.DATATYPE_XML] -[@xmlpropdefCMISProps propdef inherited/] -[/#if] -[/#macro] - -[#macro booleanpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] - -[/#macro] - -[#macro idpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] - -[/#macro] - -[#macro integerpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] -[#-- TODO: minValue, maxValue --] - -[/#macro] - -[#macro datetimepropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] - -[/#macro] - -[#macro decimalpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] - -[/#macro] - -[#macro htmlpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] - -[/#macro] - -[#macro stringpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] -[#if propdef.maximumLength != -1] -${propdef.maximumLength} -[/#if] - -[/#macro] - -[#macro uripropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] - -[/#macro] - -[#macro xmlpropdefCMISProps propdef inherited=false] - -[@abstractpropdefCMISProps propdef inherited/] -[#-- TODO: scheme, uri --] - -[/#macro] - -[#macro abstractpropdefCMISProps propdef inherited=false] - ${propdef.propertyId.id} - ${propdef.propertyId.localName} - ${propdef.propertyId.localNamespace} - [#if propdef.displayName??]${propdef.displayName?xml}[/#if] - ${propdef.queryName} -[#if propdef.description??] - ${propdef.description?xml} -[/#if] - ${propdef.dataType.label} - ${propdef.cardinality.label} - ${propdef.updatability.label} - ${inherited?string} - ${propdef.required?string} - ${propdef.queryable?string} - ${propdef.orderable?string} - [@cmisChoices propdef.choices propdef.dataType.label/] - ${propdef.openChoice?string} -[#if propdef.defaultValue??] - [#-- TODO: defaults for HTML and XML property types --] - ${propdef.defaultValue} -[/#if] -[/#macro] - -[#macro cmisChoices choices type] -[#if choices?exists] -[#list choices as choice] -[#if type == cmisconstants.DATATYPE_STRING] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#elseif type == cmisconstants.DATATYPE_INTEGER] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#elseif type == cmisconstants.DATATYPE_DECIMAL] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#elseif type == cmisconstants.DATATYPE_BOOLEAN] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#elseif type == cmisconstants.DATATYPE_DATETIME] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#elseif type == cmisconstants.DATATYPE_URI] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#elseif type == cmisconstants.DATATYPE_ID] - -[@cmisChoices choice.children type/] -[@stringvalue choice.value/] - -[#-- TODO: remaining property types --] -[/#if] -[/#list] -[/#if] -[/#macro] - - -[#-- --] -[#-- General Utils --] -[#-- --] - -[#-- Helper to render Atom Summary --] -[#macro contentsummary node][#if node.properties.description??]${node.properties.description}[#elseif node.properties.title??]${node.properties.title}[#elseif node.mimetype?? && node.mimetype == "text/plain"]${cropContent(node.properties.content, 50)}[#else]${node.properties.name}[/#if][/#macro] - -[#-- Helper to render Alfresco content type to Atom content type --] -[#macro contenttype type][#if type == "text/html"]text[#elseif type == "text/xhtml"]xhtml[#elseif type == "text/plain"]text<#else>${type}[/#if][/#macro] - -[#-- Helper to render atom content element --] -[#macro contentstream node][/#macro] diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.html.ftl deleted file mode 100644 index 7790889ec9..0000000000 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.html.ftl +++ /dev/null @@ -1,151 +0,0 @@ -[#ftl] - - - - - - Alfresco CMIS - - - - - - -
- - -
-
-

Explore and Test CMIS

-

The CMIS (Content Management Interoperability Services) specification is now very close to Public Review.

-

This site hosts a CMIS Repository and CMIS AtomPub TCK to assist the development of the specification and promote interoperability between up-and-coming implementations. Feel free to use them for building and testing your own CMIS clients and servers.

-

Frequent updates are made to both the Repository and TCK as issues are resolved or new capabilities added. Currently, version ${cmisVersion} of the CMIS specification is supported.

- - -

Alfresco CMIS Repository

-

Point your CMIS client to one of the following Alfresco CMIS bindings (with user=admin and password=admin).

- - -

You can also browse this repository via the CMIS FileShare browser.

- -
+ CMIS Repository Information
- - - - - - - - - - -
+ CMIS Repository Capabilities
- - - - - - - - - - - - - - - - - -

Note: The contents of this repository may be cleaned at any time.

- - -

CMIS AtomPub TCK

-

Point the TCK (Test Compatibility Kit) at your CMIS Repository AtomPub Service Document. Provide credentials (or leave blank, if authentication not required) and adjust options as necessary. Hit the 'Start TCK' button for a test report.

-

Tip: Enable the 'Trace Reqs/Responses' option for examples of conversations with a CMIS Repository via AtomPub.

-

Note: This TCK is now contributed to Apache Chemistry.

- -
-
- CMIS Repository -

-

-

-
-
- Options -

-

-

-

-

- - [#list tckTests as test][/#list] -

-
-

-
-
- -
-

CMIS Resources

- -

Alfresco Resources

- -

Apache Chemistry

-
-

CMIS FileShare

- -

Provide Feedback

- -
-
- - -
- - - diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.html.ftl index 3cd2fe9e92..868cc60220 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.html.ftl @@ -135,7 +135,7 @@
  • Download Repository
  • Source Code for Repository
  • Changes: v0.62 to v0.7
  • -
  • Changes: v0.7 to v1.0 cd04
  • +
  • Changes: v0.7 to v1.0 cd04
  • Apache Chemistry

      diff --git a/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java b/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java index d3ac599647..9fa7f2e939 100644 --- a/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java +++ b/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java @@ -197,6 +197,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na */ public CmisObjectType getFolderParent(String repositoryId, String folderId, String filter, CmisExtensionType extension) throws CmisException { + // FIXME: [BUG] It is necessary to check with specification for behaviour of this method with folderId equal to rootFolderId!!! checkRepositoryId(repositoryId); if ((filter != null) && !filter.equals("") && !filter.equals("*")) diff --git a/source/java/org/alfresco/repo/cmis/ws/DMRepositoryServicePort.java b/source/java/org/alfresco/repo/cmis/ws/DMRepositoryServicePort.java index e6671a15d4..476946d16f 100644 --- a/source/java/org/alfresco/repo/cmis/ws/DMRepositoryServicePort.java +++ b/source/java/org/alfresco/repo/cmis/ws/DMRepositoryServicePort.java @@ -97,7 +97,6 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re propertyTypeEnumMapping.put(CMISDataTypeEnum.INTEGER, EnumPropertyType.INTEGER); propertyTypeEnumMapping.put(CMISDataTypeEnum.STRING, EnumPropertyType.STRING); propertyTypeEnumMapping.put(CMISDataTypeEnum.URI, EnumPropertyType.URI); - propertyTypeEnumMapping.put(CMISDataTypeEnum.XML, EnumPropertyType.XML); queryTypeEnumMapping = new HashMap(); queryTypeEnumMapping.put(CMISQueryEnum.BOTH_COMBINED, EnumCapabilityQuery.BOTHCOMBINED); @@ -223,8 +222,6 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re break; case URI: break; - case XML: - break; } return result; } @@ -286,10 +283,6 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re { return new CmisPropertyUriDefinitionType(); } - case XML: - { - return new CmisPropertyXmlDefinitionType(); - } default: { throw cmisObjectsUtils.createCmisException(type.getLabel(), EnumServiceException.OBJECT_NOT_FOUND); diff --git a/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java b/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java index 98d90900c5..134218fcee 100755 --- a/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java +++ b/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java @@ -25,7 +25,9 @@ package org.alfresco.repo.cmis.ws.utils; import java.math.BigInteger; +import java.util.Collection; import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -387,33 +389,25 @@ public class CmisObjectsUtils */ public NodeRef getLatestNode(NodeRef documentNodeRef, boolean major) { - Version specifiedVersion = versionService.getCurrentVersion(documentNodeRef); NodeRef latestVersionNodeRef = documentNodeRef; - - if ((null != specifiedVersion) && (null != specifiedVersion.getVersionedNodeRef())) + VersionHistory versionHistory = versionService.getVersionHistory(documentNodeRef); + if (null != versionHistory) { - latestVersionNodeRef = specifiedVersion.getVersionedNodeRef(); - - if (major) + Collection allVersions = versionHistory.getAllVersions(); + Iterator versionsIterator = ((null != allVersions) && !allVersions.isEmpty()) ? (allVersions.iterator()) : (null); + Version latestVersion = (null == versionsIterator) ? (null) : (versionsIterator.next()); + String currentVersionLabel = (null != latestVersion) ? (latestVersion.getVersionLabel()) : (null); + if (major && (null != latestVersion)) { - Version latestVersion = versionService.getCurrentVersion(latestVersionNodeRef); - - if ((null != latestVersion) && (VersionType.MAJOR != latestVersion.getVersionType())) + for (; (VersionType.MAJOR != latestVersion.getVersionType()) && versionsIterator.hasNext(); latestVersion = versionsIterator.next()) { - VersionHistory versionHistory = versionService.getVersionHistory(latestVersion.getFrozenStateNodeRef()); - if (null != versionHistory) - { - for (latestVersion = versionHistory.getPredecessor(latestVersion); (null != latestVersion) && (VersionType.MAJOR != latestVersion.getVersionType()); latestVersion = versionHistory - .getPredecessor(latestVersion)) - { - } - } - - if ((null != latestVersion) && (null != latestVersion.getFrozenStateNodeRef())) - { - latestVersionNodeRef = latestVersion.getFrozenStateNodeRef(); - } } + latestVersion = (VersionType.MAJOR != latestVersion.getVersionType()) ? (null) : (latestVersion); + } + if ((null != latestVersion) && (null != latestVersion.getVersionLabel())) + { + latestVersionNodeRef = (!latestVersion.getVersionLabel().equals(currentVersionLabel) || (null == latestVersion.getVersionedNodeRef()) || !nodeService + .exists(latestVersion.getVersionedNodeRef())) ? (latestVersion.getFrozenStateNodeRef()) : (latestVersion.getVersionedNodeRef()); } } diff --git a/source/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java b/source/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java index 62b48dab14..3ce998e839 100755 --- a/source/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java +++ b/source/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java @@ -476,7 +476,7 @@ public class PropertyUtil return PropertyCheckingStateEnum.PROPERTY_NOT_UPDATABLE; } - if (propertyDefinition.isRequired() && (value == null)) + if (propertyDefinition.isRequired() && (null == value)) { throw cmisObjectsUtils.createCmisException((propertyName + " property required"), EnumServiceException.CONSTRAINT); } @@ -499,7 +499,7 @@ public class PropertyUtil return PropertyCheckingStateEnum.PROPERTY_CHECKED; } - private enum PropertyCheckingStateEnum + public enum PropertyCheckingStateEnum { PROPERTY_CHECKED, PROPERTY_NATIVE, PROPERTY_NOT_UPDATABLE; } @@ -733,25 +733,6 @@ public class PropertyUtil return property; } - case XML: - { - CmisPropertyXml property = new CmisPropertyXml(); - property.setPdid(pdid); - - if (value instanceof Collection) - { - for (CmisPropertyXml.Value propertyValue : (Collection) value) - { - property.getValue().add(propertyValue); - } - } - else - { - property.getValue().add((CmisPropertyXml.Value) value); - } - - return property; - } case HTML: { CmisPropertyHtml property = new CmisPropertyHtml(); diff --git a/source/wsdl/build.properties b/source/wsdl/build.properties deleted file mode 100644 index 6d74ab4000..0000000000 --- a/source/wsdl/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -basedir=/Users/davidc/Dev/projects/cmis063/code/root/projects/remote-api -lib=/Users/davidc/Dev/software/apache-cxf-2.1.2/lib \ No newline at end of file diff --git a/source/wsdl/build.xml b/source/wsdl/build.xml deleted file mode 100644 index d33261cbb1..0000000000 --- a/source/wsdl/build.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file