]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
f84d7d666ad10bdc0e7339a8b83ccabeac9a40c2
[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 Regents of the University of California
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  * 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,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23
24 package org.collectionspace.services.jaxrs;
25
26 import org.collectionspace.services.account.AccountResource;
27 import org.collectionspace.services.collectionobject.CollectionObjectResource;
28 import org.collectionspace.services.id.IDResource;
29 import org.collectionspace.services.intake.IntakeResource;
30 import org.collectionspace.services.relation.NewRelationResource;
31 import org.collectionspace.services.acquisition.AcquisitionResource;
32 import org.collectionspace.services.dimension.DimensionResource;
33 import org.collectionspace.services.contact.ContactResource;
34
35 import org.collectionspace.services.vocabulary.VocabularyResource;
36
37 //import org.collectionspace.services.query.QueryResource;
38
39 import javax.ws.rs.core.Application;
40 import java.util.HashSet;
41 import java.util.Set;
42
43 /**
44  * CollectionSpaceJaxRsApplication, the root application
45  * for enumerating Resource classes in the Services Layer,
46  * which in turn respond to and route REST-based requests.
47  *
48  * $LastChangedRevision$
49  * $LastChangedDate$
50  */
51
52 public class CollectionSpaceJaxRsApplication extends Application {
53
54     private Set<Object> singletons = new HashSet<Object>();
55     private Set<Class<?>> empty = new HashSet<Class<?>>();
56
57     public CollectionSpaceJaxRsApplication() {
58         singletons.add(new AccountResource());
59         singletons.add(new CollectionObjectResource());
60         singletons.add(new IDResource());
61         singletons.add(new IntakeResource());
62         singletons.add(new AcquisitionResource());
63         singletons.add(new NewRelationResource());
64         singletons.add(new VocabularyResource());
65         singletons.add(new DimensionResource());
66         singletons.add(new ContactResource());
67
68 //        singletons.add(new QueryResource());
69 //        singletons.add(new DomainIdentifierResource());
70 //        singletons.add(new PingResource());
71     }
72
73     @Override
74     public Set<Class<?>> getClasses() {
75         return empty;
76     }
77
78     @Override
79     public Set<Object> getSingletons() {
80         return singletons;
81     }
82 }
83