2 * OrgAuthorityClient.java
4 * {Purpose of This Class}
6 * {Other Notes Relating to This Class (Optional)}
8 * $LastChangedBy: $ $LastChangedRevision$ $LastChangedDate$
10 * This document is a part of the source code and related artifacts for
11 * CollectionSpace, an open source collections management system for museums and
12 * related institutions:
14 * http://www.collectionspace.org http://wiki.collectionspace.org
16 * Copyright © 2009 {Contributing Institution}
18 * Licensed under the Educational Community License (ECL), Version 2.0. You may
19 * not use this file except in compliance with this License.
21 * You may obtain a copy of the ECL 2.0 License at
22 * https://source.collectionspace.org/collection-space/LICENSE.txt
24 package org.collectionspace.services.client;
26 import org.collectionspace.services.organization.OrganizationsCommon;
27 import org.collectionspace.services.organization.OrgauthoritiesCommon;
30 * The Class OrgAuthorityClient.
32 public class OrgAuthorityClient extends AuthorityWithContactsClientImpl<OrgauthoritiesCommon, OrganizationsCommon, OrgAuthorityProxy> {
34 public static final String SERVICE_NAME = "orgauthorities";
35 public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
36 public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
37 public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
38 public static final String TERM_INFO_GROUP_XPATH_BASE = "orgTermGroupList";
43 public static final String SERVICE_ITEM_NAME = "organizations";
44 public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME;
46 // Payload Part/Schema part names
48 public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME
49 + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
50 public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME
51 + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
56 public OrgAuthorityClient() throws Exception {
60 public OrgAuthorityClient(String clientPropertiesFilename) throws Exception {
61 super(clientPropertiesFilename);
69 public String getServiceName() {
74 public String getServicePathComponent() {
75 return SERVICE_PATH_COMPONENT;
79 public Class<OrgAuthorityProxy> getProxyClass() {
80 return OrgAuthorityProxy.class;
84 public String getItemCommonPartName() {
85 return getCommonPartName(SERVICE_ITEM_NAME);
89 public String getInAuthority(OrganizationsCommon item) {
90 return item.getInAuthority();
94 public void setInAuthority(OrganizationsCommon item, String inAuthorityCsid) {
95 item.setInAuthority(inAuthorityCsid);
99 public String createAuthorityInstance(String shortIdentifier, String displayName) {
100 PoxPayloadOut poxPayloadout = OrgAuthorityClientUtils.createOrgAuthorityInstance(displayName, shortIdentifier, SERVICE_COMMON_PART_NAME);
101 return poxPayloadout.asXML();
105 public String createAuthorityItemInstance(String shortIdentifier, String displayName) {
106 // TODO Auto-generated method stub