|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ConfigAttribute.java | - | - | - | - |
|
||||||||||||||
| 1 | /* Copyright 2004 Acegi Technology Pty Limited | |
| 2 | * | |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 | * you may not use this file except in compliance with the License. | |
| 5 | * You may obtain a copy of the License at | |
| 6 | * | |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | * | |
| 9 | * Unless required by applicable law or agreed to in writing, software | |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 | * See the License for the specific language governing permissions and | |
| 13 | * limitations under the License. | |
| 14 | */ | |
| 15 | ||
| 16 | package org.acegisecurity; | |
| 17 | ||
| 18 | import java.io.Serializable; | |
| 19 | ||
| 20 | ||
| 21 | /** | |
| 22 | * Stores a security system related configuration attribute. | |
| 23 | * | |
| 24 | * <p> | |
| 25 | * When an {@link org.acegisecurity.intercept.AbstractSecurityInterceptor} | |
| 26 | * is setup, a list of configuration attributes is defined for secure object | |
| 27 | * patterns. These configuration attributes have special meaning to a {@link | |
| 28 | * RunAsManager}, {@link AccessDecisionManager} or | |
| 29 | * <code>AccessDecisionManager</code> delegate. | |
| 30 | * </p> | |
| 31 | * | |
| 32 | * <P> | |
| 33 | * Stored at runtime with other <code>ConfigAttribute</code>s for the same | |
| 34 | * secure object target within a {@link ConfigAttributeDefinition}. | |
| 35 | * </p> | |
| 36 | * | |
| 37 | * @author Ben Alex | |
| 38 | * @version $Id: ConfigAttribute.java,v 1.6 2005/11/17 00:55:49 benalex Exp $ | |
| 39 | */ | |
| 40 | public interface ConfigAttribute extends Serializable { | |
| 41 | //~ Methods ================================================================ | |
| 42 | ||
| 43 | /** | |
| 44 | * If the <code>ConfigAttribute</code> can be represented as a | |
| 45 | * <code>String</code> and that <code>String</code> is sufficient in | |
| 46 | * precision to be relied upon as a configuration parameter by a {@link | |
| 47 | * RunAsManager}, {@link AccessDecisionManager} or | |
| 48 | * <code>AccessDecisionManager</code> delegate, this method should return | |
| 49 | * such a <code>String</code>. | |
| 50 | * | |
| 51 | * <p> | |
| 52 | * If the <code>ConfigAttribute</code> cannot be expressed with sufficient | |
| 53 | * precision as a <code>String</code>, <code>null</code> should be | |
| 54 | * returned. Returning <code>null</code> will require any relying classes | |
| 55 | * to specifically support the <code>ConfigAttribute</code> | |
| 56 | * implementation, so returning <code>null</code> should be avoided | |
| 57 | * unless actually required. | |
| 58 | * </p> | |
| 59 | * | |
| 60 | * @return a representation of the configuration attribute (or | |
| 61 | * <code>null</code> if the configuration attribute cannot be | |
| 62 | * expressed as a <code>String</code> with sufficient precision). | |
| 63 | */ | |
| 64 | public String getAttribute(); | |
| 65 | } |
|
||||||||||