]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
9ccf7c46ba8c578128def8bc024c5c84937e1f81
[tmp/jakarta-migration.git] /
1 /**
2  * OrgAuthorityClient.java
3  *
4  * {Purpose of This Class}
5  *
6  * {Other Notes Relating to This Class (Optional)}
7  *
8  * $LastChangedBy: $ $LastChangedRevision$ $LastChangedDate$
9  *
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:
13  *
14  * http://www.collectionspace.org http://wiki.collectionspace.org
15  *
16  * Copyright © 2009 {Contributing Institution}
17  *
18  * Licensed under the Educational Community License (ECL), Version 2.0. You may
19  * not use this file except in compliance with this License.
20  *
21  * You may obtain a copy of the ECL 2.0 License at
22  * https://source.collectionspace.org/collection-space/LICENSE.txt
23  */
24 package org.collectionspace.services.client;
25
26 import org.collectionspace.services.organization.OrganizationsCommon;
27
28 /**
29  * The Class OrgAuthorityClient.
30  */
31 public class OrgAuthorityClient extends AuthorityWithContactsClientImpl<OrganizationsCommon, OrgAuthorityProxy> {
32
33     public static final String SERVICE_NAME = "orgauthorities";
34     public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
35     public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
36     public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
37     public static final String TERM_INFO_GROUP_XPATH_BASE = "orgTermGroupList";
38     
39     //
40     // Subitem constants
41     //
42     public static final String SERVICE_ITEM_NAME = "organizations";
43     public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME;
44     //
45     // Payload Part/Schema part names
46     //
47     public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME
48             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
49     public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME
50             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
51
52     //
53     // Constructors
54     //
55     public OrgAuthorityClient() {
56         super();
57     }
58     
59     public OrgAuthorityClient(String clientPropertiesFilename) {
60                 super(clientPropertiesFilename);
61         }
62     
63     //
64     // Overrides
65     //
66     
67     @Override
68     public String getServiceName() {
69         return SERVICE_NAME;
70     }
71
72     @Override
73     public String getServicePathComponent() {
74         return SERVICE_PATH_COMPONENT;
75     }
76
77     @Override
78     public Class<OrgAuthorityProxy> getProxyClass() {
79         return OrgAuthorityProxy.class;
80     }
81
82     @Override
83     public String getItemCommonPartName() {
84         return getCommonPartName(SERVICE_ITEM_NAME);
85     }
86
87     @Override
88     public String getInAuthority(OrganizationsCommon item) {
89         return item.getInAuthority();
90     }
91
92     @Override
93     public void setInAuthority(OrganizationsCommon item, String inAuthorityCsid) {
94         item.setInAuthority(inAuthorityCsid);
95     }
96 }