|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.netuix.application.communities.capabilities.CapabilityRoleBootstrapper
public class CapabilityRoleBootstrapper
Utility class that can be used to create role policies based on the set of defined Community capabilities as configured in communities-config.xml. This class can be used at app deployment or configuration time to create default role policies that allow communities applications to perform isUserInRole
calls that are based on expression based roles that use the current user's CommunityContext
to reference capabilities that cause the role evaluation to map to whether or not that user has the specified capability in the current community. <p/>For more information see the discussion of membership capabilities or the overview of community functionality.
Field Summary | |
---|---|
static String |
MEMBERSHIP_ROLE_EXPRESSION Expression used to create the membership policy. |
static String |
MEMBERSHIP_ROLE_NAME The role name for the membership policy. |
static String |
ROLE_EXPRESSION_PREFIX Expression prefix for the expressions used to create capability policies. |
static String |
ROLE_EXPRESSION_SUFFIX Expression suffix for the expressions used to create capability policies. |
static String |
ROLE_NAME_PREFIX The role name prefix for use in creating all of the capability policies. |
Constructor Summary | |
---|---|
CapabilityRoleBootstrapper(String entAppName, P13nContextHandler p13nContextHandler) Creates a CapabilityRoleBootstrapper that is targetted at an enterprise application and that uses the default role policy expression prefix and suffix and role name prefix for create and remove role policy operations. |
|
CapabilityRoleBootstrapper(String entAppName, String roleNamePrefix, String roleExpressionPrefix, String roleExpressionSuffix, String membershipRoleName, String membershipRoleExpression, P13nContextHandler p13nContextHandler) Creates a CapabilityRoleBootstrapper that is targetted at an enterprise application and that uses the specified role expression prefix and suffix and the specified role name prefix for creating and removing role policies. |
Method Summary | |
---|---|
void |
bootstrapApplicationRoles() Creates role policies for each of the defined MembershipCapabilites as configured in communities-config.xml. |
void |
bootstrapRoles(String webappName) Creates role policies for each of the defined MembershipCapabilites as configured in communities-config.xml. |
void |
removeBootstrappedRoles() Removes app scoped role policies for each of the defined MembershipCapabilites as configured in communities-config.xml. |
void |
removeBootstrappedRoles(String webappName) Removes role policies for each of the defined MembershipCapabilites as configured in communities-config.xml. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ROLE_EXPRESSION_PREFIX
public static final String ROLE_EXPRESSION_SUFFIX
public static final String MEMBERSHIP_ROLE_EXPRESSION
public static final String MEMBERSHIP_ROLE_NAME
public static final String ROLE_NAME_PREFIX
MembershipCapability
canonical name to form the complete policy name. This can be used as is or overridden using the alternate constructor.
Constructor Detail |
---|
public CapabilityRoleBootstrapper(String entAppName, P13nContextHandler p13nContextHandler)
CapabilityRoleBootstrapper
that is targetted at an enterprise application and that uses the default role policy expression prefix and suffix and role name prefix for create and remove role policy operations. Use this form of the constructor if there is no need to customize either the role policy expressions or the role name prefix. Resulting role policy names for this default will be like this for capabilities creator and owner: communityCapabilityRole_creator communityCapabilityRole_owner and like this for the membership role: communityMembershipRole
entAppName
- the targetted enterprise application namep13nContextHandler
- the P13nContextHandler of the calling user, needed if the admin role applicable to the caller is expression based, otherwise can be nullpublic CapabilityRoleBootstrapper(String entAppName, String roleNamePrefix, String roleExpressionPrefix, String roleExpressionSuffix, String membershipRoleName, String membershipRoleExpression, P13nContextHandler p13nContextHandler)
CapabilityRoleBootstrapper
that is targetted at an enterprise application and that uses the specified role expression prefix and suffix and the specified role name prefix for creating and removing role policies. Use this form of the constructor if either the role expressions or the role names need to be customized from the default. The resulting role policy expressions will take the form of roleExpressionPrefix + capability canonical name + roleExpressionSuffix. The resulting role names will take the form of roleNamePrefix + capability canonical name
entAppName
- the enterprise app to bootstrap role policies toroleNamePrefix
- the String prefix for all created capability role policies. If null set to default.roleExpressionPrefix
- the expression prefix for all created capability role policies. If null set to default.roleExpressionSuffix
- the expression suffix for all created cabability role policies. If null set to default.membershipRoleName
- the role policy name for the created membership role. If null set to default.membershipRoleExpression
- the expression for the created membership role. If null set to default.p13nContextHandler
- the P13nContextHandler of the calling user, needed if the admin role applicable to the caller is expression based, otherwise can be nullMethod Detail |
---|
public void bootstrapRoles(String webappName) throws com.bea.p13n.entitlements.common.PolicyCreateException, com.bea.p13n.entitlements.common.PolicyNotFoundException, com.bea.p13n.entitlements.common.PolicyException
MembershipCapabilites
as configured in communities-config.xml. The caller is responsible for ensuring the appropriate security environment as required for the successful insertion of new role policies, typically by calling this method after being logged in as an administrator or other principal that is authorized to manage role policies. Role policies created with this method will be webapp scoped.webappName
- webapp to create these role policies for. If null, role policies are ent app scopedcom.bea.p13n.entitlements.common.PolicyCreateException
com.bea.p13n.entitlements.common.PolicyNotFoundException
com.bea.p13n.entitlements.common.PolicyException
public void bootstrapApplicationRoles() throws com.bea.p13n.entitlements.common.PolicyCreateException, com.bea.p13n.entitlements.common.PolicyNotFoundException, com.bea.p13n.entitlements.common.PolicyException
MembershipCapabilites
as configured in communities-config.xml. The caller is responsible for ensuring the appropriate security environment as required for the successful insertion of new role policies, typically by calling this method after being logged in as an administrator or other principal that is authorized to manage role policies. Role policies created with this method will be application scoped.com.bea.p13n.entitlements.common.PolicyCreateException
com.bea.p13n.entitlements.common.PolicyNotFoundException
com.bea.p13n.entitlements.common.PolicyException
public void removeBootstrappedRoles(String webappName) throws com.bea.p13n.entitlements.common.PolicyRemoveException
MembershipCapabilites
as configured in communities-config.xml. The caller is responsible for ensuring the appropriate security environment as required for the successful removal of these role policies, typically by calling this method after being logged in as an administrator or other principal that is authorized to manage role policies.webappName
- webapp to create these role policies for. If null, role policies are ent app scopedcom.bea.p13n.entitlements.common.PolicyRemoveException
public void removeBootstrappedRoles() throws com.bea.p13n.entitlements.common.PolicyRemoveException
MembershipCapabilites
as configured in communities-config.xml. The caller is responsible for ensuring the appropriate security environment as required for the successful removal of these role policies, typically by calling this method after being logged in as an administrator or other principal that is authorized to manage role policies. Use this remove method if original role policies were created with bootstrapApplicationRolescom.bea.p13n.entitlements.common.PolicyRemoveException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.