]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
6a0249ab78ac2418f4e19b8db46ce609aea0296c
[tmp/jakarta-migration.git] /
1 /**
2  *  This document is a part of the source code and related artifacts
3  *  for CollectionSpace, an open source collections management system
4  *  for museums and related institutions:
5
6  *  http://www.collectionspace.org
7  *  http://wiki.collectionspace.org
8
9  *  Copyright 2009 University of California at Berkeley
10
11  *  Licensed under the Educational Community License (ECL), Version 2.0.
12  *  You may not use this file except in compliance with this License.
13
14  *  You may obtain a copy of the ECL 2.0 License at
15
16  *  https://source.collectionspace.org/collection-space/LICENSE.txt
17
18  *  Unless required by applicable law or agreed to in writing, software
19  *  distributed under the License is distributed on an "AS IS" BASIS,
20  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  *  See the License for the specific language governing permissions and
22  *  limitations under the License.
23  */
24 package org.collectionspace.services.vocabulary;
25
26 //import javax.ws.rs.Consumes;
27 //import javax.ws.rs.DELETE;
28 //import javax.ws.rs.GET;
29 //import javax.ws.rs.POST;
30 //import javax.ws.rs.PUT;
31 import javax.ws.rs.Path;
32 //import javax.ws.rs.PathParam;
33 //import javax.ws.rs.Produces;
34 //import javax.ws.rs.QueryParam;
35 //import javax.ws.rs.WebApplicationException;
36 //import javax.ws.rs.core.Context;
37 //import javax.ws.rs.core.MultivaluedMap;
38 //import javax.ws.rs.core.Response;
39 //import javax.ws.rs.core.UriBuilder;
40 //import javax.ws.rs.core.UriInfo;
41
42 //import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema;
43 //import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
44 import org.collectionspace.services.common.vocabulary.AuthorityResource;
45 import org.collectionspace.services.client.VocabularyClient;
46
47 //import org.collectionspace.services.common.AbstractMultiPartCollectionSpaceResourceImpl;
48 //import org.collectionspace.services.common.ClientType;
49 //import org.collectionspace.services.common.ServiceMain;
50 //import org.collectionspace.services.common.context.ServiceContext;
51 //import org.collectionspace.services.common.document.BadRequestException;
52 //import org.collectionspace.services.common.document.DocumentFilter;
53 //import org.collectionspace.services.common.document.DocumentHandler;
54 //import org.collectionspace.services.common.document.DocumentNotFoundException;
55 //import org.collectionspace.services.common.security.UnauthorizedException;
56 //import org.collectionspace.services.common.query.IQueryManager;
57 import org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler;
58 //import org.jboss.resteasy.plugins.providers.multipart.PoxPayloadIn;
59 //import org.jboss.resteasy.plugins.providers.multipart.PoxPayloadOut;
60 //import org.jboss.resteasy.util.HttpResponseCodes;
61 import org.slf4j.Logger;
62 import org.slf4j.LoggerFactory;
63
64 /**
65  * The Class VocabularyResource.
66  */
67 //@Path("/vocabularies")
68 @Path("/" + VocabularyClient.SERVICE_PATH_COMPONENT)
69 public class VocabularyResource extends 
70         AuthorityResource<VocabulariesCommon, VocabulariesCommonList, VocabularyitemsCommonList,
71                                                 VocabularyItemDocumentModelHandler> {
72
73     private final static String vocabularyServiceName = VocabularyClient.SERVICE_PATH_COMPONENT;
74 //    private final static String vocabularyServiceName = "vocabularies";
75
76         private final static String VOCABULARIES_COMMON = "vocabularies_common";
77     
78     private final static String vocabularyItemServiceName = "vocabularyitems";
79         private final static String VOCABULARYITEMS_COMMON = "vocabularyitems_common";
80     
81     /** The logger. */
82     final Logger logger = LoggerFactory.getLogger(VocabularyResource.class);
83
84         /**
85          * Instantiates a new VocabularyResource.
86          */
87         public VocabularyResource() {
88                 super(VocabulariesCommon.class, VocabularyResource.class,
89                                 VOCABULARIES_COMMON, VOCABULARYITEMS_COMMON);
90         }
91
92     /* (non-Javadoc)
93      * @see org.collectionspace.services.common.AbstractCollectionSpaceResourceImpl#getServiceName()
94      */
95     @Override
96     public String getServiceName() {
97         return vocabularyServiceName;
98     }
99
100     /**
101      * Gets the item service name.
102      * 
103      * @return the item service name
104      */
105     @Override
106     public String getItemServiceName() {
107         return vocabularyItemServiceName;
108     }
109     
110         /* (non-Javadoc)
111          * @see org.collectionspace.services.common.CollectionSpaceResource#getCommonPartClass()
112          */
113         @Override
114         public Class<VocabulariesCommon> getCommonPartClass() {
115                 return VocabulariesCommon.class;
116         }
117
118 }