KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > repository > acl > AclEntry


1 /*
2  * Copyright 2004 Outerthought bvba and Schaubroeck nv
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.outerj.daisy.repository.acl;
17
18 import org.outerx.daisy.x10.AclEntryDocument;
19
20 /**
21  * An AclEntry specifies the permissions for a certain subject.
22  *
23  * <p>To save modification to this AclEntry, call {@link Acl#save()}
24  * on the containing Acl object.
25  */

26 public interface AclEntry {
27     public AclActionType get(AclPermission aclPermission);
28
29     public void set(AclPermission permission, AclActionType action);
30
31     /**
32      * What's returned here depends on (or should be intrepreted according to)
33      * what {@link #getSubjectType()} returns.
34      *
35      * <ul>
36      * <li>{@link AclSubjectType#USER}: a user id
37      * <li>{@link AclSubjectType#ROLE}: a role id
38      * <li>{@link AclSubjectType#EVERYONE}: -1
39      * </ul>
40      */

41     public long getSubjectValue();
42
43     public AclSubjectType getSubjectType();
44
45     public void setSubjectValue(long value);
46
47     public void setSubjectType(AclSubjectType subjectType);
48     
49     public AclEntryDocument getXml();
50 }
51
Popular Tags