mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged DEV/CMIS0_61 to HEAD (part 2)
14002 Removed use of Headers as arguments in CMIS AtomPub binding - as removed in CMIS 0.6 spec - removed associated tests - fixed encoding issue in web script test harness logging - removed very old .XSDs that were lying around 14006 Obsolete. 14022 Suport for multi-valued properties in CMIS AtomPub binding - support in all read, write and query methods - added multi-valued tests to CMISCustomTypeTest - fix workaround for null property values in CMIS freemarker template - update to Abdera CMIS Extension to handle multi-valued properties git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14175 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
[#macro folderCMISLinks node]
|
||||
<link rel="allowableactions" href="${absurl(url.serviceContext)}/api/node/${node.nodeRef.storeRef.protocol}/${node.nodeRef.storeRef.identifier}/${node.nodeRef.id}/permissions"/>
|
||||
<link rel="relationships" href="${absurl(url.serviceContext)}/api/node/${node.nodeRef.storeRef.protocol}/${node.nodeRef.storeRef.identifier}/${node.nodeRef.id}/associations"/>
|
||||
[#if cmisproperty(node, "ParentId")??]
|
||||
[#if cmisproperty(node, "ParentId")?is_string]
|
||||
<link rel="parent" href="${absurl(url.serviceContext)}/api/node/${node.nodeRef.storeRef.protocol}/${node.nodeRef.storeRef.identifier}/${node.nodeRef.id}/parent"/>
|
||||
[/#if]
|
||||
<link rel="children" href="${absurl(url.serviceContext)}/api/node/${node.nodeRef.storeRef.protocol}/${node.nodeRef.storeRef.identifier}/${node.nodeRef.id}/children"/>
|
||||
@@ -213,11 +213,11 @@
|
||||
[@propvalue "BaseType" "folder" "STRING"/]
|
||||
[/#if]
|
||||
|
||||
[#assign values = row.values]
|
||||
[#list values?keys as colname]
|
||||
[#assign rowvalues = row.values]
|
||||
[#list rowvalues?keys as colname]
|
||||
[#assign coltype = row.getColumnType(colname)]
|
||||
[#if values[colname]??]
|
||||
[@propvalue colname values[colname] coltype/]
|
||||
[#if rowvalues[colname]??]
|
||||
[@propvalue colname rowvalues[colname] coltype/]
|
||||
[#else]
|
||||
[@propnull colname coltype/]
|
||||
[/#if]
|
||||
@@ -240,31 +240,30 @@
|
||||
[/#macro]
|
||||
|
||||
[#macro prop name node type]
|
||||
[#-- TODO: Freemarker doesn't support NULL - better workaround required --]
|
||||
[#assign value=cmisproperty(node, name)!"__N_U_L_L__"/]
|
||||
[#if value?is_string && value == "__N_U_L_L__"]
|
||||
[@propnull name type/]
|
||||
[#else]
|
||||
[#assign value=cmisproperty(node, 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 == "STRING"]
|
||||
<cmis:propertyString cmis:name="${name}">[@stringvalue value/]</cmis:propertyString>
|
||||
<cmis:propertyString cmis:name="${name}">[@values value;v][@stringvalue v/][/@values]</cmis:propertyString>
|
||||
[#elseif type == "INTEGER"]
|
||||
<cmis:propertyInteger cmis:name="${name}">[@integervalue value/]</cmis:propertyInteger>
|
||||
<cmis:propertyInteger cmis:name="${name}">[@values value;v][@integervalue v/][/@values]</cmis:propertyInteger>
|
||||
[#elseif type == "DECIMAL"]
|
||||
<cmis:propertyDecimal cmis:name="${name}">[@decimalvalue value/]</cmis:propertyDecimal>
|
||||
<cmis:propertyDecimal cmis:name="${name}">[@values value;v][@decimalvalue v/][/@values]</cmis:propertyDecimal>
|
||||
[#elseif type == "BOOLEAN"]
|
||||
<cmis:propertyBoolean cmis:name="${name}">[@booleanvalue value/]</cmis:propertyBoolean>
|
||||
<cmis:propertyBoolean cmis:name="${name}">[@values value;v][@booleanvalue v/][/@values]</cmis:propertyBoolean>
|
||||
[#elseif type == "DATETIME"]
|
||||
<cmis:propertyDateTime cmis:name="${name}">[@datetimevalue value/]</cmis:propertyDateTime>
|
||||
<cmis:propertyDateTime cmis:name="${name}">[@values value;v][@datetimevalue v/][/@values]</cmis:propertyDateTime>
|
||||
[#elseif type == "URI"]
|
||||
[#-- TODO: check validity of abs url prefix --]
|
||||
<cmis:propertyUri cmis:name="${name}">[@urivalue absurl(url.serviceContext) + value/]</cmis:propertyUri>
|
||||
<cmis:propertyUri cmis:name="${name}">[@values value;v][@urivalue absurl(url.serviceContext) + v/][/@values]</cmis:propertyUri>
|
||||
[#elseif type == "ID"]
|
||||
<cmis:propertyId cmis:name="${name}">[@idvalue value/]</cmis:propertyId>
|
||||
<cmis:propertyId cmis:name="${name}">[@values value;v][@idvalue v/][/@values]</cmis:propertyId>
|
||||
[#-- TODO: remaining property types --]
|
||||
[/#if]
|
||||
[/#macro]
|
||||
@@ -293,6 +292,8 @@
|
||||
[#-- CMIS Values --]
|
||||
[#-- --]
|
||||
|
||||
[#macro values vals][#if vals?is_enumerable][#list vals as val][#nested val][/#list][#else][#nested vals][/#if][/#macro]
|
||||
|
||||
[#macro stringvalue value]<cmis:value>${value}</cmis:value>[/#macro]
|
||||
[#macro integervalue value]<cmis:value>${value?c}</cmis:value>[/#macro]
|
||||
[#macro decimalvalue value]<cmis:value>${value?c}</cmis:value>[/#macro]
|
||||
|
@@ -10,7 +10,7 @@
|
||||
function createNode(parent, entry, slug)
|
||||
{
|
||||
var object = entry.getExtension(atom.names.cmis_object);
|
||||
var typeId = (object !== null) ? object.objectTypeId.value : null;
|
||||
var typeId = (object !== null) ? object.objectTypeId.nativeValue : null;
|
||||
|
||||
// locate type definition
|
||||
// TODO: check this against spec - default to Document, if not specified
|
||||
@@ -151,8 +151,21 @@ function updateNode(node, entry, exclude, pwc)
|
||||
var prop = (props == null) ? null : props.find(propName);
|
||||
if (prop != null && !prop.isNull())
|
||||
{
|
||||
// TODO: handle multi-valued properties
|
||||
val = prop.value;
|
||||
if (prop.isMultiValued())
|
||||
{
|
||||
if (propDef.updatability === Packages.org.alfresco.cmis.CMISCardinalityEnum.MULTI_VALUED)
|
||||
{
|
||||
status.code = 500;
|
||||
status.message = "Property " + propName + " is single valued."
|
||||
status.redirect = true;
|
||||
return null;
|
||||
}
|
||||
val = prop.nativeValues;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = prop.nativeValue;
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: special case name: entry.title overrides cmis:name
|
||||
|
@@ -8,13 +8,12 @@ Inputs:<br>
|
||||
<br>
|
||||
String url: CMIS service url of the repository to test<br>
|
||||
String user: username/password for authentication (HTTP BASIC Authentication)<br>
|
||||
String args: Enum url, headers or both - dictates how arguments are passed to services (Default: url)<br>
|
||||
boolean validate: true => validate repository responses against CMIS XSDs<br>
|
||||
boolean trace: true => trace request and response bodies
|
||||
String tests: names of tests to execute (use * in test name to represent wildcard) (Default: *)<br>
|
||||
]]>
|
||||
</description>
|
||||
<url>/api/cmis/test?url={serviceUrl}&user={user?}&args={args?}&validate={validate?}&trace={trace?}&tests={tests?}</url>
|
||||
<url>/api/cmis/test?url={serviceUrl}&user={user?}&validate={validate?}&trace={trace?}&tests={tests?}</url>
|
||||
<authentication>none</authentication>
|
||||
<format default="text"/>
|
||||
<family>CMIS</family>
|
||||
|
@@ -33,7 +33,6 @@
|
||||
<tr><td>Username/Password: <input name="user" value=""> ** enter in the form of username/password</td></tr>
|
||||
<tr><td>Validate Responses: <input type="checkbox" name="validate" value="true" checked="checked"></td></tr>
|
||||
<tr><td>Trace Request/Responses: <input type="checkbox" name="trace" value="true"></td></tr>
|
||||
<tr><td>Argument Style: <select name="args"><option value="url" selected="selected">URL Arguments</option><option value="headers">Request Headers</option><option value="both">Both</option></select></td></tr>
|
||||
<tr><td>Tests (use * for wildcard in name): <input name="tests" value="*"></td></tr>
|
||||
<tr><td>** available tests: <#list tests as test>${test}<#if test_has_next>, </#if></#list></td></tr>
|
||||
<tr><td><input type="submit" value="Test"></td></tr>
|
||||
@@ -68,8 +67,7 @@
|
||||
<tr><td>AllVersionsSearchable:</td><td>${allVersionsSearchable?string}</td></tr>
|
||||
<tr><td>Query:</td><td>${querySupport}</td></tr>
|
||||
<tr><td>Join:</td><td>${joinSupport}</td></tr>
|
||||
<tr><td>FullText:</td></td><td>${fullTextSupport}</td></tr>
|
||||
<tr><td>VersionsSupported:</td><td>${cmisVersion}</td></tr>
|
||||
<tr><td>VersionSupported:</td><td>${cmisVersion}</td></tr>
|
||||
<tr><td>repositorySpecificInformation:</td><td>[none]</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@@ -2,7 +2,7 @@ script:
|
||||
{
|
||||
// locate (optional) folder
|
||||
model.folder = null;
|
||||
var folderId = cmis.findArg(args.folderId, headers["CMIS-folderId"]);
|
||||
var folderId = args[cmis.ARG_FOLDER_ID];
|
||||
if (folderId !== null)
|
||||
{
|
||||
model.folder = search.findNode(folderId);
|
||||
@@ -25,18 +25,18 @@ script:
|
||||
model.includeDescendants = (args.includeDescendants == "true") ? true : false;
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
}
|
||||
|
||||
// include allowable actions
|
||||
var includeAllowableActions = cmis.findArg(args.includeAllowableActions, headers["CMIS-includeAllowableActions"]);
|
||||
var includeAllowableActions = args[cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS];
|
||||
model.includeAllowableActions = (includeAllowableActions == "true" ? true : false);
|
||||
|
||||
// retrieve checked-out
|
||||
var page = paging.createPageOrWindow(args, headers);
|
||||
var page = paging.createPageOrWindow(args);
|
||||
var paged = cmis.queryCheckedOut(person.properties.userName, model.folder, model.includeDescendants, page);
|
||||
model.results = paged.results;
|
||||
model.cursor = paged.cursor;
|
||||
|
@@ -11,7 +11,7 @@ script:
|
||||
|
||||
// extract object id from atom entry
|
||||
var object = entry.getExtension(atom.names.cmis_object);
|
||||
var objectId = (object !== null) ? object.objectId.value : null;
|
||||
var objectId = (object !== null) ? object.objectId.stringValue : null;
|
||||
if (objectId === null)
|
||||
{
|
||||
status.code = 400;
|
||||
|
@@ -13,7 +13,7 @@ script:
|
||||
}
|
||||
|
||||
// handle filters
|
||||
model.types = cmis.findArg(args.types, headers["CMIS-types"]) === null ? cmis.defaultTypesFilter : cmis.findArg(args.types, headers["CMIS-types"]);
|
||||
model.types = args[cmis.ARG_TYPES] === null ? cmis.defaultTypesFilter : args[cmis.ARG_TYPES];
|
||||
if (!cmis.isValidTypesFilter(model.types))
|
||||
{
|
||||
status.code = 400;
|
||||
@@ -23,18 +23,18 @@ script:
|
||||
}
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
}
|
||||
|
||||
// include allowable actions
|
||||
var includeAllowableActions = cmis.findArg(args.includeAllowableActions, headers["CMIS-includeAllowableActions"]);
|
||||
var includeAllowableActions = args[cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS];
|
||||
model.includeAllowableActions = (includeAllowableActions == "true" ? true : false);
|
||||
|
||||
// retrieve children
|
||||
var page = paging.createPageOrWindow(args, headers);
|
||||
var page = paging.createPageOrWindow(args);
|
||||
var paged = cmis.queryChildren(model.node, model.types, page);
|
||||
model.results = paged.results;
|
||||
model.cursor = paged.cursor;
|
||||
|
@@ -13,7 +13,7 @@ script:
|
||||
}
|
||||
|
||||
// handle filters
|
||||
model.types = cmis.findArg(args.types, headers["CMIS-types"]) === null ? cmis.defaultTypesFilter : cmis.findArg(args.types, headers["CMIS-types"]);
|
||||
model.types = args[cmis.ARG_TYPES] === null ? cmis.defaultTypesFilter : args[ARG_TYPES];
|
||||
if (!cmis.isValidTypesFilter(model.types))
|
||||
{
|
||||
status.code = 400;
|
||||
@@ -23,17 +23,17 @@ script:
|
||||
}
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
}
|
||||
|
||||
// depth
|
||||
var depth = cmis.findArg(args.depth, headers["CMIS-depth"]);
|
||||
var depth = args[cmis.ARG_DEPTH];
|
||||
model.depth = (depth === null) ? 1 : parseInt(depth);
|
||||
|
||||
// include allowable actions
|
||||
var includeAllowableActions = cmis.findArg(args.includeAllowableActions, headers["CMIS-includeAllowableActions"]);
|
||||
var includeAllowableActions = args[cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS];
|
||||
model.includeAllowableActions = (includeAllowableActions == "true" ? true : false);
|
||||
}
|
||||
|
@@ -15,13 +15,13 @@ script:
|
||||
// TODO: handle version??
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
}
|
||||
|
||||
// include allowable actions
|
||||
var includeAllowableActions = cmis.findArg(args.includeAllowableActions, headers["CMIS-includeAllowableActions"]);
|
||||
var includeAllowableActions = args[cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS];
|
||||
model.includeAllowableActions = (includeAllowableActions == "true" ? true : false);
|
||||
}
|
||||
|
@@ -13,18 +13,18 @@ script:
|
||||
}
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
}
|
||||
|
||||
// include allowable actions
|
||||
var includeAllowableActions = cmis.findArg(args.includeAllowableActions, headers["CMIS-includeAllowableActions"]);
|
||||
var includeAllowableActions = args[cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS];
|
||||
model.includeAllowableActions = (includeAllowableActions == "true" ? true : false);
|
||||
|
||||
// retrieve parent
|
||||
var returnToRoot = cmis.findArg(args.returnToRoot, headers["CMIS-returnToRoot"]);
|
||||
var returnToRoot = args[cmis.ARG_RETURN_TO_ROOT];
|
||||
model.returnToRoot = returnToRoot == "true" ? true : false;
|
||||
model.rootNode = cmis.defaultRootFolder;
|
||||
}
|
||||
|
@@ -13,19 +13,19 @@ script:
|
||||
}
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
}
|
||||
|
||||
// include allowable actions
|
||||
var includeAllowableActions = cmis.findArg(args.includeAllowableActions, headers["CMIS-includeAllowableActions"]);
|
||||
var includeAllowableActions = args[cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS];
|
||||
model.includeAllowableActions = (includeAllowableActions == "true" ? true : false);
|
||||
|
||||
// TODO: check returnToRoot is required for getDocumentParents
|
||||
// retrieve parent
|
||||
var returnToRoot = cmis.findArg(args.returnToRoot, headers["CMIS-returnToRoot"]);
|
||||
var returnToRoot = args[cmis.ARG_RETURN_TO_ROOT];
|
||||
model.returnToRoot = returnToRoot == "true" ? true : false;
|
||||
model.rootNode = cmis.defaultRootFolder;
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ script:
|
||||
}
|
||||
|
||||
// check permissions
|
||||
model.checkin = cmis.findArg(args.checkin, headers["CMIS-checkin"]) == "true" ? true : false;
|
||||
model.checkin = args[cmis.ARG_CHECKIN] == "true" ? true : false;
|
||||
if (model.checkin && !model.node.hasPermission("CheckIn"))
|
||||
{
|
||||
status.code = 403;
|
||||
@@ -41,8 +41,8 @@ script:
|
||||
// checkin
|
||||
if (model.checkin)
|
||||
{
|
||||
var comment = cmis.findArg(args.checkinComment, headers["CMIS-checkinComment"]);
|
||||
var major = cmis.findArg(args.major, headers["CMIS-major"]);
|
||||
var comment = args[cmis.ARG_CHECKIN_COMMENT];
|
||||
var major = args[cmis.ARG_MAJOR];
|
||||
major = (major === null || major == "true") ? true : false;
|
||||
model.node = model.node.checkin(comment === null ? "" : comment, major);
|
||||
}
|
||||
|
@@ -12,6 +12,6 @@ script:
|
||||
}
|
||||
|
||||
// handle inherited properties
|
||||
var includeInheritedProperties = cmis.findArg(args.includeInheritedProperties, headers["CMIS-includeInheritedProperties"]);
|
||||
var includeInheritedProperties = args[cmis.ARG_INCLUDE_INHERITED_PROPERTIES];
|
||||
model.includeInheritedProperties = includeInheritedProperties == "false" ? false : true;
|
||||
}
|
||||
|
@@ -12,13 +12,12 @@ script:
|
||||
}
|
||||
|
||||
// query type children
|
||||
var page = paging.createPageOrWindow(args, headers);
|
||||
var page = paging.createPageOrWindow(args);
|
||||
var paged = cmis.queryTypeHierarchy(model.typedef, false, page);
|
||||
model.results = paged.results;
|
||||
model.cursor = paged.cursor;
|
||||
|
||||
// handle property definitions
|
||||
// TODO: spec issue 34
|
||||
var returnPropertyDefinitions = cmis.findArg(args.includePropertyDefinitions, headers["CMIS-includePropertyDefinitions"]);
|
||||
var returnPropertyDefinitions = args[cmis.ARG_INCLUDE_PROPERTY_DEFINITIONS];
|
||||
model.returnPropertyDefinitions = returnPropertyDefinitions == "true" ? true : false;
|
||||
}
|
||||
|
@@ -12,13 +12,12 @@ script:
|
||||
}
|
||||
|
||||
// query type descendants
|
||||
var page = paging.createPageOrWindow(args, headers);
|
||||
var page = paging.createPageOrWindow(args);
|
||||
var paged = cmis.queryTypeHierarchy(model.typedef, true, page);
|
||||
model.results = paged.results;
|
||||
model.cursor = paged.cursor;
|
||||
|
||||
// handle property definitions
|
||||
// TODO: spec issue 34
|
||||
var returnPropertyDefinitions = cmis.findArg(args.includePropertyDefinitions, headers["CMIS-includePropertyDefinitions"]);
|
||||
var returnPropertyDefinitions = args[cmis.ARG_INCLUDE_PROPERTY_DEFINITIONS];
|
||||
model.returnPropertyDefinitions = returnPropertyDefinitions == "true" ? true : false;
|
||||
}
|
||||
|
@@ -1,11 +1,10 @@
|
||||
script:
|
||||
{
|
||||
// process paging
|
||||
var page = paging.createPageOrWindow(args, headers);
|
||||
var page = paging.createPageOrWindow(args);
|
||||
|
||||
// query types
|
||||
// TODO: spec issue 34
|
||||
var typeId = cmis.findArg(args.type, headers["CMIS-type"]);
|
||||
var typeId = args[cmis.ARG_TYPE];
|
||||
if (typeId === null)
|
||||
{
|
||||
// query all types
|
||||
@@ -32,7 +31,6 @@ script:
|
||||
}
|
||||
|
||||
// handle property definitions
|
||||
// TODO: spec issue 34
|
||||
var returnPropertyDefinitions = cmis.findArg(args.includePropertyDefinitions, headers["CMIS-includePropertyDefinitions"]);
|
||||
var returnPropertyDefinitions = args[cmis.ARG_INCLUDE_PROPERTY_DEFINITIONS];
|
||||
model.returnPropertyDefinitions = (returnPropertyDefinitions == "true" ? true : false);
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ script:
|
||||
}
|
||||
|
||||
// property filter
|
||||
model.filter = cmis.findArg(args.filter, headers["CMIS-filter"]);
|
||||
model.filter = args[cmis.ARG_FILTER];
|
||||
if (model.filter === null)
|
||||
{
|
||||
model.filter = "*";
|
||||
|
@@ -30,7 +30,9 @@ import org.alfresco.cmis.CMISServices;
|
||||
import org.alfresco.repo.template.TemplateNode;
|
||||
|
||||
import freemarker.ext.beans.BeanModel;
|
||||
import freemarker.ext.beans.BeansWrapper;
|
||||
import freemarker.template.TemplateMethodModelEx;
|
||||
import freemarker.template.TemplateModel;
|
||||
import freemarker.template.TemplateModelException;
|
||||
import freemarker.template.TemplateScalarModel;
|
||||
|
||||
@@ -45,6 +47,12 @@ import freemarker.template.TemplateScalarModel;
|
||||
*/
|
||||
public final class CMISPropertyValueMethod implements TemplateMethodModelEx
|
||||
{
|
||||
/**
|
||||
* NULL value marker
|
||||
*/
|
||||
public static class NULL {};
|
||||
public static TemplateModel IS_NULL = new BeanModel(new NULL(), BeansWrapper.getDefaultInstance());
|
||||
|
||||
private CMISServices cmisService;
|
||||
|
||||
/**
|
||||
@@ -89,6 +97,6 @@ public final class CMISPropertyValueMethod implements TemplateMethodModelEx
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return result == null ? IS_NULL : result;
|
||||
}
|
||||
}
|
||||
|
@@ -57,6 +57,41 @@ import org.alfresco.service.namespace.QName;
|
||||
*/
|
||||
public class CMISScript extends BaseScopableProcessorExtension
|
||||
{
|
||||
//
|
||||
// Argument Names
|
||||
//
|
||||
|
||||
public static final String ARG_CHILD_TYPES = "childTypes";
|
||||
public static final String ARG_CONTINUE_ON_FAILURE = "continueOnFailure";
|
||||
public static final String ARG_CHECKIN = "checkin";
|
||||
public static final String ARG_CHECKIN_COMMENT = "checkinComment";
|
||||
public static final String ARG_DEPTH = "depth";
|
||||
public static final String ARG_DIRECTION = "direction";
|
||||
public static final String ARG_FILTER = "filter";
|
||||
public static final String ARG_FOLDER_BY_PATH = "folderByPath";
|
||||
public static final String ARG_FOLDER_ID = "folderId";
|
||||
public static final String ARG_INCLUDE_ALLOWABLE_ACTIONS = "includeAllowableActions";
|
||||
public static final String ARG_INCLUDE_PROPERTY_DEFINITIONS = "includePropertyDefinitions";
|
||||
public static final String ARG_INCLUDE_RELATIONSHIPS = "includeRelationships";
|
||||
public static final String ARG_INCLUDE_SUB_RELATIONSHIP_TYPES = "includeSubrelationshipTypes";
|
||||
public static final String ARG_LENGTH = "length";
|
||||
public static final String ARG_MAJOR = "major";
|
||||
public static final String ARG_MAJOR_VERSION = "majorVersion";
|
||||
public static final String ARG_MAX_ITEMS = "maxItems";
|
||||
public static final String ARG_OFFSET = "offset";
|
||||
public static final String ARG_REMOVE_FROM = "removeFrom";
|
||||
public static final String ARG_RELATIONSHIP_TYPE = "relationshipType";
|
||||
public static final String ARG_REPOSITORY_ID = "repositoryId";
|
||||
public static final String ARG_RETURN_TO_ROOT = "returnToRoot";
|
||||
public static final String ARG_RETURN_VERSION = "returnVersion";
|
||||
public static final String ARG_SKIP_COUNT = "skipCount";
|
||||
public static final String ARG_THIS_VERSION = "thisVersion";
|
||||
public static final String ARG_TYPE_ID = "typeId";
|
||||
public static final String ARG_TYPES = "types";
|
||||
public static final String ARG_UNFILE_MULTIFILE_DOCUMENTS = "unfileMultiFiledDocuments";
|
||||
public static final String ARG_VERSIONING_STATE = "versioningState";
|
||||
|
||||
// service dependencies
|
||||
private ServiceRegistry services;
|
||||
private Repository repository;
|
||||
private CMISServices cmisService;
|
||||
@@ -155,34 +190,6 @@ public class CMISScript extends BaseScopableProcessorExtension
|
||||
return new ScriptNode(cmisService.getDefaultRootNodeRef(), services, getScope());
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the arg value from the specified url argument and header
|
||||
*
|
||||
* NOTE: Url argument takes precedence over header
|
||||
*
|
||||
* @param argVal url arg value
|
||||
* @param headerVal header value
|
||||
* @return value (or null)
|
||||
*/
|
||||
public String findArg(String argVal, String headerVal)
|
||||
{
|
||||
return (argVal == null) ? headerVal : argVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the arg value from the specified url argument and header
|
||||
*
|
||||
* NOTE: Url argument takes precedence over header
|
||||
*
|
||||
* @param argVal url arg value
|
||||
* @param headerVal header value
|
||||
* @return value (or null)
|
||||
*/
|
||||
public String[] findArgM(String[] argVal, String[] headerVal)
|
||||
{
|
||||
return (argVal == null) ? headerVal : argVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default Types filter
|
||||
*
|
||||
|
@@ -30,7 +30,6 @@ import java.io.InputStreamReader;
|
||||
import java.io.PrintStream;
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -80,10 +79,6 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
// Repository Access
|
||||
private String serviceUrl = "http://localhost:8080/alfresco/service/api/repository";
|
||||
|
||||
// TODO: remove this for v0.6 of spec
|
||||
// Argument support
|
||||
private boolean argsAsHeaders = false;
|
||||
|
||||
// validation support
|
||||
private CMISValidator cmisValidator = new CMISValidator();
|
||||
private boolean validateResponse = true;
|
||||
@@ -106,16 +101,6 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
this.serviceUrl = serviceUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass URL arguments as headers
|
||||
*
|
||||
* @param argsAsHeaders
|
||||
*/
|
||||
protected void setArgsAsHeaders(boolean argsAsHeaders)
|
||||
{
|
||||
this.argsAsHeaders = argsAsHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate Response
|
||||
*
|
||||
@@ -151,16 +136,6 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
return abdera;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if URL arguments are passed as headers
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected boolean getArgsAsHeaders()
|
||||
{
|
||||
return argsAsHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets CMIS Validator
|
||||
*
|
||||
@@ -305,42 +280,6 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Request to Test Web Script Server
|
||||
* @param req
|
||||
* @param expectedStatus
|
||||
* @param asUser
|
||||
* @return response
|
||||
* @throws IOException
|
||||
*/
|
||||
protected Response sendRequest(Request req, int expectedStatus, String asUser)
|
||||
throws IOException
|
||||
{
|
||||
if (argsAsHeaders)
|
||||
{
|
||||
Map<String, String> args = req.getArgs();
|
||||
if (args != null)
|
||||
{
|
||||
Map<String, String> headers = req.getHeaders();
|
||||
if (headers == null)
|
||||
{
|
||||
headers = new HashMap<String, String>();
|
||||
}
|
||||
for (Map.Entry<String, String> arg : args.entrySet())
|
||||
{
|
||||
headers.put("CMIS-" + arg.getKey(), arg.getValue());
|
||||
}
|
||||
|
||||
req = new Request(req);
|
||||
req.setArgs(null);
|
||||
req.setHeaders(headers);
|
||||
}
|
||||
}
|
||||
|
||||
return super.sendRequest(req, expectedStatus, asUser);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Default Test Listener
|
||||
*/
|
||||
@@ -364,7 +303,7 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
{
|
||||
BaseCMISWebScriptTest cmisTest = (BaseCMISWebScriptTest)test;
|
||||
getWriter().println();
|
||||
getWriter().println("*** Test started: " + cmisTest.getName() + " (remote: " + (cmisTest.getRemoteServer() != null) + ", headers: " + cmisTest.getArgsAsHeaders() + ")");
|
||||
getWriter().println("*** Test started: " + cmisTest.getName() + " (remote: " + (cmisTest.getRemoteServer() != null) + ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +329,7 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
// TODO: fix up self links with arguments
|
||||
if (args == null)
|
||||
{
|
||||
assertEquals(getArgsAsHeaders() ? get.getUri() : get.getFullUri(), entry.getSelfLink().getHref().toString());
|
||||
assertEquals(get.getFullUri(), entry.getSelfLink().getHref().toString());
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
@@ -410,7 +349,7 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
String xml = res.getContentAsString();
|
||||
Feed feed = abdera.parseFeed(new StringReader(xml), null);
|
||||
assertNotNull(feed);
|
||||
assertEquals(getArgsAsHeaders() ? get.getUri() : get.getFullUri(), feed.getSelfLink().getHref().toString());
|
||||
assertEquals(get.getFullUri(), feed.getSelfLink().getHref().toString());
|
||||
return feed;
|
||||
}
|
||||
|
||||
@@ -525,7 +464,7 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
assertEquals(name, entry.getTitle());
|
||||
//assertEquals(name + " (summary)", entry.getSummary());
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
assertEquals("folder", object.getBaseType().getValue());
|
||||
assertEquals("folder", object.getBaseType().getStringValue());
|
||||
String testFolderHREF = (String)res.getHeader("Location");
|
||||
assertNotNull(testFolderHREF);
|
||||
return entry;
|
||||
@@ -556,7 +495,7 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
//assertEquals(name + " (summary)", entry.getSummary());
|
||||
assertNotNull(entry.getContentSrc());
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
assertEquals("document", object.getBaseType().getValue());
|
||||
assertEquals("document", object.getBaseType().getStringValue());
|
||||
String testFileHREF = (String)res.getHeader("Location");
|
||||
assertNotNull(testFileHREF);
|
||||
return entry;
|
||||
@@ -634,10 +573,10 @@ public class BaseCMISWebScriptTest extends BaseWebScriptTest
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
if (object != null)
|
||||
{
|
||||
String strNodeRef = object.getObjectId().getValue();
|
||||
String strNodeRef = object.getObjectId().getStringValue();
|
||||
if (strNodeRef != null)
|
||||
{
|
||||
nodeRef = new NodeRef(object.getObjectId().getValue());
|
||||
nodeRef = new NodeRef(strNodeRef);
|
||||
}
|
||||
}
|
||||
return nodeRef;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
package org.alfresco.repo.cmis.rest.test;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.util.GUID;
|
||||
import org.alfresco.web.scripts.Format;
|
||||
@@ -66,8 +67,8 @@ public class CMISCustomTypeTest extends BaseCMISWebScriptTest
|
||||
// setRemoteServer(server);
|
||||
// setArgsAsHeaders(false);
|
||||
// setValidateResponse(false);
|
||||
setListener(new CMISTestListener(System.out));
|
||||
setTraceReqRes(true);
|
||||
// setListener(new CMISTestListener(System.out));
|
||||
// setTraceReqRes(true);
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
@@ -88,10 +89,10 @@ public class CMISCustomTypeTest extends BaseCMISWebScriptTest
|
||||
assertEquals(entriesBefore +1, entriesAfter);
|
||||
Entry entry = feedFolderAfter.getEntry(folder.getId().toString());
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
assertEquals("F/cmiscustom_folder", object.getObjectTypeId().getValue());
|
||||
assertEquals("F/cmiscustom_folder", object.getObjectTypeId().getStringValue());
|
||||
CMISProperty customProp = object.getProperties().find("cmiscustom_folderprop_string");
|
||||
assertNotNull(customProp);
|
||||
assertEquals("custom string", customProp.getValue());
|
||||
assertEquals("custom string", customProp.getStringValue());
|
||||
}
|
||||
|
||||
public void testCreateDocument()
|
||||
@@ -109,10 +110,17 @@ public class CMISCustomTypeTest extends BaseCMISWebScriptTest
|
||||
assertEquals(entriesBefore +1, entriesAfter);
|
||||
Entry entry = feedFolderAfter.getEntry(folder.getId().toString());
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
assertEquals("D/cmiscustom_document", object.getObjectTypeId().getValue());
|
||||
assertEquals("D/cmiscustom_document", object.getObjectTypeId().getStringValue());
|
||||
CMISProperty customProp = object.getProperties().find("cmiscustom_docprop_string");
|
||||
assertNotNull(customProp);
|
||||
assertEquals("custom string", customProp.getValue());
|
||||
assertEquals("custom string", customProp.getStringValue());
|
||||
CMISProperty multiProp = object.getProperties().find("cmiscustom_docprop_boolean_multi");
|
||||
assertNotNull(multiProp);
|
||||
List<Object> multiValues = multiProp.getNativeValues();
|
||||
assertNotNull(multiValues);
|
||||
assertEquals(2, multiValues.size());
|
||||
assertEquals(true, multiValues.get(0));
|
||||
assertEquals(false, multiValues.get(1));
|
||||
}
|
||||
|
||||
public void testUpdate()
|
||||
@@ -139,10 +147,17 @@ public class CMISCustomTypeTest extends BaseCMISWebScriptTest
|
||||
assertEquals(document.getPublished(), updated.getPublished());
|
||||
assertEquals("Updated Title " + guid, updated.getTitle());
|
||||
CMISObject object = updated.getExtension(CMISConstants.OBJECT);
|
||||
assertEquals("D/cmiscustom_document", object.getObjectTypeId().getValue());
|
||||
assertEquals("D/cmiscustom_document", object.getObjectTypeId().getStringValue());
|
||||
CMISProperty customProp = object.getProperties().find("cmiscustom_docprop_string");
|
||||
assertNotNull(customProp);
|
||||
assertEquals("custom " + guid, customProp.getValue());
|
||||
assertEquals("custom " + guid, customProp.getStringValue());
|
||||
CMISProperty multiProp = object.getProperties().find("cmiscustom_docprop_boolean_multi");
|
||||
assertNotNull(multiProp);
|
||||
List<Object> multiValues = multiProp.getNativeValues();
|
||||
assertNotNull(multiValues);
|
||||
assertEquals(2, multiValues.size());
|
||||
assertEquals(false, multiValues.get(0));
|
||||
assertEquals(true, multiValues.get(1));
|
||||
}
|
||||
|
||||
public void testDelete()
|
||||
@@ -209,15 +224,15 @@ public class CMISCustomTypeTest extends BaseCMISWebScriptTest
|
||||
|
||||
{
|
||||
// construct structured query
|
||||
String query = "SELECT ObjectId, Name, ObjectTypeId, cmiscustom_docprop_string FROM cmiscustom_document " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getValue() + "') " +
|
||||
String query = "SELECT ObjectId, Name, ObjectTypeId, cmiscustom_docprop_string, cmiscustom_docprop_boolean_multi FROM cmiscustom_document " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getStringValue() + "') " +
|
||||
"AND cmiscustom_docprop_string = 'custom string' ";
|
||||
String queryReq = queryDoc.replace("${STATEMENT}", query);
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", "0");
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "5");
|
||||
|
||||
// issue structured query
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
assertNotNull(queryFeed);
|
||||
@@ -226,26 +241,40 @@ public class CMISCustomTypeTest extends BaseCMISWebScriptTest
|
||||
assertNotNull(queryFeed.getEntry(document2.getId().toString()));
|
||||
CMISObject result1 = queryFeed.getEntry(document2.getId().toString()).getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(result1);
|
||||
assertEquals(document2Object.getName().getValue(), result1.getName().getValue());
|
||||
assertEquals(document2Object.getObjectId().getValue(), result1.getObjectId().getValue());
|
||||
assertEquals(document2Object.getObjectTypeId().getValue(), result1.getObjectTypeId().getValue());
|
||||
assertEquals(document2Object.getName().getStringValue(), result1.getName().getStringValue());
|
||||
assertEquals(document2Object.getObjectId().getStringValue(), result1.getObjectId().getStringValue());
|
||||
assertEquals(document2Object.getObjectTypeId().getStringValue(), result1.getObjectTypeId().getStringValue());
|
||||
CMISProperties result1properties = result1.getProperties();
|
||||
assertNotNull(result1properties);
|
||||
CMISProperty result1property = result1properties.find("cmiscustom_docprop_string");
|
||||
assertNotNull(result1property);
|
||||
assertEquals("custom string", result1property.getValue());
|
||||
assertEquals("custom string", result1property.getStringValue());
|
||||
CMISProperty result1multiproperty = result1properties.find("cmiscustom_docprop_boolean_multi");
|
||||
assertNotNull(result1multiproperty);
|
||||
List<Object> result1multiValues = result1multiproperty.getNativeValues();
|
||||
assertNotNull(result1multiValues);
|
||||
assertEquals(2, result1multiValues.size());
|
||||
assertEquals(true, result1multiValues.get(0));
|
||||
assertEquals(false, result1multiValues.get(1));
|
||||
|
||||
assertNotNull(queryFeed.getEntry(document3.getId().toString()));
|
||||
CMISObject result2 = queryFeed.getEntry(document3.getId().toString()).getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(result2);
|
||||
assertEquals(document3Object.getName().getValue(), result2.getName().getValue());
|
||||
assertEquals(document3Object.getObjectId().getValue(), result2.getObjectId().getValue());
|
||||
assertEquals(document3Object.getObjectTypeId().getValue(), result2.getObjectTypeId().getValue());
|
||||
assertEquals(document3Object.getName().getStringValue(), result2.getName().getStringValue());
|
||||
assertEquals(document3Object.getObjectId().getStringValue(), result2.getObjectId().getStringValue());
|
||||
assertEquals(document3Object.getObjectTypeId().getStringValue(), result2.getObjectTypeId().getStringValue());
|
||||
CMISProperties result2properties = result2.getProperties();
|
||||
assertNotNull(result2properties);
|
||||
CMISProperty result2property = result2properties.find("cmiscustom_docprop_string");
|
||||
assertNotNull(result2property);
|
||||
assertEquals("custom string", result2property.getValue());
|
||||
assertEquals("custom string", result2property.getStringValue());
|
||||
CMISProperty result2multiproperty = result1properties.find("cmiscustom_docprop_boolean_multi");
|
||||
assertNotNull(result2multiproperty);
|
||||
List<Object> result2multiValues = result2multiproperty.getNativeValues();
|
||||
assertNotNull(result2multiValues);
|
||||
assertEquals(2, result2multiValues.size());
|
||||
assertEquals(true, result2multiValues.get(0));
|
||||
assertEquals(false, result2multiValues.get(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -69,10 +69,9 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
// server.username = "admin";
|
||||
// server.password = "admin";
|
||||
// setRemoteServer(server);
|
||||
// setArgsAsHeaders(false);
|
||||
// setValidateResponse(false);
|
||||
setListener(new CMISTestListener(System.out));
|
||||
setTraceReqRes(true);
|
||||
// setListener(new CMISTestListener(System.out));
|
||||
// setTraceReqRes(true);
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
@@ -328,8 +327,8 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
for (Entry entry : children.getEntries())
|
||||
{
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(object.getObjectId().getValue());
|
||||
assertNotNull(object.getObjectTypeId().getValue());
|
||||
assertNotNull(object.getObjectId().getStringValue());
|
||||
assertNotNull(object.getObjectTypeId().getStringValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,7 +340,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
for (Entry entry : children.getEntries())
|
||||
{
|
||||
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(object.getObjectId().getValue());
|
||||
assertNotNull(object.getObjectId().getStringValue());
|
||||
assertNull(object.getObjectTypeId());
|
||||
}
|
||||
}
|
||||
@@ -555,6 +554,8 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
String updateFile = loadString("/org/alfresco/repo/cmis/rest/test/updateatomentry.atomentry.xml");
|
||||
Response res = sendRequest(new PutRequest(document.getSelfLink().getHref().toString(), updateFile, Format.ATOMENTRY.mimetype()), 200, getAtomValidator());
|
||||
assertNotNull(res);
|
||||
Entry updated = getAbdera().parseEntry(new StringReader(res.getContentAsString()), null);
|
||||
assertEquals("Iñtërnâtiônàlizætiøn - 2", updated.getTitle());
|
||||
}
|
||||
|
||||
public void testContentStream()
|
||||
@@ -606,7 +607,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
CMISObject childObject = child.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(childObject);
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentUrl(), child.getSelfLink().getHref().toString());
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentId(), childObject.getObjectId().getValue());
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentId(), childObject.getObjectId().getStringValue());
|
||||
CMISAllowableActions objectAllowableActions = childObject.getExtension(CMISConstants.ALLOWABLEACTIONS);
|
||||
assertNotNull(objectAllowableActions);
|
||||
compareAllowableActions((CMISAllowableActions)allowableActions, objectAllowableActions);
|
||||
@@ -636,7 +637,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
CMISObject childObject = child.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(childObject);
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentUrl(), child.getSelfLink().getHref().toString());
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentId(), childObject.getObjectId().getValue());
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentId(), childObject.getObjectId().getStringValue());
|
||||
CMISAllowableActions objectAllowableActions = childObject.getExtension(CMISConstants.ALLOWABLEACTIONS);
|
||||
assertNotNull(objectAllowableActions);
|
||||
compareAllowableActions((CMISAllowableActions)allowableActions, objectAllowableActions);
|
||||
@@ -677,7 +678,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// compare the two
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentUrl(), child.getSelfLink().getHref().toString());
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentId(), childObject.getObjectId().getValue());
|
||||
assertEquals(((CMISAllowableActions)allowableActions).getParentId(), childObject.getObjectId().getStringValue());
|
||||
compareAllowableActions((CMISAllowableActions)allowableActions, objectAllowableActions);
|
||||
}
|
||||
}
|
||||
@@ -689,7 +690,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
// retrieve test folder for checkouts
|
||||
Entry testFolder = createTestFolder("testGetCheckedOut");
|
||||
CMISObject object = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId = object.getObjectId().getValue();
|
||||
String scopeId = object.getObjectId().getStringValue();
|
||||
assertNotNull(scopeId);
|
||||
|
||||
// retrieve checkouts within scope of test checkout folder
|
||||
@@ -729,9 +730,9 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
CMISObject pwcObject = pwc.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(pwcObject);
|
||||
assertTrue(pwcObject.isVersionSeriesCheckedOut().getBooleanValue());
|
||||
assertEquals(docObject.getObjectId().getValue(), pwcObject.getVersionSeriesId().getValue());
|
||||
assertEquals(pwcObject.getObjectId().getValue(), pwcObject.getVersionSeriesCheckedOutId().getValue());
|
||||
assertNotNull(pwcObject.getVersionSeriesCheckedOutBy().getValue());
|
||||
assertEquals(docObject.getObjectId().getStringValue(), pwcObject.getVersionSeriesId().getStringValue());
|
||||
assertEquals(pwcObject.getObjectId().getStringValue(), pwcObject.getVersionSeriesCheckedOutId().getStringValue());
|
||||
assertNotNull(pwcObject.getVersionSeriesCheckedOutBy().getStringValue());
|
||||
|
||||
// retrieve pwc directly
|
||||
Response pwcGetRes = sendRequest(new GetRequest(pwc.getSelfLink().getHref().toString()), 200);
|
||||
@@ -742,13 +743,13 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
CMISObject pwcGetObject = pwc.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(pwcGetObject);
|
||||
assertTrue(pwcGetObject.isVersionSeriesCheckedOut().getBooleanValue());
|
||||
assertEquals(docObject.getObjectId().getValue(), pwcGetObject.getVersionSeriesId().getValue());
|
||||
assertEquals(pwcGetObject.getObjectId().getValue(), pwcGetObject.getVersionSeriesCheckedOutId().getValue());
|
||||
assertNotNull(pwcGetObject.getVersionSeriesCheckedOutBy().getValue());
|
||||
assertEquals(docObject.getObjectId().getStringValue(), pwcGetObject.getVersionSeriesId().getStringValue());
|
||||
assertEquals(pwcGetObject.getObjectId().getStringValue(), pwcGetObject.getVersionSeriesCheckedOutId().getStringValue());
|
||||
assertNotNull(pwcGetObject.getVersionSeriesCheckedOutBy().getStringValue());
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId = object.getObjectId().getValue();
|
||||
String scopeId = object.getObjectId().getStringValue();
|
||||
Map<String, String> args = new HashMap<String, String>();
|
||||
args.put("folderId", scopeId);
|
||||
Feed checkedout = getFeed(new IRI(checkedoutHREF.toString()), args);
|
||||
@@ -778,7 +779,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId = object.getObjectId().getValue();
|
||||
String scopeId = object.getObjectId().getStringValue();
|
||||
Map<String, String> args = new HashMap<String, String>();
|
||||
args.put("folderId", scopeId);
|
||||
Feed checkedout = getFeed(new IRI(checkedoutHREF.toString()), args);
|
||||
@@ -793,7 +794,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object2 = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId2 = object2.getObjectId().getValue();
|
||||
String scopeId2 = object2.getObjectId().getStringValue();
|
||||
Map<String, String> args2 = new HashMap<String, String>();
|
||||
args2.put("folderId", scopeId2);
|
||||
Feed checkedout2 = getFeed(new IRI(checkedoutHREF.toString()), args2);
|
||||
@@ -824,7 +825,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId = object.getObjectId().getValue();
|
||||
String scopeId = object.getObjectId().getStringValue();
|
||||
Map<String, String> args = new HashMap<String, String>();
|
||||
args.put("folderId", scopeId);
|
||||
Feed checkedout = getFeed(new IRI(checkedoutHREF.toString()), args);
|
||||
@@ -837,9 +838,9 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
CMISObject checkedoutdocObject = checkedoutdoc.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(checkedoutdocObject);
|
||||
assertTrue(checkedoutdocObject.isVersionSeriesCheckedOut().getBooleanValue());
|
||||
//assertEquals(checkedoutdocObject.getObjectId().getValue(), checkedoutdocObject.getVersionSeriesId().getValue());
|
||||
assertNotNull(checkedoutdocObject.getVersionSeriesCheckedOutId().getValue());
|
||||
assertNotNull(checkedoutdocObject.getVersionSeriesCheckedOutBy().getValue());
|
||||
//assertEquals(checkedoutdocObject.getObjectId().getStringValue(), checkedoutdocObject.getVersionSeriesId().getStringValue());
|
||||
assertNotNull(checkedoutdocObject.getVersionSeriesCheckedOutId().getStringValue());
|
||||
assertNotNull(checkedoutdocObject.getVersionSeriesCheckedOutBy().getStringValue());
|
||||
|
||||
// test update of private working copy
|
||||
String updateFile = loadString("/org/alfresco/repo/cmis/rest/test/updatedocument.atomentry.xml");
|
||||
@@ -868,7 +869,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object2 = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId2 = object2.getObjectId().getValue();
|
||||
String scopeId2 = object2.getObjectId().getStringValue();
|
||||
Map<String, String> args3 = new HashMap<String, String>();
|
||||
args3.put("folderId", scopeId2);
|
||||
Feed checkedout2 = getFeed(new IRI(checkedoutHREF.toString()), args3);
|
||||
@@ -888,10 +889,10 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
CMISObject updatedObject = updatedDoc.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(updatedObject);
|
||||
assertFalse(updatedObject.isVersionSeriesCheckedOut().getBooleanValue());
|
||||
//assertEquals(updatedObject.getObjectId().getValue(), updatedObject.getVersionSeriesId().getValue());
|
||||
assertNull(updatedObject.getVersionSeriesCheckedOutId().getValue());
|
||||
assertNull(updatedObject.getVersionSeriesCheckedOutBy().getValue());
|
||||
assertEquals(guid, updatedObject.getCheckinComment().getValue());
|
||||
//assertEquals(updatedObject.getObjectId().getStringValue(), updatedObject.getVersionSeriesId().getStringValue());
|
||||
assertNull(updatedObject.getVersionSeriesCheckedOutId().getStringValue());
|
||||
assertNull(updatedObject.getVersionSeriesCheckedOutBy().getStringValue());
|
||||
assertEquals(guid, updatedObject.getCheckinComment().getStringValue());
|
||||
}
|
||||
|
||||
public void testUpdateOnCheckIn()
|
||||
@@ -917,7 +918,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId = object.getObjectId().getValue();
|
||||
String scopeId = object.getObjectId().getStringValue();
|
||||
Map<String, String> args = new HashMap<String, String>();
|
||||
args.put("folderId", scopeId);
|
||||
Feed checkedout = getFeed(new IRI(checkedoutHREF.toString()), args);
|
||||
@@ -938,7 +939,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
|
||||
// test getCheckedOut is updated
|
||||
CMISObject object2 = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String scopeId2 = object2.getObjectId().getValue();
|
||||
String scopeId2 = object2.getObjectId().getStringValue();
|
||||
Map<String, String> args3 = new HashMap<String, String>();
|
||||
args3.put("folderId", scopeId2);
|
||||
Feed checkedout2 = getFeed(new IRI(checkedoutHREF.toString()), args3);
|
||||
@@ -1009,7 +1010,7 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
assertEquals("updated content checkin " + (NUMBER_OF_VERSIONS -1 - i), versionContentRes.getContentAsString());
|
||||
CMISObject versionObject = version.getExtension(CMISConstants.OBJECT);
|
||||
assertNotNull(versionObject);
|
||||
assertEquals("checkin" + + (NUMBER_OF_VERSIONS -1 - i), versionObject.getCheckinComment().getValue());
|
||||
assertEquals("checkin" + + (NUMBER_OF_VERSIONS -1 - i), versionObject.getCheckinComment().getStringValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1125,42 +1126,42 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
{
|
||||
// meta data only query against folder
|
||||
String query = "SELECT * FROM Folder " +
|
||||
"WHERE ObjectId = '" + testFolderObject.getObjectId().getValue() + "'";
|
||||
"WHERE ObjectId = '" + testFolderObject.getObjectId().getStringValue() + "'";
|
||||
String queryReq = queryDoc.replace("${STATEMENT}", query);
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", "0");
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "5");
|
||||
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
assertNotNull(queryFeed);
|
||||
assertEquals(1, queryFeed.getEntries().size());
|
||||
assertNotNull(queryFeed.getEntry(testFolder.getId().toString()));
|
||||
CMISObject result1 = queryFeed.getEntry(testFolder.getId().toString()).getExtension(CMISConstants.OBJECT);
|
||||
assertEquals(testFolderObject.getName().getValue(), result1.getName().getValue());
|
||||
assertEquals(testFolderObject.getObjectId().getValue(), result1.getObjectId().getValue());
|
||||
assertEquals(testFolderObject.getObjectTypeId().getValue(), result1.getObjectTypeId().getValue());
|
||||
assertEquals(testFolderObject.getName().getStringValue(), result1.getName().getStringValue());
|
||||
assertEquals(testFolderObject.getObjectId().getStringValue(), result1.getObjectId().getStringValue());
|
||||
assertEquals(testFolderObject.getObjectTypeId().getStringValue(), result1.getObjectTypeId().getStringValue());
|
||||
}
|
||||
|
||||
{
|
||||
// meta data only query against document
|
||||
String query = "SELECT * FROM Document " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getValue() + "') " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getStringValue() + "') " +
|
||||
"AND Name = 'apple1'";
|
||||
String queryReq = queryDoc.replace("${STATEMENT}", query);
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", "0");
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "5");
|
||||
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
assertNotNull(queryFeed);
|
||||
assertEquals(1, queryFeed.getEntries().size());
|
||||
assertNotNull(queryFeed.getEntry(document1.getId().toString()));
|
||||
CMISObject result1 = queryFeed.getEntry(document1.getId().toString()).getExtension(CMISConstants.OBJECT);
|
||||
assertEquals(document1Object.getName().getValue(), result1.getName().getValue());
|
||||
assertEquals(document1Object.getObjectId().getValue(), result1.getObjectId().getValue());
|
||||
assertEquals(document1Object.getObjectTypeId().getValue(), result1.getObjectTypeId().getValue());
|
||||
assertEquals(document1Object.getName().getStringValue(), result1.getName().getStringValue());
|
||||
assertEquals(document1Object.getObjectId().getStringValue(), result1.getObjectId().getStringValue());
|
||||
assertEquals(document1Object.getObjectTypeId().getStringValue(), result1.getObjectTypeId().getStringValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1173,39 +1174,39 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", "0");
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "5");
|
||||
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
assertNotNull(queryFeed);
|
||||
assertEquals(1, queryFeed.getEntries().size());
|
||||
assertNotNull(queryFeed.getEntry(document2.getId().toString()));
|
||||
CMISObject result1 = queryFeed.getEntry(document2.getId().toString()).getExtension(CMISConstants.OBJECT);
|
||||
assertEquals(document2Object.getName().getValue(), result1.getName().getValue());
|
||||
assertEquals(document2Object.getObjectId().getValue(), result1.getObjectId().getValue());
|
||||
assertEquals(document2Object.getObjectTypeId().getValue(), result1.getObjectTypeId().getValue());
|
||||
assertEquals(document2Object.getName().getStringValue(), result1.getName().getStringValue());
|
||||
assertEquals(document2Object.getObjectId().getStringValue(), result1.getObjectId().getStringValue());
|
||||
assertEquals(document2Object.getObjectTypeId().getStringValue(), result1.getObjectTypeId().getStringValue());
|
||||
}
|
||||
|
||||
if (queryCapability.equals("bothcombined"))
|
||||
{
|
||||
// combined meta data and full text
|
||||
String query = "SELECT ObjectId, ObjectTypeId, Name FROM Document " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getValue() + "') " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getStringValue() + "') " +
|
||||
"AND Name = 'apple1' " +
|
||||
"AND CONTAINS('apple1')";
|
||||
String queryReq = queryDoc.replace("${STATEMENT}", query);
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", "0");
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "5");
|
||||
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
assertNotNull(queryFeed);
|
||||
assertEquals(1, queryFeed.getEntries().size());
|
||||
assertNotNull(queryFeed.getEntry(document1.getId().toString()));
|
||||
CMISObject result1 = queryFeed.getEntry(document1.getId().toString()).getExtension(CMISConstants.OBJECT);
|
||||
assertEquals(document1Object.getName().getValue(), result1.getName().getValue());
|
||||
assertEquals(document1Object.getObjectId().getValue(), result1.getObjectId().getValue());
|
||||
assertEquals(document1Object.getObjectTypeId().getValue(), result1.getObjectTypeId().getValue());
|
||||
assertEquals(document1Object.getName().getStringValue(), result1.getName().getStringValue());
|
||||
assertEquals(document1Object.getObjectId().getStringValue(), result1.getObjectId().getStringValue());
|
||||
assertEquals(document1Object.getObjectTypeId().getStringValue(), result1.getObjectTypeId().getStringValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1236,14 +1237,14 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
// query children
|
||||
String queryDoc = loadString("/org/alfresco/repo/cmis/rest/test/query.cmisquery.xml");
|
||||
CMISObject testFolderObject = testFolder.getExtension(CMISConstants.OBJECT);
|
||||
String query = "SELECT ObjectId, ObjectTypeId, Name FROM Document " + "WHERE IN_FOLDER('" + testFolderObject.getObjectId().getValue() + "')";
|
||||
String query = "SELECT ObjectId, ObjectTypeId, Name FROM Document " + "WHERE IN_FOLDER('" + testFolderObject.getObjectId().getStringValue() + "')";
|
||||
|
||||
for (int page = 0; page < 4; page++)
|
||||
{
|
||||
String queryReq = queryDoc.replace("${STATEMENT}", query);
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", new Integer(page * 4).toString());
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "4");
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
@@ -1295,14 +1296,14 @@ public class CMISTest extends BaseCMISWebScriptTest
|
||||
{
|
||||
// construct structured query
|
||||
String query = "SELECT * FROM Document " +
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getValue() + "') ";
|
||||
"WHERE IN_FOLDER('" + testFolderObject.getObjectId().getStringValue() + "') ";
|
||||
String queryReq = queryDoc.replace("${STATEMENT}", query);
|
||||
queryReq = queryReq.replace("${INCLUDEALLOWABLEACTIONS}", "true");
|
||||
queryReq = queryReq.replace("${SKIPCOUNT}", "0");
|
||||
queryReq = queryReq.replace("${PAGESIZE}", "5");
|
||||
|
||||
// issue structured query
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq.getBytes(), CMISConstants.MIMETYPE_QUERY), 200);
|
||||
Response queryRes = sendRequest(new PostRequest(queryHREF.toString(), queryReq, CMISConstants.MIMETYPE_QUERY), 200);
|
||||
assertNotNull(queryRes);
|
||||
Feed queryFeed = getAbdera().parseFeed(new StringReader(queryRes.getContentAsString()), null);
|
||||
assertNotNull(queryFeed);
|
||||
|
@@ -50,7 +50,6 @@ public class CMISTestRunner
|
||||
private boolean traceReqRes = false;
|
||||
private String serviceUrl = null;
|
||||
private String userpass = null;
|
||||
private String arguments = "url";
|
||||
private boolean validateResponse = true;
|
||||
|
||||
|
||||
@@ -94,14 +93,6 @@ public class CMISTestRunner
|
||||
this.userpass = userpass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param arguments "url" => url arguments, "headers" => request headers, "both" => url & headers
|
||||
*/
|
||||
public void setArguments(String arguments)
|
||||
{
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param validateResponse true => test response against CMIS XSDs
|
||||
*/
|
||||
@@ -161,24 +152,13 @@ public class CMISTestRunner
|
||||
listener.addLog(null, "Test Started at " + df.format(today.getTime()));
|
||||
listener.addLog(null, "Service URL: " + (serviceUrl == null ? "[not set]" : serviceUrl));
|
||||
listener.addLog(null, "User: " + (userpass == null ? "[not set]" : userpass));
|
||||
listener.addLog(null, "Args: " + (arguments == null ? "[not set]" : arguments));
|
||||
listener.addLog(null, "Validate Responses: " + validateResponse);
|
||||
listener.addLog(null, "Trace Requests/Responses: " + traceReqRes);
|
||||
listener.addLog(null, "Tests: " + (match == null ? "*" : match));
|
||||
listener.addLog(null, "");
|
||||
}
|
||||
|
||||
// execute cmis tests with url arguments
|
||||
if (arguments.equals("both") || arguments.equals("url"))
|
||||
{
|
||||
executeSuite(match, server, false);
|
||||
}
|
||||
|
||||
// execute cmis tests with headers
|
||||
if (arguments.equals("both") || arguments.equals("headers"))
|
||||
{
|
||||
executeSuite(match, server, true);
|
||||
}
|
||||
executeSuite(match, server);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,7 +168,7 @@ public class CMISTestRunner
|
||||
* @param server remote server
|
||||
* @param argsAsHeaders arguments passed in Headers
|
||||
*/
|
||||
private void executeSuite(String match, RemoteServer server, boolean argsAsHeaders)
|
||||
private void executeSuite(String match, RemoteServer server)
|
||||
{
|
||||
TestSuite allSuite = new TestSuite(CMISTest.class);
|
||||
TestSuite suite = new TestSuite();
|
||||
@@ -210,8 +190,6 @@ public class CMISTestRunner
|
||||
test.setRemoteServer(server);
|
||||
}
|
||||
}
|
||||
test.setArgsAsHeaders(argsAsHeaders);
|
||||
test.setValidateResponse(validateResponse);
|
||||
suite.addTest(test);
|
||||
}
|
||||
}
|
||||
@@ -245,10 +223,6 @@ public class CMISTestRunner
|
||||
{
|
||||
runner.setUserPass(argSegment[1]);
|
||||
}
|
||||
else if (argSegment[0].equalsIgnoreCase("args"))
|
||||
{
|
||||
runner.setArguments(argSegment[1].toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
// execute
|
||||
|
@@ -47,7 +47,7 @@ public class CMISTestRunnerWebScript extends AbstractWebScript
|
||||
throws IOException
|
||||
{
|
||||
// setup CMIS tests
|
||||
PrintStream printStream = new PrintStream(res.getOutputStream());
|
||||
PrintStream printStream = new PrintStream(res.getOutputStream(), true, "UTF-8");
|
||||
WebScriptTestListener testListener = new CMISTestListener(printStream);
|
||||
CMISTestRunner runner = new CMISTestRunner();
|
||||
runner.setListener(testListener);
|
||||
@@ -63,11 +63,6 @@ public class CMISTestRunnerWebScript extends AbstractWebScript
|
||||
{
|
||||
runner.setUserPass(userpass);
|
||||
}
|
||||
String args = req.getParameter("args");
|
||||
if (args != null && args.length() > 0)
|
||||
{
|
||||
runner.setArguments(args);
|
||||
}
|
||||
String validate = req.getParameter("validate");
|
||||
if (validate != null && validate.length() > 0)
|
||||
{
|
||||
|
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.repo.cmis.rest.test;
|
||||
|
||||
|
||||
/**
|
||||
* CMIS API Test Harness
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public class CMISWithHeadersTest extends CMISTest
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void setUp()
|
||||
throws Exception
|
||||
{
|
||||
super.setUp();
|
||||
setArgsAsHeaders(true);
|
||||
}
|
||||
|
||||
}
|
@@ -7,6 +7,7 @@
|
||||
<cmis:properties>
|
||||
<cmis:propertyString cmis:name="ObjectTypeId"><cmis:value>D/cmiscustom_document</cmis:value></cmis:propertyString>
|
||||
<cmis:propertyString cmis:name="cmiscustom_docprop_string"><cmis:value>custom string</cmis:value></cmis:propertyString>
|
||||
<cmis:propertyBoolean cmis:name="cmiscustom_docprop_boolean_multi"><cmis:value>true</cmis:value><cmis:value>false</cmis:value></cmis:propertyBoolean>
|
||||
</cmis:properties>
|
||||
</cmis:object>
|
||||
</entry>
|
||||
|
@@ -4,6 +4,7 @@
|
||||
<cmis:object>
|
||||
<cmis:properties>
|
||||
<cmis:propertyString cmis:name="cmiscustom_docprop_string"><cmis:value>custom ${NAME}</cmis:value></cmis:propertyString>
|
||||
<cmis:propertyBoolean cmis:name="cmiscustom_docprop_boolean_multi"><cmis:value>false</cmis:value><cmis:value>true</cmis:value></cmis:propertyBoolean>
|
||||
</cmis:properties>
|
||||
</cmis:object>
|
||||
</entry>
|
||||
|
@@ -302,7 +302,7 @@ public abstract class BaseWebScriptTest extends TestCase
|
||||
if (traceReqRes && isLogEnabled())
|
||||
{
|
||||
log("");
|
||||
log("* Request: " + req.getMethod() + " " + req.getFullUri() + (req.getBody() == null ? "" : "\n" + new String(req.getBody())));
|
||||
log("* Request: " + req.getMethod() + " " + req.getFullUri() + (req.getBody() == null ? "" : "\n" + new String(req.getBody(), "UTF-8")));
|
||||
}
|
||||
|
||||
Response res = null;
|
||||
|
@@ -138,7 +138,7 @@ public class Paging
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Page or Window from standardised request arguments / headers
|
||||
* Create a Page or Window from standardised request arguments
|
||||
*
|
||||
* For Paged based index (take precedence over window based index, if both are specified):
|
||||
*
|
||||
@@ -157,14 +157,13 @@ public class Paging
|
||||
* CMIS-maxItems => size of page
|
||||
*
|
||||
* @param args request args
|
||||
* @param headers request headers
|
||||
* @return page (if pageNumber driven) or window (if skipCount driven)
|
||||
*/
|
||||
public Page createPageOrWindow(Map<String, String> args, Map<String, String> headers)
|
||||
public Page createPageOrWindow(Map<String, String> args)
|
||||
{
|
||||
// page number
|
||||
String strPageNo = args.get("pageNo");
|
||||
Integer pageNo = null;
|
||||
String strPageNo = args.get("pageNo");
|
||||
if (strPageNo != null)
|
||||
{
|
||||
try
|
||||
@@ -175,8 +174,8 @@ public class Paging
|
||||
}
|
||||
|
||||
// page size
|
||||
String strPageSize = args.get("pageSize");
|
||||
Integer pageSize = null;
|
||||
String strPageSize = args.get("pageSize");
|
||||
if (strPageSize != null)
|
||||
{
|
||||
try
|
||||
@@ -187,12 +186,8 @@ public class Paging
|
||||
}
|
||||
|
||||
// skip count
|
||||
String strSkipCount = args.get("skipCount");
|
||||
if (strSkipCount == null)
|
||||
{
|
||||
strSkipCount = (headers == null) ? null : headers.get("CMIS-skipCount");
|
||||
}
|
||||
Integer skipCount = null;
|
||||
String strSkipCount = args.get("skipCount");
|
||||
if (strSkipCount != null)
|
||||
{
|
||||
try
|
||||
@@ -203,12 +198,8 @@ public class Paging
|
||||
}
|
||||
|
||||
// max items
|
||||
String strMaxItems = args.get("maxItems");
|
||||
if (strMaxItems == null)
|
||||
{
|
||||
strMaxItems = (headers == null) ? null : headers.get("CMIS-maxItems");
|
||||
}
|
||||
Integer maxItems = null;
|
||||
String strMaxItems = args.get("maxItems");
|
||||
if (strMaxItems != null)
|
||||
{
|
||||
try
|
||||
|
@@ -36,6 +36,11 @@
|
||||
<title>Custom Document Property (string)</title>
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="cmiscustom:docprop_boolean_multi">
|
||||
<title>Custom Document Property (multi-valued boolean)</title>
|
||||
<type>d:boolean</type>
|
||||
<multiple>true</multiple>
|
||||
</property>
|
||||
</properties>
|
||||
</type>
|
||||
</types>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
-*- rnc -*-
|
||||
RELAX NG Compact Syntax Grammar for the
|
||||
Atom Format Specification Version 11
|
||||
-->
|
||||
<xs:schema
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="http://www.w3.org/2007/app"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:app="http://www.w3.org/2007/app"
|
||||
xmlns:cmis="http://www.cmis.org/2008/05"
|
||||
>
|
||||
<xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="ATOM4CMIS.xsd"/>
|
||||
<xs:import namespace="http://www.cmis.org/2008/05" schemaLocation="CMIS REST.xsd"/>
|
||||
|
||||
|
||||
<xs:element name="service" type="app:appServiceType"></xs:element>
|
||||
|
||||
<xs:complexType name="appServiceType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:author"></xs:element>
|
||||
<xs:element ref="app:workspace" minOccurs="1" maxOccurs="unbounded"></xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="workspace" type="app:appWorkspaceType"></xs:element>
|
||||
|
||||
<xs:complexType name="appWorkspaceType">
|
||||
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:title"></xs:element>
|
||||
<xs:element ref="cmis:repositoryInfo" minOccurs="0" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="app:collection" minOccurs="0" maxOccurs="unbounded"></xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="cmis:id"></xs:attribute>
|
||||
<xs:attribute ref="cmis:repositoryRelationship"></xs:attribute>
|
||||
<xs:attribute ref="app:href"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="collection" type="app:appCollectionType"></xs:element>
|
||||
|
||||
<xs:complexType name="appCollectionType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:title"></xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="cmis:id"></xs:attribute>
|
||||
<xs:attribute ref="cmis:collectionType"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:attribute name="href" type="xs:anyURI"></xs:attribute>
|
||||
</xs:schema>
|
||||
<!-- EOF -->
|
@@ -1,442 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
-*- rnc -*-
|
||||
RELAX NG Compact Syntax Grammar for the
|
||||
Atom Format Specification Version 11
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="http://www.w3.org/2005/Atom"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:cmis="http://www.cmis.org/2008/05"
|
||||
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||
>
|
||||
<xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/>
|
||||
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
|
||||
<xs:import namespace="http://www.cmis.org/2008/05" schemaLocation="CMIS REST.xsd"/>
|
||||
|
||||
|
||||
<!-- Common attributes -->
|
||||
<xs:attributeGroup name="atomCommonAttributes">
|
||||
<xs:attribute ref="xml:base"/>
|
||||
<xs:attribute ref="xml:lang"/>
|
||||
<xs:attributeGroup ref="atom:undefinedAttribute"/>
|
||||
</xs:attributeGroup>
|
||||
<!-- Text Constructs -->
|
||||
<xs:attributeGroup name="atomPlainTextConstruct">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="text"/>
|
||||
<xs:enumeration value="html"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:attributeGroup>
|
||||
<xs:group name="atomXHTMLTextConstruct">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xhtml:div"/>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
<xs:attributeGroup name="atomXHTMLTextConstruct">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="type" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="xhtml"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:attributeGroup>
|
||||
<xs:complexType name="atomTextConstruct" mixed="true">
|
||||
<xs:group minOccurs="0" ref="atom:atomXHTMLTextConstruct"/>
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="text"/>
|
||||
<xs:enumeration value="html"/>
|
||||
<xs:enumeration value="xhtml"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
<!-- Person Construct -->
|
||||
<xs:complexType name="atomPersonConstruct">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="atom:name"/>
|
||||
<xs:element ref="atom:uri"/>
|
||||
<xs:element ref="atom:email"/>
|
||||
<xs:group ref="atom:extensionElement"/>
|
||||
</xs:choice>
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
<xs:element name="name" type="xs:string"/>
|
||||
<xs:element name="uri" type="xs:string"/>
|
||||
<xs:element name="email" type="atom:atomEmailAddress"/>
|
||||
<!-- Date Construct -->
|
||||
<xs:complexType name="atomDateConstruct">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:dateTime">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<!-- atom:feed -->
|
||||
<xs:element name="feed">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="atom:author"/>
|
||||
<xs:element ref="atom:category"/>
|
||||
<xs:element ref="atom:contributor"/>
|
||||
<xs:element ref="atom:generator"/>
|
||||
<xs:element ref="atom:icon"/>
|
||||
<xs:element ref="atom:id"/>
|
||||
<xs:element ref="atom:link"/>
|
||||
<xs:element ref="atom:logo"/>
|
||||
<xs:element ref="atom:rights"/>
|
||||
<xs:element ref="atom:subtitle"/>
|
||||
<xs:element ref="atom:title"/>
|
||||
<xs:element ref="atom:updated"/>
|
||||
<xs:group ref="atom:extensionElement"/>
|
||||
</xs:choice>
|
||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="atom:entry"/>
|
||||
|
||||
<xs:choice minOccurs="0" maxOccurs="1">
|
||||
<xs:group ref="cmis:CMISFolderEntry" />
|
||||
<xs:group ref="cmis:CMISTypeEntry" />
|
||||
</xs:choice>
|
||||
|
||||
<xs:element minOccurs="0" maxOccurs="1" ref="cmis:hasMoreItems"/>
|
||||
</xs:sequence>
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:entry -->
|
||||
<xs:element name="entry" type="atom:entryType">
|
||||
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="entryType">
|
||||
<xs:sequence>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="atom:author" />
|
||||
<xs:element ref="atom:category" />
|
||||
<xs:element ref="atom:content" />
|
||||
<xs:element ref="atom:contributor" />
|
||||
<xs:element ref="atom:id" />
|
||||
<xs:element ref="atom:link" />
|
||||
<xs:element ref="atom:published" />
|
||||
<xs:element ref="atom:rights" />
|
||||
<xs:element ref="atom:source" />
|
||||
<xs:element ref="atom:summary" />
|
||||
<xs:element ref="atom:title" />
|
||||
<xs:element ref="atom:updated" />
|
||||
<xs:group ref="atom:extensionElement" />
|
||||
<xs:element ref="atom:uri"></xs:element>
|
||||
|
||||
</xs:choice>
|
||||
<xs:choice minOccurs="0" maxOccurs="1">
|
||||
<xs:group ref="cmis:CMISDocumentEntry" />
|
||||
<xs:group ref="cmis:CMISFolderEntry" />
|
||||
<xs:group ref="cmis:CMISRelationshipEntry" />
|
||||
<xs:group ref="cmis:CMISPolicyEntry" />
|
||||
<xs:group ref="cmis:CMISActionsEntry" />
|
||||
<xs:group ref="cmis:CMISTypeEntry" />
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- atom:content -->
|
||||
<xs:attributeGroup name="atomInlineTextConstruct">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="text"/>
|
||||
<xs:enumeration value="html"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:attributeGroup>
|
||||
<xs:group name="atomInlineOtherConstruct">
|
||||
<xs:sequence>
|
||||
<xs:group minOccurs="0" maxOccurs="unbounded" ref="atom:anyElement"/>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
<xs:attributeGroup name="atomInlineOtherConstruct">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:union memberTypes="atom:atomMediaType">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="xhtml"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:union>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:attributeGroup>
|
||||
<xs:attributeGroup name="atomOutOfLineConstruct">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="type" type="atom:atomMediaType"/>
|
||||
<xs:attribute name="src" use="required"/>
|
||||
</xs:attributeGroup>
|
||||
<xs:element name="content">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:group minOccurs="0" ref="atom:atomInlineOtherConstruct"/>
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:union memberTypes="atom:atomMediaType">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="text"/>
|
||||
<xs:enumeration value="html"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType>
|
||||
<xs:union memberTypes="atom:atomMediaType">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="xhtml"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:union>
|
||||
</xs:simpleType>
|
||||
</xs:union>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="src"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:author -->
|
||||
<xs:element name="author" type="atom:atomPersonConstruct"/>
|
||||
<!-- atom:category -->
|
||||
<xs:element name="category">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="atom:undefinedContent">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="term" use="required"/>
|
||||
<xs:attribute name="scheme"/>
|
||||
<xs:attribute name="label"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:contributor -->
|
||||
<xs:element name="contributor" type="atom:atomPersonConstruct"/>
|
||||
<!-- atom:generator -->
|
||||
<xs:element name="generator">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
<xs:attribute name="uri"/>
|
||||
<xs:attribute name="version"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:icon -->
|
||||
<xs:element name="icon">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:id -->
|
||||
<xs:element name="id">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:logo -->
|
||||
<xs:element name="logo">
|
||||
<xs:complexType mixed="true">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:link -->
|
||||
<xs:element name="link">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The "atom:link" element defines a reference from an entry
|
||||
or feed to a Web resource. This specification assigns no
|
||||
meaning to the content (if any) of this element.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="atom:undefinedContent">
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes" />
|
||||
<xs:attribute name="href" use="required" />
|
||||
<xs:attribute name="rel">
|
||||
</xs:attribute>
|
||||
<xs:attribute name="type" type="atom:atomMediaType" />
|
||||
<xs:attribute name="hreflang"
|
||||
type="atom:atomLanguageTag" />
|
||||
<xs:attribute name="title" />
|
||||
<xs:attribute name="length" />
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:published -->
|
||||
<xs:element name="published" type="atom:atomDateConstruct"/>
|
||||
<!-- atom:rights -->
|
||||
<xs:element name="rights" type="atom:atomTextConstruct"/>
|
||||
<!-- atom:source -->
|
||||
<xs:element name="source">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
atom:source is used to preserve metadata of a feed when an entry is copied from a feed to another feed.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="atom:author"/>
|
||||
<xs:element ref="atom:category"/>
|
||||
<xs:element ref="atom:contributor"/>
|
||||
<xs:element ref="atom:generator"/>
|
||||
<xs:element ref="atom:icon"/>
|
||||
<xs:element ref="atom:id"/>
|
||||
<xs:element ref="atom:link"/>
|
||||
<xs:element ref="atom:logo"/>
|
||||
<xs:element ref="atom:rights"/>
|
||||
<xs:element ref="atom:subtitle"/>
|
||||
<xs:element ref="atom:title"/>
|
||||
<xs:element ref="atom:updated"/>
|
||||
<xs:group ref="atom:extensionElement"/>
|
||||
</xs:choice>
|
||||
<xs:attributeGroup ref="atom:atomCommonAttributes"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<!-- atom:subtitle -->
|
||||
<xs:element name="subtitle" type="atom:atomTextConstruct"/>
|
||||
<!-- atom:summary -->
|
||||
<xs:element name="summary" type="atom:atomTextConstruct"/>
|
||||
<!-- atom:title -->
|
||||
<xs:element name="title" type="atom:atomTextConstruct">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The "atom:title" element is a Text construct that conveys a human-
|
||||
readable title for an entry or feed.
|
||||
atomTitle = element atom:title { atomTextConstruct }.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<!-- atom:updated -->
|
||||
<xs:element name="updated" type="atom:atomDateConstruct">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The "atom:updated" element is a Date construct indicating the most
|
||||
recent instant in time when an entry or feed was modified in a way
|
||||
the publisher considers significant. Therefore, not all
|
||||
modifications necessarily result in a changed atom:updated value.
|
||||
atomUpdated = element atom:updated { atomDateConstruct }.
|
||||
Publishers MAY change the value of this element over time.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<!-- Low-level simple types -->
|
||||
<xs:simpleType name="atomNCName">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:pattern value="[^:]*"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!-- Whatever a media type is, it contains at least one slash -->
|
||||
<xs:simpleType name="atomMediaType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value=".+/.+"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!-- As defined in RFC 3066 -->
|
||||
<xs:simpleType name="atomLanguageTag">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!--
|
||||
Unconstrained; it's not entirely clear how IRI fit into
|
||||
xsd:anyURI so let's not try to constrain it here
|
||||
-->
|
||||
<!-- Whatever an email address is, it contains at least one @ -->
|
||||
<xs:simpleType name="atomEmailAddress">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value=".+@.+"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!-- Simple Extension -->
|
||||
<xs:group name="extensionElement">
|
||||
<xs:choice>
|
||||
<xs:any namespace="##other" processContents="skip"/>
|
||||
<xs:any namespace="##local" processContents="skip"/>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
<xs:attributeGroup name="undefinedAttribute">
|
||||
<xs:anyAttribute namespace="##other" processContents="skip"/>
|
||||
</xs:attributeGroup>
|
||||
<xs:complexType name="undefinedContent" mixed="true">
|
||||
<xs:group minOccurs="0" maxOccurs="unbounded" ref="atom:anyForeignElement"/>
|
||||
</xs:complexType>
|
||||
<xs:group name="anyElement">
|
||||
<xs:sequence>
|
||||
<xs:any processContents="skip"/>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
<xs:group name="anyForeignElement">
|
||||
<xs:choice>
|
||||
<xs:any namespace="##other" processContents="skip"/>
|
||||
<xs:any namespace="##local" processContents="skip"/>
|
||||
</xs:choice>
|
||||
</xs:group>
|
||||
<!-- XHTML -->
|
||||
<xs:group name="anyXHTML">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<xs:element name="service" type="atom:atomServiceType"></xs:element>
|
||||
|
||||
<xs:complexType name="atomServiceType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:author"></xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="workspace" type="atom:atomWorkspaceType"></xs:element>
|
||||
|
||||
<xs:complexType name="atomWorkspaceType">
|
||||
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:title"></xs:element>
|
||||
<xs:element ref="cmis:repositoryInfo"></xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="cmis:id"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="collection" type="xs:string"></xs:element>
|
||||
|
||||
<xs:complexType name="atomCollectionType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="atom:title"></xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="cmis:id"></xs:attribute>
|
||||
<xs:attribute ref="cmis:collectionType"></xs:attribute>
|
||||
<xs:attribute ref="cmis:id"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
<!-- EOF -->
|
@@ -1,634 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
-*- rnc -*-
|
||||
RELAX NG Compact Syntax Grammar for the
|
||||
Atom Format Specification Version 11
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="http://www.cmis.org/2008/05"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:cmis="http://www.cmis.org/2008/05">
|
||||
<xs:import namespace="http://www.w3.org/1999/xhtml" />
|
||||
<xs:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
|
||||
|
||||
<xs:element name="repositoryInfo" type="cmis:repositoryInfoType"></xs:element>
|
||||
<xs:element name="property" type="cmis:propertyDefinitionType"></xs:element>
|
||||
<xs:element name="parent" type="xs:string"></xs:element>
|
||||
<xs:element name="displayName" type="xs:string"></xs:element>
|
||||
<xs:element name="isVersionable" type="xs:boolean"></xs:element>
|
||||
<xs:element name="description" type="xs:string"></xs:element>
|
||||
<xs:element name="isQueryable" type="xs:string"></xs:element>
|
||||
<xs:element name="isCreatable" type="xs:string"></xs:element>
|
||||
<xs:element name="queryName" type="xs:string"></xs:element>
|
||||
<xs:element name="baseTypeQueryName" type="xs:string"></xs:element>
|
||||
<xs:element name="isContentStreamAllowed" type="xs:boolean"></xs:element>
|
||||
<xs:element name="AllowedSourceTypes" type="xs:string"></xs:element>
|
||||
<xs:element name="AllowedTargetTypes" type="xs:string"></xs:element>
|
||||
<xs:element name="constraints" type="xs:string"></xs:element>
|
||||
|
||||
|
||||
<xs:element name="propertyType">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="String"></xs:enumeration>
|
||||
<xs:enumeration value="Decimal"></xs:enumeration>
|
||||
<xs:enumeration value="Integer"></xs:enumeration>
|
||||
<xs:enumeration value="Boolean"></xs:enumeration>
|
||||
<xs:enumeration value="DateTime"></xs:enumeration>
|
||||
<xs:enumeration value="URI"></xs:enumeration>
|
||||
<xs:enumeration value="HTML"></xs:enumeration>
|
||||
<xs:enumeration value="XML"></xs:enumeration>
|
||||
<xs:enumeration value="ID"></xs:enumeration>
|
||||
<xs:enumeration value="TypeID"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cardinality">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Single"></xs:enumeration>
|
||||
<xs:enumeration value="Multi"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="maxLength" type="xs:int"></xs:element>
|
||||
|
||||
<xs:element name="schemaURI" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="encoding" type="xs:string"></xs:element>
|
||||
|
||||
|
||||
<xs:element name="choices">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="index"
|
||||
type="xs:positiveInteger" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="isOpenChoice" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="isRequired" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="defaultValue" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="updateability">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="ro"></xs:enumeration>
|
||||
<xs:enumeration value="rw"></xs:enumeration>
|
||||
<xs:enumeration value="checkedout"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="repositoryInfoType">
|
||||
<xs:sequence minOccurs="1">
|
||||
<xs:element name="repositoryId" type="xs:string"
|
||||
minOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="repositoryName" type="xs:string"
|
||||
minOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="repositoryDescription" type="xs:string"
|
||||
minOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="vendorName" type="xs:string"></xs:element>
|
||||
<xs:element name="productName" type="xs:string"></xs:element>
|
||||
<xs:element name="productVersion" type="xs:string"></xs:element>
|
||||
<xs:element name="capabilities"
|
||||
type="cmis:RepositoryInfoCapabilities">
|
||||
</xs:element>
|
||||
<xs:element name="repositorySpecificInformation"
|
||||
type="xs:string" maxOccurs="1" minOccurs="0">
|
||||
</xs:element>
|
||||
<xs:any namespace="##any" processContents="skip"
|
||||
minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="RepositoryInfoCapabilities">
|
||||
<xs:sequence>
|
||||
<xs:element name="capabilityMultifiling" type="xs:boolean"
|
||||
minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityUnfiling" type="xs:boolean"
|
||||
minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityVersionSpecificFiling"
|
||||
type="xs:boolean" minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityPWCUpdateable" type="xs:boolean"
|
||||
minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityAllVersionsSearchable"
|
||||
type="xs:boolean" minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityInnerJoin" type="xs:boolean"
|
||||
minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityOuterJoin" type="xs:boolean"
|
||||
minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element name="capabilityFullText">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="none"></xs:enumeration>
|
||||
<xs:enumeration value="fulltextonly"></xs:enumeration>
|
||||
<xs:enumeration value="fulltextwithmetadata"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:attribute name="id" type="xs:string"></xs:attribute>
|
||||
|
||||
<xs:attribute name="index" type="xs:int"></xs:attribute>
|
||||
|
||||
<xs:element name="creationDate" type="xs:dateTime"></xs:element>
|
||||
|
||||
<xs:element name="lastModifiedBy" type="xs:dateTime"></xs:element>
|
||||
|
||||
<xs:element name="baseType" type="cmis:baseObjectType"></xs:element>
|
||||
|
||||
|
||||
<xs:simpleType name="baseObjectType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="document"></xs:enumeration>
|
||||
<xs:enumeration value="folder"></xs:enumeration>
|
||||
<xs:enumeration value="relationship"></xs:enumeration>
|
||||
<xs:enumeration value="policy"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:element name="objectType" type="xs:string"></xs:element>
|
||||
|
||||
|
||||
<xs:element name="isLatestVersion" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="isCheckedOut" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="contentStreamLength" type="xs:int"></xs:element>
|
||||
|
||||
<xs:element name="contentStreamMimetype">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value=".*/.*"></xs:pattern>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="contentStreamName" type="xs:string"></xs:element>
|
||||
|
||||
|
||||
<xs:element name="contentStreamURI" type="xs:string"></xs:element>
|
||||
|
||||
|
||||
|
||||
|
||||
<xs:group name="entryCommonElements">
|
||||
<xs:sequence>
|
||||
<xs:element ref="cmis:baseType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:lastModifiedBy" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:creationDate" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
|
||||
<xs:group name="entryContentStreamElements">
|
||||
<xs:sequence>
|
||||
<xs:element ref="cmis:contentStreamLength"></xs:element>
|
||||
<xs:element ref="cmis:contentStreamMimetype"></xs:element>
|
||||
<xs:element ref="cmis:contentStreamName"></xs:element>
|
||||
<xs:element ref="cmis:contentStreamURI"></xs:element>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
|
||||
<xs:group name="propertyDefinitionElements">
|
||||
<xs:sequence>
|
||||
<xs:element ref="cmis:displayName" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:description" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:propertyType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:cardinality" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:maxLength" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:schemaURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:encoding" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:choices" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isOpenChoice" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isRequired" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:defaultValue" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:updateability" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isQueryable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isOrderable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
|
||||
<xs:element name="isOrderable" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:complexType name="propertyDefinitionType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="cmis:displayName" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:description" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:propertyType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:cardinality" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:maxLength" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:schemaURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:encoding" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:choices" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isOpenChoice" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isRequired" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:defaultValue" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:updateability" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isQueryable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isOrderable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute ref="cmis:id"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<xs:element name="canDelete" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canUpdateProperties" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canGetProperties" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canGetParents" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canMove" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canDeleteVersion" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canDeleteContent" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canCheckout" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canCancelCheckout" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canCheckin" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canSetContent" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canGetAllVersions" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canAddToFolder" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canRemoveFromFolder" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canViewContent" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canAddPolicy" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canRemovePolicy" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canGetChildren" type="xs:boolean"></xs:element>
|
||||
<xs:element name="canGetDescendants" type="xs:boolean"></xs:element>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<xs:element name="isControllable" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="source" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="target" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="isImmutable" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="isMajorVersion" type="xs:boolean"></xs:element>
|
||||
<xs:element name="isLatestMajorVersion" type="xs:boolean"></xs:element>
|
||||
<xs:element name="isVersionSeriesCheckedOut" type="xs:boolean"></xs:element>
|
||||
<xs:element name="versionSeriesCheckedOutBy" type="xs:string"></xs:element>
|
||||
<xs:element name="versionSeriesCheckedOutID" type="xs:string"></xs:element>
|
||||
<xs:element name="checkinComment" type="xs:string"></xs:element>
|
||||
|
||||
<xs:group name="CMISActionsEntry">
|
||||
<xs:sequence>
|
||||
<xs:element ref="cmis:canDelete" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canUpdateProperties" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canGetProperties" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canGetParents" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canGetDescendants" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canMove" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canDeleteVersion" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canDeleteContent" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canCheckout" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canCancelCheckout" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canCheckin" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canSetContent" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canGetAllVersions" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canAddToFolder" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canRemoveFromFolder" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canViewContent" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canAddPolicy" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canRemovePolicy" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:canGetChildren" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
|
||||
</xs:group>
|
||||
|
||||
|
||||
<xs:group name="CMISTypeEntry">
|
||||
<xs:sequence>
|
||||
<xs:group ref="cmis:entryCommonElements" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:group>
|
||||
<xs:element ref="cmis:queryName" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:displayName" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:baseType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:baseTypeQueryName" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:parent" minOccurs="1" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="cmis:description" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isCreatable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isVersionable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isQueryable" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isContentStreamAllowed" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:AllowedSourceTypes" minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:AllowedTargetTypes" minOccurs="1" maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:constraints" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
|
||||
<xs:element ref="cmis:property"></xs:element>
|
||||
<xs:element ref="cmis:isControllable"></xs:element>
|
||||
</xs:sequence>
|
||||
|
||||
</xs:group>
|
||||
|
||||
|
||||
<xs:group name="CMISDocumentEntry">
|
||||
<xs:sequence>
|
||||
<xs:group ref="cmis:entryCommonElements" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:group>
|
||||
<xs:element ref="cmis:objectType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isCheckedOut" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isLatestVersion" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isMajorVersion" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isLatestMajorVersion" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isImmutable" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:isVersionSeriesCheckedOut" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:versionSeriesCheckedOutBy" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:versionSeriesCheckedOutID" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:checkinComment" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
|
||||
<xs:element ref="cmis:versionLabel" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
|
||||
<xs:group ref="cmis:entryContentStreamElements"
|
||||
minOccurs="0" maxOccurs="1">
|
||||
</xs:group>
|
||||
<xs:element ref="cmis:allowableActions" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
|
||||
<xs:group name="CMISFolderEntry">
|
||||
<xs:sequence>
|
||||
<xs:group ref="cmis:entryCommonElements" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:group>
|
||||
<xs:element ref="cmis:objectType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:parent" minOccurs="1" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="cmis:allowableActions" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
|
||||
</xs:group>
|
||||
|
||||
<xs:group name="CMISRelationshipEntry">
|
||||
<xs:sequence>
|
||||
<xs:group ref="cmis:entryCommonElements" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:group>
|
||||
<xs:element ref="cmis:objectType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:source" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:target" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:allowableActions" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
|
||||
</xs:group>
|
||||
|
||||
<xs:group name="CMISPolicyEntry">
|
||||
<xs:sequence>
|
||||
<xs:group ref="cmis:entryCommonElements" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:group>
|
||||
<xs:element ref="cmis:objectType" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
<xs:element ref="cmis:allowableActions" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:group>
|
||||
|
||||
|
||||
<xs:element name="function" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="hasMoreItems" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="allowableActions" type="cmis:allowableActions"></xs:element>
|
||||
|
||||
<xs:complexType name="allowableActions">
|
||||
<xs:sequence maxOccurs="1" minOccurs="1">
|
||||
<xs:group ref="cmis:CMISActionsEntry"></xs:group>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="versionLabel" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="query" type="cmis:queryType"></xs:element>
|
||||
|
||||
<xs:complexType name="queryType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="cmis:statement" minOccurs="1" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="cmis:searchAllVersions" minOccurs="0" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="cmis:pageSize" minOccurs="0" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="cmis:skipCount" minOccurs="0" maxOccurs="1"></xs:element>
|
||||
<xs:element ref="cmis:returnAllowableActions" minOccurs="0" maxOccurs="1"></xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="statement" type="xs:string"></xs:element>
|
||||
|
||||
<xs:element name="pageSize" type="xs:int"></xs:element>
|
||||
|
||||
<xs:element name="skipCount" type="xs:int"></xs:element>
|
||||
|
||||
<xs:element name="returnAllowableActions" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:element name="searchAllVersions" type="xs:boolean"></xs:element>
|
||||
|
||||
<xs:attribute name="collectionType">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="root"></xs:enumeration>
|
||||
<xs:enumeration value="unfiled"></xs:enumeration>
|
||||
<xs:enumeration value="checkedout"></xs:enumeration>
|
||||
<xs:enumeration value="types"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
|
||||
<xs:attribute name="repositoryRelationship">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="self"></xs:enumeration>
|
||||
<xs:enumeration value="sibling"></xs:enumeration>
|
||||
<xs:enumeration value="parent"></xs:enumeration>
|
||||
<xs:enumeration value="child"></xs:enumeration>
|
||||
<xs:enumeration value="replica"></xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:schema>
|
||||
<!-- EOF -->
|
Reference in New Issue
Block a user