<artifactId>org.collectionspace.services.vocabulary.service</artifactId>\r
<version>1.0</version>\r
</dependency>\r
+ <dependency>\r
+ <groupId>org.collectionspace.services</groupId>\r
+ <artifactId>org.collectionspace.services.organization.service</artifactId>\r
+ <version>1.0</version>\r
+ </dependency>\r
+ <!--\r
+ <dependency>\r
+ <groupId>org.collectionspace.services</groupId>\r
+ <artifactId>org.collectionspace.services.person.service</artifactId>\r
+ <version>1.0</version>\r
+ </dependency>\r
+ -->\r
<dependency>\r
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.relation.service</artifactId>\r
import org.collectionspace.services.contact.ContactResource;
import org.collectionspace.services.vocabulary.VocabularyResource;
+import org.collectionspace.services.organization.OrgAuthorityResource;
//import org.collectionspace.services.query.QueryResource;
singletons.add(new AcquisitionResource());
singletons.add(new NewRelationResource());
singletons.add(new VocabularyResource());
+ singletons.add(new OrgAuthorityResource());
singletons.add(new DimensionResource());
singletons.add(new ContactResource());
-#Sun Aug 09 21:43:48 PDT 2009\r
+#Mon Jan 04 16:40:34 PST 2010\r
activeProfiles=\r
eclipse.preferences.version=1\r
fullBuildGoals=process-test-resources\r
includeModules=false\r
resolveWorkspaceProjects=true\r
resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
version=1\r
-#Sun Aug 09 21:43:48 PDT 2009\r
+#Mon Jan 04 16:40:34 PST 2010\r
activeProfiles=\r
eclipse.preferences.version=1\r
fullBuildGoals=process-test-resources\r
includeModules=false\r
resolveWorkspaceProjects=true\r
resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
version=1\r
<ant antfile="collectionobject/build.xml" target="deploy" inheritAll="false"/>\r
<ant antfile="intake/build.xml" target="deploy" inheritAll="false"/>\r
<ant antfile="vocabulary/build.xml" target="deploy" inheritAll="false"/>\r
+ <ant antfile="organization/build.xml" target="deploy" inheritAll="false"/>\r
<ant antfile="acquisition/build.xml" target="deploy" inheritAll="false"/>\r
<ant antfile="dimension/build.xml" target="deploy" inheritAll="false"/>\r
<ant antfile="contact/build.xml" target="deploy" inheritAll="false"/>\r
description="undeploy services from ${jboss.server.cspace}">\r
<ant antfile="JaxRsServiceProvider/build.xml" target="undeploy" inheritAll="false"/>\r
<ant antfile="vocabulary/build.xml" target="undeploy" inheritAll="false"/>\r
- <ant antfile="contact/build.xml" target="undeploy" inheritAll="false"/>\r
- <ant antfile="dimension/build.xml" target="undeploy" inheritAll="false"/>\r
+ <ant antfile="organization/build.xml" target="undeploy" inheritAll="false"/>\r
+ <ant antfile="contact/build.xml" target="undeploy" inheritAll="false"/> \r
+ <ant antfile="dimension/build.xml" target="undeploy" inheritAll="false"/> \r
<ant antfile="acquisition/build.xml" target="undeploy" inheritAll="false"/>\r
<ant antfile="intake/build.xml" target="undeploy" inheritAll="false"/>\r
<ant antfile="collectionobject/build.xml" target="undeploy" inheritAll="false"/>\r
<ant antfile="collectionobject/build.xml" target="dist" inheritAll="false"/>\r
<ant antfile="intake/build.xml" target="dist" inheritAll="false"/>\r
<ant antfile="vocabulary/build.xml" target="dist" inheritAll="false"/>\r
+ <ant antfile="organization/build.xml" target="dist" inheritAll="false"/>\r
<ant antfile="acquisition/build.xml" target="dist" inheritAll="false"/>\r
<ant antfile="JaxRsServiceProvider/build.xml" target="dist" inheritAll="false"/>\r
<copy file="${basedir}/target/${javadoc.jar}"\r
<ant antfile="id/build.xml" target="dist_installer" inheritAll="false"/>\r
<ant antfile="collectionobject/build.xml" target="dist_installer" inheritAll="false"/>\r
<ant antfile="vocabulary/build.xml" target="dist_installer" inheritAll="false"/>\r
+ <ant antfile="organization/build.xml" target="dist_installer" inheritAll="false"/>\r
<!--\r
<ant antfile="common/build.xml" target="dist_installer" inheritAll="false"/>\r
<ant antfile="authentication/build.xml" target="dist_installer" inheritAll="false"/>\r
</service:object>
</tenant:serviceBindings>
<!-- end vocabulary service meta-data -->
+ <!-- begin orgauthority service meta-data -->
+ <tenant:serviceBindings name="Orgauthorities" version="0.1">
+ <service:repositoryClient xmlns:service='http://collectionspace.org/services/common/service'>nuxeo-java</service:repositoryClient>
+ <service:object id="1" name="Orgauthority" version="0.1"
+ xmlns:service='http://collectionspace.org/services/common/service'>
+ <service:part id="0" control_group="Managed"
+ versionable="true" auditable="false"
+ label="orgauthorities-system" updated="" order="0">
+ <service:content contentType="application/xml">
+ <service:xmlContent
+ namespaceURI="http://collectionspace.org/services/common/system"
+ schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd">
+ </service:xmlContent>
+ </service:content>
+ </service:part>
+ <service:part id="1" control_group="Managed"
+ versionable="true" auditable="false"
+ label="orgauthorities_common" updated="" order="1">
+ <service:content contentType="application/xml">
+ <service:xmlContent
+ namespaceURI="http://collectionspace.org/services/organization"
+ schemaLocation="http://collectionspace.org/services/organization http://services.collectionspace.org/organization/orgauthorities_common.xsd">
+ </service:xmlContent>
+ </service:content>
+ </service:part>
+ </service:object>
+ </tenant:serviceBindings>
+ <!-- end orgauthority service meta-data -->
+ <!-- begin organization service meta-data.
+ Note there is no Organization service, but there is a
+ Repository workspace so we have to configure that.
+ -->
+ <tenant:serviceBindings name="Organizations" version="0.1">
+ <service:repositoryClient xmlns:service='http://collectionspace.org/services/common/service'>nuxeo-java</service:repositoryClient>
+ <service:object id="1" name="Organization" version="0.1"
+ xmlns:service='http://collectionspace.org/services/common/service'>
+ <service:part id="0" control_group="Managed"
+ versionable="true" auditable="false"
+ label="organizations-system" updated="" order="0">
+ <service:content contentType="application/xml">
+ <service:xmlContent
+ namespaceURI="http://collectionspace.org/services/common/system"
+ schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd">
+ </service:xmlContent>
+ </service:content>
+ </service:part>
+ <service:part id="1" control_group="Managed"
+ versionable="true" auditable="false"
+ label="organizations_common" updated="" order="1">
+ <service:content contentType="application/xml">
+ <service:xmlContent
+ namespaceURI="http://collectionspace.org/services/organization"
+ schemaLocation="http://collectionspace.org/services/organization http://services.collectionspace.org/organization/organizations_common.xsd">
+ </service:xmlContent>
+ </service:content>
+ </service:part>
+ </service:object>
+ </tenant:serviceBindings>
+ <!-- end organization service meta-data -->
<!-- begin acquisition service meta-data -->
<tenant:serviceBindings name="Acquisitions" version="0.1">
<service:repositoryClient xmlns:service='http://collectionspace.org/services/common/service'>nuxeo-java</service:repositoryClient>
-#Tue Oct 06 13:26:44 PDT 2009\r
+#Mon Jan 04 16:43:20 PST 2010\r
eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
-org.eclipse.jdt.core.compiler.compliance=1.6\r
-org.eclipse.jdt.core.compiler.source=1.6\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5\r
+org.eclipse.jdt.core.compiler.compliance=1.5\r
+org.eclipse.jdt.core.compiler.source=1.5\r
<schema name="organizations_common" prefix="organizations_common" src="schemas/organizations_common.xsd"/>
</extension>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
- <doctype name="OrgAuthority" extends="Document">
+ <doctype name="Orgauthority" extends="Document">
<schema name="common"/>
<schema name="dublincore"/>
<schema name="orgauthorities_common"/>
<?xml version="1.0"?>
<component name="org.collectionspace.organization.ecm.types">
<extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
- <type id="OrgAuthority" coretype="OrgAuthority">
+ <type id="Orgauthority" coretype="Orgauthority">
<label>org.collectionspace.orgauthority</label>
<!--icon>/icons/file.gif</icon-->
<default-view>view_documents</default-view>
<type id="Folder" coretype="Folder">
<subtypes>
- <type>OrgAuthority</type>
+ <type>Orgauthority</type>
</subtypes>
</type>
<type id="Workspace" coretype="Workspace">
<subtypes>
- <type>OrgAuthority</type>
+ <type>Orgauthority</type>
</subtypes>
</type>
public void createItem(String testName) {
setupCreate(testName);
- knownItemResourceId = createItemInOrgAuthority(knownResourceId);
+ knownItemResourceId = createItemInAuthority(knownResourceId);
if(logger.isDebugEnabled()){
logger.debug(testName + ": knownItemResourceId=" + knownItemResourceId);
}
}
- private String createItemInOrgAuthority(String vcsid) {
+ private String createItemInAuthority(String vcsid) {
- final String testName = "createItemInOrgAuthority";
+ final String testName = "createItemInAuthority";
if(logger.isDebugEnabled()){
logger.debug(testName + ":...");
}
// Submit the request to the service and store the response.
String identifier = createIdentifier();
String refName = createRefName(identifier);
- MultipartOutput multipart = createOrganizationInstance(vcsid, identifier, refName);
+ MultipartOutput multipart = createOrganizationInstance(vcsid,
+ identifier, refName, "Longer Name for "+identifier,
+ "This is a fake organization that was created by a test method.");
ClientResponse<Response> res = client.createItem(vcsid, multipart);
int statusCode = res.getStatus();
// The only relevant ID may be the one used in update(), below.
MultipartOutput multipart = createOrganizationInstance(
- knownResourceId, NON_EXISTENT_ID, createRefName(NON_EXISTENT_ID));
+ knownResourceId, NON_EXISTENT_ID, createRefName(NON_EXISTENT_ID),
+ null, null);
ClientResponse<MultipartInput> res =
client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart);
int statusCode = res.getStatus();
*/
@AfterClass(alwaysRun=true)
public void cleanUp() {
-
if (logger.isDebugEnabled()) {
logger.debug("Cleaning up temporary resources created for testing ...");
}
// Note: Any non-success responses are ignored and not reported.
ClientResponse<Response> res = client.delete(resourceId);
}
-
}
// ---------------------------------------------------------------
return multipart;
}
- private MultipartOutput createOrganizationInstance(String inOrgAuthority,
- String displayName, String refName) {
+ private MultipartOutput createOrganizationInstance(String inAuthority,
+ String displayName, String refName, String longName, String description) {
OrganizationsCommon organization = new OrganizationsCommon();
organization.setDisplayName(displayName);
if(refName!=null)
organization.setRefName(refName);
+ if(longName!=null)
+ organization.setLongName(longName);
+ if(description!=null)
+ organization.setDescription(description);
MultipartOutput multipart = new MultipartOutput();
OutputPart commonPart = multipart.addPart(organization,
MediaType.APPLICATION_XML_TYPE);
+newOrgAuthorityId );
}
for(String itemName : enumValues){
- createItemInOrgAuthority(newOrgAuthorityId, orgAuthorityName, itemName, createRefName(itemName));
+ createItemInAuthority(newOrgAuthorityId, orgAuthorityName, itemName, createRefName(itemName));
}
}
- private String createItemInOrgAuthority(String vcsid, String orgAuthorityName, String itemName, String refName) {
+ private String createItemInAuthority(String vcsid, String orgAuthorityName, String itemName, String refName) {
// Expected status code: 201 Created
int EXPECTED_STATUS_CODE = Response.Status.CREATED.getStatusCode();
// Type of service request being tested
private DocumentHandler createItemDocumentHandler(
ServiceContext ctx,
- String inOrgAuthority) throws Exception {
+ String inAuthority) throws Exception {
DocumentHandler docHandler = OrganizationHandlerFactory.getInstance().getHandler(
ctx.getRepositoryClientType().toString());
docHandler.setServiceContext(ctx);
- ((OrganizationDocumentModelHandler) docHandler).setInOrgAuthority(inOrgAuthority);
+ ((OrganizationDocumentModelHandler) docHandler).setInAuthority(inAuthority);
if (ctx.getInput() != null) {
Object obj = ((MultipartServiceContext) ctx).getInputPart(ctx.getCommonPartLabel(getItemServiceName()),
OrganizationsCommon.class);
DocumentFilter myFilter =
DocumentFilter.CreatePaginatedDocumentFilter(queryParams);
myFilter.setWhereClause(
- "organizations_common:inOrgAuthority='" + parentcsid + "'");
+ "organizations_common:inAuthority='" + parentcsid + "'");
handler.setDocumentFilter(myFilter);
getRepositoryClient(ctx).getFiltered(ctx, handler);
organizationObjectList = (OrganizationsCommonList) handler.getCommonPartList();
private OrganizationsCommonList organizationList;
/**
- * inOrgAuthority is the parent OrgAuthority for this context
+ * inAuthority is the parent OrgAuthority for this context
*/
- private String inOrgAuthority;
+ private String inAuthority;
- public String getInOrgAuthority() {
- return inOrgAuthority;
+ public String getInAuthority() {
+ return inAuthority;
}
- public void setInOrgAuthority(String inOrgAuthority) {
- this.inOrgAuthority = inOrgAuthority;
+ public void setInAuthority(String inAuthority) {
+ this.inAuthority = inAuthority;
}
@Override
OrganizationJAXBSchema.DESCRIPTION));
*/
String id = NuxeoUtils.extractId(docModel.getPathAsString());
- ilistItem.setUri("/organizations/"+inOrgAuthority+"/items/" + id);
+ ilistItem.setUri("/organizations/"+inAuthority+"/items/" + id);
ilistItem.setCsid(id);
list.add(ilistItem);
}
<!--module>query</module-->
<module>acquisition</module>
<module>vocabulary</module>
+ <module>organization</module>
<module>id</module>
<module>collectionobject</module>
<module>intake</module>
-#Thu Sep 17 14:30:08 PDT 2009\r
+#Mon Jan 04 16:40:40 PST 2010\r
activeProfiles=\r
eclipse.preferences.version=1\r
fullBuildGoals=process-test-resources\r
includeModules=false\r
resolveWorkspaceProjects=true\r
resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
version=1\r
-#Tue Oct 06 13:26:44 PDT 2009\r
+#Mon Jan 04 16:43:17 PST 2010\r
eclipse.preferences.version=1\r
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5\r
org.eclipse.jdt.core.compiler.compliance=1.5\r