]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
2724e8be8d4519efde1607779c73ff78bf61335c
[tmp/jakarta-migration.git] /
1 /**
2  * This document is a part of the source code and related artifacts for
3  * CollectionSpace, an open source collections management system for museums and
4  * related institutions:
5  *
6  * http://www.collectionspace.org http://wiki.collectionspace.org
7  *
8  * Copyright 2009 University of California at Berkeley
9  *
10  * Licensed under the Educational Community License (ECL), Version 2.0. You may
11  * not use this file except in compliance with this License.
12  *
13  * You may obtain a copy of the ECL 2.0 License at
14  *
15  * https://source.collectionspace.org/collection-space/LICENSE.txt
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
19  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
20  * License for the specific language governing permissions and limitations under
21  * the License.
22  */
23 package org.collectionspace.services.person;
24
25 import javax.ws.rs.Consumes;
26 import javax.ws.rs.Path;
27 import javax.ws.rs.Produces;
28 import org.collectionspace.services.client.PersonAuthorityClient;
29 import org.collectionspace.services.contact.AuthorityResourceWithContacts;
30 import org.collectionspace.services.person.nuxeo.PersonDocumentModelHandler;
31 import org.slf4j.Logger;
32 import org.slf4j.LoggerFactory;
33
34 /**
35  * PersonAuthorityResource
36  *
37  * Handles, dispatches, and returns responses to RESTful requests related to
38  * Person authority-related resources.
39  */
40 @Path(PersonAuthorityClient.SERVICE_PATH)
41 @Consumes("application/xml")
42 @Produces("application/xml")
43 public class PersonAuthorityResource extends AuthorityResourceWithContacts<PersonauthoritiesCommon, PersonDocumentModelHandler> {
44
45     final Logger logger = LoggerFactory.getLogger(PersonAuthorityResource.class);
46
47     public PersonAuthorityResource() {
48         super(PersonauthoritiesCommon.class, PersonAuthorityResource.class,
49                 PersonAuthorityClient.SERVICE_COMMON_PART_NAME, PersonAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME);
50     }
51
52     @Override
53     public String getServiceName() {
54         return PersonAuthorityClient.SERVICE_NAME;
55     }
56
57     @Override
58     public String getItemServiceName() {
59         return PersonAuthorityClient.SERVICE_ITEM_NAME;
60     }
61
62     @Override
63     public String getItemTermInfoGroupXPathBase() {
64         return PersonAuthorityClient.TERM_INFO_GROUP_XPATH_BASE;
65     }
66
67     @Override
68     public Class<PersonauthoritiesCommon> getCommonPartClass() {
69         return PersonauthoritiesCommon.class;
70     }
71 }