📄 environment.java
字号:
/*
* Copyright (c) 2000-2005, University of Salford
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the University of Salford nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package issrg.pba.rbac.xmlpolicy.ifstatement;
/**
* This class holds the execution environment parameters. They are the
* arguments to
* the action and other environmental variables, as defined by the AEF.
*/
public class Environment {
protected java.util.Map args;
protected java.util.Map env;
protected Environment() {
}
/**
* This constructor builds an Environment from the given map of arguments
* and a map of environmental variables. Both maps have the variable names
* as keys and their string values as values. The values are then decoded
* using Types.construct() method.
*
* @param arguments - the arguments of the action; if null, no arguments of
* the action are present
* @param environment - the environment; if null, the environment is assumed
* to be empty
*
* @see Types#construct
*/
public Environment(java.util.Map arguments, java.util.Map environment){
args=arguments==null?new java.util.Hashtable():arguments;
env=environment==null?new java.util.Hashtable():environment;
}
/**
* This method returns a map of action arguments, indexed by their name, as
* defined by the ActionPolicy.
*
* @return java.util.Map of the action arguments; never null, but may contain
* no entries
*/
public java.util.Map getArgs(){
return args;
}
/**
* This method returns a map of environmental parameters, indexed by their
* name, as defined by the AEF.
*
* @return java.util.Map of the environmental parameters; never null, but
* may contain no entries
*/
public java.util.Map getEnv(){
return env;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -