KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openi > security > Permission


1 /*********************************************************************************
2  * The contents of this file are subject to the OpenI Public License Version 1.0
3  * ("License"); You may not use this file except in compliance with the
4  * License. You may obtain a copy of the License at
5  * http://www.openi.org/docs/LICENSE.txt
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is: OpenI Open Source
12  *
13  * The Initial Developer of the Original Code is Loyalty Matrix, Inc.
14  * Portions created by Loyalty Matrix, Inc. are
15  * Copyright (C) 2005 Loyalty Matrix, Inc.; All Rights Reserved.
16  *
17  * Contributor(s): ______________________________________.
18  *
19  ********************************************************************************/

20 package org.openi.security;
21
22
23 /**
24  * @author Uddhab Pant
25  *
26  * Type safe enum class contains permissions.
27  *
28  */

29 public class Permission {
30     public static final Permission APP_ADMINISTRATION = new Permission(
31             "Application_Administration");
32     public static final Permission PROJ_ADMINISTRATION = new Permission(
33             "Project_Administration");
34     public static final Permission SAVE_PUBLIC = new Permission("Save_Public");
35     public static final Permission SAVE_PRIVATE = new Permission("Save_Private");
36     public static final Permission DELETE_PUBLIC = new Permission(
37             "Delete_Public");
38     public static final Permission DELETE_PRIVATE = new Permission(
39             "Delete_Private");
40     public static final Permission CREATE_NEW = new Permission("Create_New");
41     public static final Permission CONFIGURE_DATASOURCE = new Permission(
42             "Configure_Datasource");
43     public static final Permission UPLOAD_FILE = new Permission("Upload_File");
44     public static final Permission DIAGNOSTICS = new Permission("Diagnostics");
45     public static final Permission MANAGE_FILES = new Permission("Manage_Files");
46     public static final Permission CONFIGURE_DASHBOARD = new Permission("Configure_Dashboard");
47     public static final Permission AUTOGENERATE = new Permission("Autogenerate");
48     public static final Permission READ_ONLY = new Permission("Read_Only");
49     private String JavaDoc permissionName;
50
51     private Permission(String JavaDoc permissionName) {
52         this.permissionName = permissionName;
53     }
54
55     public String JavaDoc toString() {
56         return this.permissionName;
57     }
58 }
59
Popular Tags