|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.entitlements.management.SecurityPolicyManager
public class SecurityPolicyManager
Provides access to methods for performing security policy management including create, read, modify, and delete actions.
Constructor Summary | |
---|---|
SecurityPolicyManager()
|
Method Summary | |
---|---|
static void |
createSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem)
Creates a new security policy. |
static SecurityPolicyItem |
getSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem)
Retrieves an existing security policy. |
static List<RolePolicyItem> |
getSecurityPolicyRoleItems(SecurityPolicyItem aSecurityPolicyItem)
Returns a list of role policy items that a given security policy is predicated upon. |
static Object[][] |
listPoliciesForResource(P13nResource aSecurityResource)
Finds all available security policies given a policy item (resourceId). |
static Object[][] |
listPoliciesForResource(SecurityPolicyItem aSecurityPolicyItem)
Finds all available security policies given a policy item (resourceId). |
static boolean |
policyExists(SecurityPolicyItem aSecurityPolicyItem)
Checks if a security policy exists for a given resource |
static void |
removeAllSecurityPolicies(String anEntAppName,
String aWebAppName,
P13nContextHandler aContextHandler)
Removes all existing security policies and role policies for a given web application. |
static void |
removeAllSecurityPolicies(String anEntAppName,
String aWebAppName,
String aRoleName,
int aPolicyUser,
P13nContextHandler aContextHandler)
Removes all existing security policies and the role policy for a given entapp, web application. |
static void |
removePoliciesOnResourceSubString(String aResourceIdSubString,
String aWebAppName,
boolean onResourceIdRoot,
int thePolicyUser,
P13nContextHandler aP13nContextHandler)
Removes a list of security policies in which the resource id begins with the input resource string. |
static void |
removeSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem)
Removes an existing security policy. |
static void |
setSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem)
Updates an existing security policy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityPolicyManager()
Method Detail |
---|
public static void createSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem) throws com.bea.p13n.entitlements.common.PolicyExistsException, com.bea.p13n.entitlements.common.PolicyCreateException
aSecurityPolicyItem
- The object containing the required and optional
security policy attributes
InvalidArgsException
com.bea.p13n.entitlements.common.PolicyExistsException
com.bea.p13n.entitlements.common.PolicyCreateException
public static SecurityPolicyItem getSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem)
The returned SecurityPolicyItem may be used to hold local updates to user list, group list, and role list changes prior to persisting the changes using the setSecurityPolicy() method.
aSecurityPolicyItem
- The object containing the required and optional
security policy attributes
InvalidArgsException
public static void setSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem) throws com.bea.p13n.entitlements.common.PolicyNotFoundException, com.bea.p13n.entitlements.common.PolicyCreateException
Note that if the aSecurityPolicyItem instance was retrieved using getSecurityPolicy(), all mandatory fields will already be initialized. The only fields that are updateable in the persisted security policy are the aUserList, aGroupList, and aRoleList.
aSecurityPolicyItem
- The object containing the required and optional
security policy attributes
InvalidArgsException
com.bea.p13n.entitlements.common.PolicyNotFoundException
com.bea.p13n.entitlements.common.PolicyCreateException
public static void removeSecurityPolicy(SecurityPolicyItem aSecurityPolicyItem) throws com.bea.p13n.entitlements.common.PolicyNotFoundException, com.bea.p13n.entitlements.common.PolicyRemoveException
aSecurityPolicyItem
- The object containing the required
security policy attributes
InvalidArgsException
com.bea.p13n.entitlements.common.PolicyNotFoundException
com.bea.p13n.entitlements.common.PolicyRemoveException
public static void removeAllSecurityPolicies(String anEntAppName, String aWebAppName, P13nContextHandler aContextHandler) throws com.bea.p13n.entitlements.common.EntitlementsException
anEntAppName
- Enterprise Application nameaWebAppName
- Webapp name. Unused for Global role inheritance
com.bea.p13n.entitlements.common.EntitlementsException
public static void removeAllSecurityPolicies(String anEntAppName, String aWebAppName, String aRoleName, int aPolicyUser, P13nContextHandler aContextHandler) throws com.bea.p13n.entitlements.common.EntitlementsException
anEntAppName
- Enterprise Application nameaWebAppName
- Webapp name. Unused for Global role inheritanceaRoleName
- If non-null, only removes policies predicated on the given roleaPolicyUser
- entitlementConstants.P13N_ADMIN_POLICY/P13N_VISITOR_POLICYaContextHandler
- a handler containing caller's context
com.bea.p13n.entitlements.common.EntitlementsException
public static boolean policyExists(SecurityPolicyItem aSecurityPolicyItem)
aSecurityPolicyItem
- The object containing the required
public static Object[][] listPoliciesForResource(SecurityPolicyItem aSecurityPolicyItem)
aSecurityPolicyItem
- The object containing the required and optional
security policy attributes
public static Object[][] listPoliciesForResource(P13nResource aSecurityResource)
aSecurityResource
- The object containing the required and optional
security policy attributes
public static void removePoliciesOnResourceSubString(String aResourceIdSubString, String aWebAppName, boolean onResourceIdRoot, int thePolicyUser, P13nContextHandler aP13nContextHandler) throws com.bea.p13n.entitlements.common.EntitlementsException
aResourceIdSubString
- The root substring to look for. This string
must be delimited according to EntitlementConstants.RESOURCE_ID_DELIMITER
onResourceIdRoot
- If true, a match must be on beginning of resource id onlythePolicyUser
- entitlementConstants.P13N_ADMIN_POLICY/P13N_VISITOR_POLICYaP13nContextHandler
- The context describing the current user
com.bea.p13n.entitlements.common.EntitlementsException
public static List<RolePolicyItem> getSecurityPolicyRoleItems(SecurityPolicyItem aSecurityPolicyItem) throws com.bea.p13n.entitlements.common.PolicyException
aSecurityPolicyItem
- an existing security policy with role predicates
com.bea.p13n.entitlements.common.PolicyException
|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |