KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > modules > actions > portlets > security > SecurityConstants


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
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
17 package org.apache.jetspeed.modules.actions.portlets.security;
18
19
20 /**
21  * This class contains all the common constants used between data entry forms and browsers and actions
22  *
23  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
24  * @version $Id: SecurityConstants.java,v 1.6 2004/02/23 02:53:08 jford Exp $
25  */

26 public class SecurityConstants
27 {
28     // msg id - for error or information messages on data entry forms
29
public static final String JavaDoc PARAM_MSGID = "msgid";
30     // msg - the informational or form message in a form
31
public static final String JavaDoc PARAM_MSG = "msg";
32     // unique entity id - parameter passed between browser forms and update forms
33
public static final String JavaDoc PARAM_ENTITY_ID = "entityid";
34     // username parameter
35
public static final String JavaDoc PARAM_USERNAME = "username";
36
37     // mode parameter
38
public static final String JavaDoc PARAM_MODE = "mode";
39     // update mode parameter
40
public static final String JavaDoc PARAM_MODE_UPDATE = "update";
41     // delete mode parameter
42
public static final String JavaDoc PARAM_MODE_DELETE = "delete";
43     // insert mode parameter
44
public static final String JavaDoc PARAM_MODE_INSERT = "insert";
45
46     //
47
// Context Constants
48
//
49
public static final String JavaDoc CONTEXT_USER = "user";
50     public static final String JavaDoc CONTEXT_USERS = "users";
51     public static final String JavaDoc CONTEXT_ROLE = "role";
52     public static final String JavaDoc CONTEXT_ROLES = "roles";
53     public static final String JavaDoc CONTEXT_PERMISSION = "permission";
54     public static final String JavaDoc CONTEXT_PERMISSIONS = "permissions";
55     public static final String JavaDoc CONTEXT_GROUP = "group";
56     public static final String JavaDoc CONTEXT_GROUPS = "groups";
57     public static final String JavaDoc CONTEXT_SELECTED = "selected";
58     public static final String JavaDoc CONTEXT_ROLES_SELECTED = "roles_selected";
59     public static final String JavaDoc CONTEXT_GROUPS_SELECTED = "groups_selected";
60     public static final String JavaDoc CONTEXT_GROUPS_ROLES = "userGroupRoles";
61
62     // user browser pane id
63
public static final String JavaDoc PANEID_USER_BROWSER = "UserBrowser";
64     // user form pane id
65
public static final String JavaDoc PANEID_USER_UPDATE = "UserForm";
66     // role browser pane id
67
public static final String JavaDoc PANEID_ROLE_BROWSER = "RoleBrowser";
68     // role form pane id
69
public static final String JavaDoc PANEID_ROLE_UPDATE = "RoleForm";
70     // permission browser pane id
71
public static final String JavaDoc PANEID_PERMISSION_BROWSER = "PermissionBrowser";
72     // permission form pane id
73
public static final String JavaDoc PANEID_PERMISSION_UPDATE = "PermissionForm";
74     // group browser pane id
75
public static final String JavaDoc PANEID_GROUP_BROWSER = "GroupBrowser";
76     // group form pane id
77
public static final String JavaDoc PANEID_GROUP_UPDATE = "GroupForm";
78     // user role form pane id
79
public static final String JavaDoc PANEID_USERROLE_UPDATE = "UserRoleForm";
80     // role permission form pane id
81
public static final String JavaDoc PANEID_ROLEPERMISSION_UPDATE = "PermissionBrowser";
82
83     public static final String JavaDoc PANE_NAME = "js_panename";
84
85     //
86
// Informational and Error Messages for Security Forms
87
///
88
public static final String JavaDoc MESSAGES[] =
89     {
90         "Database Update Failure. Please report this error to your Database Administrator.",
91         "Database Delete Failure. Please report this error to your Database Administrator.",
92         "Invalid Entity Name. Please enter a valid entity name.",
93         "Entity Name Already Exists. Please choose another unique, identifying name.",
94         "Deletion not allowed. You are trying to delete the currently logged on user.",
95         "Missing Parameter. Cannot process Security form."
96     };
97     //
98
// indexes into messages
99
//
100
public static final int MID_UPDATE_FAILED = 0;
101     public static final int MID_DELETE_FAILED = 1;
102     public static final int MID_INVALID_ENTITY_NAME = 2;
103     public static final int MID_ENTITY_ALREADY_EXISTS = 3;
104     public static final int MID_CANT_DELETE_CURRENT = 4;
105     public static final int MID_MISSING_PARAMETER = 5;
106
107 };
108
Popular Tags