org.jboss.security.xacml.core
Class JBossXACMLPolicy

java.lang.Object
  extended by org.jboss.security.xacml.core.JBossXACMLPolicy
All Implemented Interfaces:
ContextMapOp, XACMLPolicy

public class JBossXACMLPolicy
extends Object
implements XACMLPolicy, ContextMapOp

JBossXACML Policy

Since:
Jul 6, 2007
Version:
$Revision$
Author:
Anil.Saldhana@redhat.com

Field Summary
 
Fields inherited from interface org.jboss.security.xacml.interfaces.XACMLPolicy
POLICY, POLICYSET
 
Constructor Summary
JBossXACMLPolicy(InputStream is, int type)
          Construct a JBossXACMLPolicy
JBossXACMLPolicy(InputStream is, int type, JBossPolicyFinder theFinder)
          Construct a JBossXACMLPolicy instance
JBossXACMLPolicy(URL url, int type)
          Construct a JBossXACMLPolicy
 
Method Summary
<T> T
get(String key)
          Get an element from the map
 List<XACMLPolicy> getEnclosingPolicies()
          Return the enclosing policies for a PolicySet
 int getType()
          Return a type (PolicySet or Policy)
<T> void
set(String key, T obj)
          Set an object on the map
 void setEnclosingPolicies(List<XACMLPolicy> policies)
          A PolicySet can contain policies within.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossXACMLPolicy

public JBossXACMLPolicy(URL url,
                        int type)
                 throws Exception
Construct a JBossXACMLPolicy

Parameters:
url - url to the policy file
type - type (Policy or PolicySet)
Throws:
Exception
See Also:
XACMLConstants

JBossXACMLPolicy

public JBossXACMLPolicy(InputStream is,
                        int type)
                 throws Exception
Construct a JBossXACMLPolicy

Parameters:
is - Inputstream to the policy file
type - type (Policy or PolicySet)
Throws:
Exception
See Also:
XACMLConstants

JBossXACMLPolicy

public JBossXACMLPolicy(InputStream is,
                        int type,
                        JBossPolicyFinder theFinder)
                 throws Exception
Construct a JBossXACMLPolicy instance

Parameters:
is - Inputstream to the policy/policyset file
type - policy or policyset
theFinder - PolicySet processing needs this
Throws:
Exception
See Also:
XACMLConstants
Method Detail

getType

public int getType()
Description copied from interface: XACMLPolicy
Return a type (PolicySet or Policy)

Specified by:
getType in interface XACMLPolicy
Returns:
int value representing type
See Also:
XACMLPolicy.getType(), XACMLConstants

setEnclosingPolicies

public void setEnclosingPolicies(List<XACMLPolicy> policies)
Description copied from interface: XACMLPolicy
A PolicySet can contain policies within. Setter to set the policies inside a policyset

Specified by:
setEnclosingPolicies in interface XACMLPolicy
Parameters:
policies - a list of policies
See Also:
XACMLPolicy.setEnclosingPolicies(List)

getEnclosingPolicies

public List<XACMLPolicy> getEnclosingPolicies()
Description copied from interface: XACMLPolicy
Return the enclosing policies for a PolicySet

Specified by:
getEnclosingPolicies in interface XACMLPolicy
Returns:
a list of policies
See Also:
XACMLPolicy.getEnclosingPolicies()

get

public <T> T get(String key)
Description copied from interface: ContextMapOp
Get an element from the map

Specified by:
get in interface ContextMapOp
Type Parameters:
T - object from the map
Parameters:
key - Key
Returns:
object from the map
See Also:
ContextMapOp.get(String)

set

public <T> void set(String key,
                    T obj)
Description copied from interface: ContextMapOp
Set an object on the map

Specified by:
set in interface ContextMapOp
Parameters:
key - Key for the map
obj - Object to be placed
See Also:
ContextMapOp.set(String, Object)


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.