|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.policy.PolicyManager
A class encapsulating operations related to policies. This includes a catalog of available PolicyImplementation objects.
A singleton PolicyManager will typically be created by the singleton Server object which manages the pool of resources used by code in the server. The Provisioner object will use the policy manager to load the PolicyImplemenation objects. The LocalSession object may use the PolicyManager to return a list of available policy "types" to applications. // *
// * UPDATE: Now that we're using a .jar file, we've got a problem using // * the file system hack to locate policy plugins. There doesn't // * appear to be a way to discover package contents through reflection. // * For now, we'll maintain a static array containing the class names // * of the "builtin" policies, we will continue to look on the file system // * for user defined policies.
Field Summary | |
static java.lang.String |
CLASS
|
static java.lang.String |
code_id
|
static java.lang.String |
DEFAULT_POLICY_ID
The repository ID of a Policy object that serves as the default policy for a user. |
protected static Trace |
trace
|
Constructor Summary | |
PolicyManager(LighthouseContext ctx)
|
Method Summary | |
Policy |
getEffectivePolicy(WSUser user,
java.lang.String policyType)
Find the effective policy of a given type for a user. |
Policy |
getEffectivePolicy(WSUser user,
java.lang.String policyName,
java.lang.String policyType)
|
Policy |
getEffectivePolicy(WSUser user,
java.lang.String policyName,
java.lang.String orgName,
java.util.List roleNames,
java.lang.String policyType)
Find the named effective policy for this user. |
PolicyImplementation |
getImplementation(Policy p)
Locate an implementation object for the given policy definition object. |
Policy[] |
getPolicyTypes()
Return an array of prototype Policy instances for all registered policy types. |
java.lang.Object |
getPolicyValue(Policy policy,
WSUser user,
java.lang.String requestedValue)
Given a user map and a policy, get a requested value |
java.lang.Object |
getPolicyValue(Policy policy,
WSUser user,
java.lang.String loginInterface,
java.lang.String requestedValue)
Given a user map and a policy, get a requested value |
java.lang.Object |
getPolicyValue(java.lang.String policyName,
WSUser user,
java.lang.String requestedValue)
|
java.lang.Object |
getPolicyValue(java.lang.String policyName,
WSUser user,
java.lang.String loginInterface,
java.lang.String requestedValue)
|
java.lang.Object |
getPolicyValue(WSUser user,
java.util.Map params)
Find the named effective policy for this user and get the specified policy value. |
java.lang.Object |
getPolicyValue(WSUser user,
java.lang.String policyType,
java.lang.String requestedValue)
Find the named effective policy for this user and get the specified policy value. |
java.lang.Object |
getPolicyValue(WSUser user,
java.lang.String policyType,
java.lang.String loginInterface,
java.lang.String requestedValue)
Find the named effective policy for this user and get the specified policy value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String CLASS
protected static final Trace trace
public static final java.lang.String DEFAULT_POLICY_ID
Constructor Detail |
public PolicyManager(LighthouseContext ctx) throws WavesetException
Method Detail |
public PolicyImplementation getImplementation(Policy p) throws WavesetException
Note that we will cache and return the same implementation object on subsequent calls. If the PolicyImplementation needs to maintain thread specific state during its operation, then we would have to return a clone here. This is not currently an issue.
WavesetException
public Policy[] getPolicyTypes() throws WavesetException
WavesetException
public Policy getEffectivePolicy(WSUser user, java.lang.String policyType) throws WavesetException
user
- - the user to get the policy forpolicyType
- - String policy type. One of ...
WavesetException
public Policy getEffectivePolicy(WSUser user, java.lang.String policyName, java.lang.String orgName, java.util.List roleNames, java.lang.String policyType) throws WavesetException
user
- - the user to get the policy fororgName
- - an organization, if user is nullroleNames
- - a List of Strings, the names of the assigned roles.policyName
- - directly assigned policy (from the view)policyType
- - String policy type. One of ...
WavesetException
public Policy getEffectivePolicy(WSUser user, java.lang.String policyName, java.lang.String policyType) throws WavesetException
WavesetException
public java.lang.Object getPolicyValue(WSUser user, java.util.Map params) throws WavesetException
user
- - the user to get the policy forparams
- - set of params including:
loginInterface - String Lighthouse login interface
policyType - String policy type. One of ...
requestedValue - String policy value
WavesetException
public java.lang.Object getPolicyValue(WSUser user, java.lang.String policyType, java.lang.String requestedValue) throws WavesetException
user
- - the user to get the policy forpolicyType
- - String policy type. One of ...requestedValue
- - String policy value
WavesetException
public java.lang.Object getPolicyValue(WSUser user, java.lang.String policyType, java.lang.String loginInterface, java.lang.String requestedValue) throws WavesetException
user
- - the user to get the policy forpolicyType
- - String policy type. One of ...requestedValue
- - String policy value
WavesetException
public java.lang.Object getPolicyValue(Policy policy, WSUser user, java.lang.String requestedValue) throws WavesetException
policy
- - policy to checkrequestedValue
- - String policy value
WavesetException
public java.lang.Object getPolicyValue(Policy policy, WSUser user, java.lang.String loginInterface, java.lang.String requestedValue) throws WavesetException
policy
- - policy to checkloginInterface
- - login interfacerequestedValue
- - String policy value
WavesetException
public java.lang.Object getPolicyValue(java.lang.String policyName, WSUser user, java.lang.String requestedValue) throws WavesetException
WavesetException
public java.lang.Object getPolicyValue(java.lang.String policyName, WSUser user, java.lang.String loginInterface, java.lang.String requestedValue) throws WavesetException
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |