]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
0058a984a0eef563323c6bbbb816d157c9b393e2
[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  *  This document is a part of the source code and related artifacts
25  *  for CollectionSpace, an open source collections management system
26  *  for museums and related institutions:
27
28  *  http://www.collectionspace.org
29  *  http://wiki.collectionspace.org
30
31  *  Copyright 2009 University of California at Berkeley
32
33  *  Licensed under the Educational Community License (ECL), Version 2.0.
34  *  You may not use this file except in compliance with this License.
35
36  *  You may obtain a copy of the ECL 2.0 License at
37
38  *  https://source.collectionspace.org/collection-space/LICENSE.txt
39
40  *  Unless required by applicable law or agreed to in writing, software
41  *  distributed under the License is distributed on an "AS IS" BASIS,
42  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43  *  See the License for the specific language governing permissions and
44  *  limitations under the License.
45  */
46 /*
47  * To change this template, choose Tools | Templates
48  * and open the template in the editor.
49  */
50 package org.collectionspace.services.authorization;
51
52 /**
53  * CSpaceResourceImpl abstract resource implementation
54  * @author 
55  */
56 public abstract class CSpaceResourceImpl implements CSpaceResource {
57
58     private String id;
59     private TYPE type;
60
61     public CSpaceResourceImpl() {
62     }
63
64     public CSpaceResourceImpl(String id, TYPE type) {
65         if (id == null || id.isEmpty() || type == null) {
66             throw new IllegalArgumentException("id and/or type cannot be null or empty");
67         }
68         this.id = id;
69         this.type = type;
70     }
71
72     @Override
73     public String getId() {
74         return id;
75     }
76
77     @Override
78     public TYPE getType() {
79         return type;
80     }
81
82     @Override
83     public abstract CSpaceAction getAction();
84 }