public abstract class BaseUserGroupMembershipPolicy extends Object implements UserGroupMembershipPolicy
| Constructor and Description |
|---|
BaseUserGroupMembershipPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isMembershipAllowed(long userId,
long userGroupId)
Returns
true if the user can be added to the user group. |
boolean |
isMembershipRequired(long userId,
long userGroupId)
Returns
true if user group membership for the user is
mandatory. |
void |
verifyPolicy()
Checks the integrity of the membership policy of each of the portal's
user groups and performs operations necessary for the compliance of each
user group.
|
void |
verifyPolicy(UserGroup userGroup)
Checks the integrity of the membership policy of the user group and
performs operations necessary for the user group's compliance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckMembership, propagateMembership, verifyPolicypublic boolean isMembershipAllowed(long userId,
long userGroupId)
throws PortalException
UserGroupMembershipPolicytrue if the user can be added to the user group.
Liferay's UI calls this method.isMembershipAllowed in interface UserGroupMembershipPolicyuserId - the primary key of the useruserGroupId - the primary key of the user grouptrue if the user can be added to the user group;
false otherwisePortalExceptionpublic boolean isMembershipRequired(long userId,
long userGroupId)
throws PortalException
UserGroupMembershipPolicytrue if user group membership for the user is
mandatory. Liferay's UI, for example, calls this method in deciding
whether the checkbox to select the user group will be enable.isMembershipRequired in interface UserGroupMembershipPolicyuserId - the primary key of the useruserGroupId - the primary key of the user grouptrue if user group membership for the user is
mandatory; false otherwisePortalExceptionpublic void verifyPolicy()
throws PortalException
UserGroupMembershipPolicymembership.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 UserGroupMembershipPolicyPortalExceptionpublic void verifyPolicy(UserGroup userGroup) throws PortalException
UserGroupMembershipPolicyverifyPolicy in interface UserGroupMembershipPolicyuserGroup - the user group to verifyPortalException