KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > security > Permission


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.security;
14
15 import info.magnolia.cms.util.UrlPattern;
16
17
18 /**
19  * Date: Jan 5, 2005 Time: 11:32:36 AM
20  * @author Sameer Charles
21  */

22 public interface Permission {
23
24     /**
25      * All possible permissions
26      */

27     long ADD = 1;
28
29     long SET = 2;
30
31     long REMOVE = 4;
32
33     long READ = 8;
34
35     long EXECUTE = 16;
36
37     long SYNDICATE = 32;
38
39     // permission names are not localized, they are never displayed in the GUI but only used for exception messages
40

41     String JavaDoc PERMISSION_NAME_ADD = "Add"; //$NON-NLS-1$
42

43     String JavaDoc PERMISSION_NAME_SET = "Set"; //$NON-NLS-1$
44

45     String JavaDoc PERMISSION_NAME_REMOVE = "Remove"; //$NON-NLS-1$
46

47     String JavaDoc PERMISSION_NAME_READ = "Read"; //$NON-NLS-1$
48

49     String JavaDoc PERMISSION_NAME_EXECUTE = "Execute"; //$NON-NLS-1$
50

51     String JavaDoc PERMISSION_NAME_SYNDICATE = "Syndicate"; //$NON-NLS-1$
52

53     String JavaDoc PERMISSION_NAME_ALL = "(Add, Set, Read, Execute, Syndicate)"; //$NON-NLS-1$
54

55     String JavaDoc PERMISSION_NAME_WRITE = "(Add, Set, Read)"; //$NON-NLS-1$
56

57     /**
58      * permissions used via admin central module
59      */

60     long ALL = ADD | REMOVE | SET | READ | EXECUTE | SYNDICATE;
61
62     long WRITE = ADD | SET | READ;
63
64     void setPattern(UrlPattern value);
65
66     UrlPattern getPattern();
67
68     void setPermissions(long value);
69
70     long getPermissions();
71
72     boolean match(String JavaDoc path);
73 }
74
Popular Tags