<auth ID="testAdministator">YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y</auth>
</auths>
<testGroup ID="TestOrder" autoDeletePOSTS="true">
- <!-- The purpose of this testGroup is to test the new "order" field
+ <!-- The purpose of this testGroup is to test the new "order" field
that was added in http://issues.collectionspace.org/browse/CSPACE-573
and to ensure that this order field is returned in list results,
and that duplicate values for the order field is accepted.
<var ID="displayName">TestOrder item ${itemID} order ${order}</var>
</vars>
</test>
-
+
<test ID="GetVocabularies" auth="admin@core.collectionspace.org">
- <method>GET</method>
- <uri>/cspace-services/vocabularies/</uri>
- </test>
-
- <test ID="GetVocabularyItems" auth="admin@core.collectionspace.org">
- <method>GET</method>
- <uri>/cspace-services/vocabularies/${Vocabulary1.CSID}/items/</uri>
- <response>
- <expected level="ADDOK" />
- <filename>vocabulary/res/GetVocabularyItems.res.xml</filename>
- <vars>
+ <method>GET</method>
+ <uri>/cspace-services/vocabularies/</uri>
+ </test>
+
+ <test ID="GetVocabularyItems" auth="admin@core.collectionspace.org">
+ <method>GET</method>
+ <uri>/cspace-services/vocabularies/${Vocabulary1.CSID}/items/</uri>
+ <response>
+ <expected level="ADDOK"/>
+ <filename>vocabulary/res/GetVocabularyItems.res.xml</filename>
+ <vars>
<var ID="I3displayName">${Item3DupeOrder.displayName}</var>
</vars>
- <!--<startElement>//vocabulary-list-item[./exitNumber='checkList-1234']</startElement>-->
- </response>
- </test>
-
+ <!--<startElement>//vocabulary-list-item[./exitNumber='checkList-1234']</startElement>-->
+ </response>
+ </test>
+
+ <test ID="GetVocabularyItem" auth="admin@core.collectionspace.org">
+ <method>GET</method>
+ <uri>/cspace-services/vocabularies/${Vocabulary1.CSID}/items/${Item1.CSID}</uri>
+ </test>
+
+ <test ID="GetVocabularyItemRefObjs" auth="admin@core.collectionspace.org">
+ <method>GET</method>
+ <uri>/cspace-services/vocabularies/${Vocabulary1.CSID}/items/${Item1.CSID}/refObjs</uri>
+ </test>
+
</testGroup>
</xmlReplay>
-
RepositoryClient repoClient,\r
String serviceType,\r
String refName,\r
+ String refPropName,\r
int pageSize, int pageNum, boolean computeTotal) throws DocumentException, DocumentNotFoundException {\r
AuthorityRefDocList wrapperList = new AuthorityRefDocList();\r
AbstractCommonList commonList = (AbstractCommonList) wrapperList;\r
Map<String, ServiceBindingType> queriedServiceBindings = new HashMap<String, ServiceBindingType>();\r
Map<String, Map<String, String>> authRefFieldsByService = new HashMap<String, Map<String, String>>();\r
\r
- String query = computeWhereClauseForAuthorityRefDocs(escapedRefName, docTypes, servicebindings, \r
+ String query = computeWhereClauseForAuthorityRefDocs(escapedRefName, refPropName, docTypes, servicebindings, \r
queriedServiceBindings, authRefFieldsByService );\r
if (query == null) { // found no authRef fields - nothing to query\r
return wrapperList;\r
\r
private static String computeWhereClauseForAuthorityRefDocs(\r
String escapedRefName,\r
+ String refPropName,\r
ArrayList<String> docTypes,\r
List<ServiceBindingType> servicebindings,\r
Map<String, ServiceBindingType> queriedServiceBindings,\r
// is also the table name, the way that the repository works).\r
authRefFieldPaths =\r
ServiceBindingUtils.getAllPartsPropertyValues(sb,\r
- ServiceBindingUtils.AUTH_REF_PROP, ServiceBindingUtils.QUALIFIED_PROP_NAMES);\r
+ refPropName, ServiceBindingUtils.QUALIFIED_PROP_NAMES);\r
if (authRefFieldPaths.isEmpty()) {\r
continue;\r
}\r
<types:value>fieldCollectors|fieldCollector</types:value>
</types:item>
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>responsibleDepartment|responsibleDepartments</types:value>
<types:key>termRef</types:key>
<types:value>recordStatus</types:value>
</types:item>
- -->
<!-- Commented out for now, as searching within a field in a complexType breaks searches -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
</types:item>
-->
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>entryMethods|entryMethod</types:value>
<types:key>termRef</types:key>
<types:value>conditionCheckReasons|conditionCheckReason</types:value>
</types:item>
- -->
<!-- Commented out for now, as searching within a field in a complexType breaks searches -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:value>lendersContact</types:value>
</types:item>
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>loanPurpose</types:value>
</types:item>
- -->
<!-- The following term reference is within a nested complexType / multivalued group of fields -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:value>depositor</types:value>
</types:item>
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>exitMethods|exitMethod</types:value>
<types:key>termRef</types:key>
<types:value>exitReason</types:value>
</types:item>
- -->
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent namespaceURI="http://collectionspace.org/services/objectexit" schemaLocation="http://collectionspace.org/services/objectexit http://services.collectionspace.org/objectexit/objectexit_common.xsd" />
<types:value>owner</types:value>
</types:item>
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>responsibleDepartment</types:value>
</types:item>
- -->
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent namespaceURI="http://collectionspace.org/services/group" schemaLocation="http://collectionspace.org/services/group http://services.collectionspace.org/group/groups_common.xsd" />
</types:item>
-->
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
- <types:value>languages|language</types:value>
+ <types:value>languageList|language</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>typeList|type</types:value>
</types:item>
- -->
<!-- The following term references all fall within a nested complexType / multivalued group of fields -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:value>movementContact</types:value>
</types:item>
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>currentLocationFitness</types:value>
<types:key>termRef</types:key>
<types:value>movementMethods|movementMethod</types:value>
</types:item>
- -->
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent namespaceURI="http://collectionspace.org/services/movement" schemaLocation="http://collectionspace.org/services/movement http://services.collectionspace.org/movement/movements_common.xsd" />
</types:item>
-->
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>termStatus</types:value>
</types:item>
- -->
<!-- To be added per CSPACE-3939. -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<service:properties xmlns:service="http://collectionspace.org/services/common/service">
-->
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>termStatus</types:value>
<types:key>termRef</types:key>
<types:value>locationType</types:value>
</types:item>
- -->
<service:content contentType="application/xml">
<service:xmlContent namespaceURI="http://collectionspace.org/services/location" schemaLocation="http://collectionspace.org/services/location http://services.collectionspace.org/location/locations_common.xsd" />
</service:content>
</types:item>
-->
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>termStatus</types:value>
<types:key>termRef</types:key>
<types:value>taxonNameSource</types:value>
</types:item>
- -->
<!-- The following term reference falls within a nested complexType / multivalued group of fields -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
</types:item>
-->
<!-- CSPACE-4457: Identification of term list / controlled vocabulary fields -->
- <!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">
<types:key>termRef</types:key>
<types:value>acquisitionMethod</types:value>
<types:key>termRef</types:key>
<types:value>groupPurchasePriceCurrency</types:value>
</types:item>
- -->
<!-- The following term reference falls within a nested complexType / multivalued group of fields -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/common/types">