|
Liferay 6.2-ce-ga4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.security.membershippolicy.BaseRoleMembershipPolicy
public abstract class BaseRoleMembershipPolicy
| Constructor Summary | |
|---|---|
BaseRoleMembershipPolicy()
|
|
| Method Summary | |
|---|---|
boolean |
isRoleAllowed(long userId,
long roleId)
Returns true if the role can be added to the user. |
boolean |
isRoleRequired(long userId,
long roleId)
Returns true if the role is mandatory for the user. |
void |
verifyPolicy()
Checks the integrity of the membership policy of each of the portal's roles and performs operations necessary for the compliance of each role. |
void |
verifyPolicy(Role role)
Checks the integrity of the membership policy of the role and performs operations necessary for the compliance of the role. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.security.membershippolicy.RoleMembershipPolicy |
|---|
checkRoles, propagateRoles, verifyPolicy |
| Constructor Detail |
|---|
public BaseRoleMembershipPolicy()
| Method Detail |
|---|
public boolean isRoleAllowed(long userId,
long roleId)
throws PortalException,
SystemException
RoleMembershipPolicytrue if the role can be added to the user. Liferay's
UI calls this method.
isRoleAllowed in interface RoleMembershipPolicyuserId - the primary key of the userroleId - the primary key of the role
true if the role can be added to the user;
false otherwise
PortalException - if a portal exception occurred
SystemException - if a system exception occurred
public boolean isRoleRequired(long userId,
long roleId)
throws PortalException,
SystemException
RoleMembershipPolicytrue if the role is mandatory for the user.
Liferay's UI, for example, calls this method in deciding whether the
checkbox to select a role will be enable.
isRoleRequired in interface RoleMembershipPolicyuserId - the primary key of the userroleId - the primary key of the role
true if the role is mandatory for the user;
false otherwise
PortalException - if a portal exception occurred
SystemException - if a system exception occurred
public void verifyPolicy()
throws PortalException,
SystemException
RoleMembershipPolicymembership.policy.auto.verify portal property is
true this method is triggered when starting Liferay and
every time a membership policy hook is deployed.
verifyPolicy in interface RoleMembershipPolicyPortalException - if a portal exception occurred
SystemException - if a system exception occurred
public void verifyPolicy(Role role)
throws PortalException,
SystemException
RoleMembershipPolicy
verifyPolicy in interface RoleMembershipPolicyrole - the role to verify
PortalException - if a portal exception occurred
SystemException - if a system exception occurred
|
Liferay 6.2-ce-ga4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||