]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
0e6aefe926895cea7c1db58fbdbc6c5952bdded6
[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 import org.collectionspace.services.organization.OrgAuthorityResource;
37 import org.collectionspace.services.person.PersonAuthorityResource;
38
39 //import org.collectionspace.services.query.QueryResource;
40
41 import javax.ws.rs.core.Application;
42 import java.util.HashSet;
43 import java.util.Set;
44
45 /**
46  * CollectionSpaceJaxRsApplication, the root application
47  * for enumerating Resource classes in the Services Layer,
48  * which in turn respond to and route REST-based requests.
49  *
50  * $LastChangedRevision$
51  * $LastChangedDate$
52  */
53
54 public class CollectionSpaceJaxRsApplication extends Application {
55
56     private Set<Object> singletons = new HashSet<Object>();
57     private Set<Class<?>> empty = new HashSet<Class<?>>();
58
59     public CollectionSpaceJaxRsApplication() {
60         singletons.add(new AccountResource());
61         singletons.add(new CollectionObjectResource());
62         singletons.add(new IDResource());
63         singletons.add(new IntakeResource());
64         singletons.add(new AcquisitionResource());
65         singletons.add(new NewRelationResource());
66         singletons.add(new VocabularyResource());
67         singletons.add(new OrgAuthorityResource());
68         singletons.add(new PersonAuthorityResource());
69         singletons.add(new DimensionResource());
70         singletons.add(new ContactResource());
71
72 //        singletons.add(new QueryResource());
73 //        singletons.add(new DomainIdentifierResource());
74 //        singletons.add(new PingResource());
75     }
76
77     @Override
78     public Set<Class<?>> getClasses() {
79         return empty;
80     }
81
82     @Override
83     public Set<Object> getSingletons() {
84         return singletons;
85     }
86 }
87