Class BaseUserGroupMembershipPolicy
Object
com.liferay.portal.kernel.security.membershippolicy.BaseUserGroupMembershipPolicy
- All Implemented Interfaces:
UserGroupMembershipPolicy
- Direct Known Subclasses:
DummyUserGroupMembershipPolicy
public abstract class BaseUserGroupMembershipPolicy
extends Object
implements UserGroupMembershipPolicy
- Author:
- Roberto Díaz, Sergio González
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisMembershipAllowed(long userId, long userGroupId) Returnstrueif the user can be added to the user group.booleanisMembershipRequired(long userId, long userGroupId) Returnstrueif user group membership for the user is mandatory.voidChecks 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.voidverifyPolicy(UserGroup userGroup) Checks the integrity of the membership policy of the user group and performs operations necessary for the user group's compliance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.portal.kernel.security.membershippolicy.UserGroupMembershipPolicy
checkMembership, propagateMembership, verifyPolicy
-
Constructor Details
-
BaseUserGroupMembershipPolicy
public BaseUserGroupMembershipPolicy()
-
-
Method Details
-
isMembershipAllowed
Description copied from interface:UserGroupMembershipPolicyReturnstrueif the user can be added to the user group. Liferay's UI calls this method.- Specified by:
isMembershipAllowedin interfaceUserGroupMembershipPolicy- Parameters:
userId- the primary key of the useruserGroupId- the primary key of the user group- Returns:
trueif the user can be added to the user group;falseotherwise- Throws:
PortalException
-
isMembershipRequired
Description copied from interface:UserGroupMembershipPolicyReturnstrueif 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.- Specified by:
isMembershipRequiredin interfaceUserGroupMembershipPolicy- Parameters:
userId- the primary key of the useruserGroupId- the primary key of the user group- Returns:
trueif user group membership for the user is mandatory;falseotherwise- Throws:
PortalException
-
verifyPolicy
Description copied from interface:UserGroupMembershipPolicyChecks 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. This method can be triggered manually from the Control Panel. If themembership.policy.auto.verifyportal property istruethis method is triggered when starting Liferay and every time a membership policy hook is deployed.- Specified by:
verifyPolicyin interfaceUserGroupMembershipPolicy- Throws:
PortalException
-
verifyPolicy
Description copied from interface:UserGroupMembershipPolicyChecks the integrity of the membership policy of the user group and performs operations necessary for the user group's compliance.- Specified by:
verifyPolicyin interfaceUserGroupMembershipPolicy- Parameters:
userGroup- the user group to verify- Throws:
PortalException
-