File Source: UISecurityEnforced.java
/*
P/P * Method: org.apache.roller.weblogger.ui.struts2.util.UISecurityEnforced__static_init
*/
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * 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. For additional information regarding
15 * copyright in this work, please see the NOTICE file in the top level
16 * directory of this distribution.
17 */
18
19 package org.apache.roller.weblogger.ui.struts2.util;
20
21
22 /**
23 * Implemented by struts2 actions which want to enforce some level of security
24 * protection on their action.
25 *
26 * Available enforcements are ...
27 * - require a logged in user
28 * - reguire a valid weblog to work on
29 * - require a specific user role, such as "admin"
30 * - require a specific weblog permission
31 *
32 */
33 public interface UISecurityEnforced {
34
35 /**
36 * Does the action require an authenticated user?
37 *
38 * @return boolean True if authenticated user is required, false otherwise.
39 */
40 public boolean isUserRequired();
41
42
43 /**
44 * Does the action require a valid weblog to work on?
45 *
46 * This only takes effect if isUserRequired() is 'true'.
47 *
48 * @return boolean True if action weblog is required, false otherwise.
49 */
50 public boolean isWeblogRequired();
51
52
53 /**
54 * What is the required user role, if any?
55 *
56 * This method only takes effect if isUserRequired() is 'true'.
57 *
58 * @return String The required user role, or null if no role required.
59 */
60 public String requiredUserRole();
61
62
63 /**
64 * What are the required weblog permissions for this action, if any?
65 *
66 * This method only takes effect if both isUserRequired() and isWeblogRequired()
67 * are 'true'.
68 *
69 * @return short The required weblog permissions, or -1 if no permissions required.
70 */
71 public short requiredWeblogPermissions();
72
73 }
SofCheck Inspector Build Version : 2.18479
| UISecurityEnforced.java |
2009-Jan-02 14:25:14 |
| UISecurityEnforced.class |
2009-Sep-04 03:12:43 |