|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.security.membershippolicy.BaseUserGroupMembershipPolicy
com.liferay.portal.security.membershippolicy.DummyUserGroupMembershipPolicy
public class DummyUserGroupMembershipPolicy
| Constructor Summary | |
|---|---|
DummyUserGroupMembershipPolicy()
|
|
| Method Summary | |
|---|---|
void |
checkMembership(long[] userIds,
long[] addUserGroupIds,
long[] removeUserGroupIds)
Checks if the users can be added to and removed from the respective user groups. |
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 |
propagateMembership(long[] userIds,
long[] addUserGroupIds,
long[] removeUserGroupIds)
Performs membership policy related actions after the users are added to and removed from the respective user groups. |
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. |
void |
verifyPolicy(UserGroup userGroup,
UserGroup oldUserGroup,
Map<String,Serializable> oldExpandoAttributes)
Checks the integrity of the membership policy of the user group, with respect to the user group's new attribute values and expando attributes, and performs operations necessary for the compliance of the user group. |
| Methods inherited from class com.liferay.portal.security.membershippolicy.BaseUserGroupMembershipPolicy |
|---|
verifyPolicy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DummyUserGroupMembershipPolicy()
| Method Detail |
|---|
public void checkMembership(long[] userIds,
long[] addUserGroupIds,
long[] removeUserGroupIds)
UserGroupMembershipPolicyLiferay's core services call this method before adding the users to and removing the users from the respective user groups. If this method throws an exception, the service foregoes making the changes.
userIds - the primary keys of the users to be added and removed from
the user groupsaddUserGroupIds - the primary keys of the user groups to which the
users are to be added (optionally null)removeUserGroupIds - the primary keys of the user groups from which
the users are to be removed (optionally null)
public boolean isMembershipAllowed(long userId,
long userGroupId)
UserGroupMembershipPolicytrue if the user can be added to the user group.
Liferay's UI calls this method.
isMembershipAllowed in interface UserGroupMembershipPolicyisMembershipAllowed in class BaseUserGroupMembershipPolicyuserId - the primary key of the useruserGroupId - the primary key of the user group
true if the user can be added to the user group;
false otherwise
public boolean isMembershipRequired(long userId,
long userGroupId)
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 UserGroupMembershipPolicyisMembershipRequired in class BaseUserGroupMembershipPolicyuserId - the primary key of the useruserGroupId - the primary key of the user group
true if user group membership for the user is
mandatory; false otherwise
public void propagateMembership(long[] userIds,
long[] addUserGroupIds,
long[] removeUserGroupIds)
UserGroupMembershipPolicyThe actions must ensure the integrity of each user group's membership policy. For example, some actions for implementations to consider performing are:
userIds - the primary key of the users to be added or removedaddUserGroupIds - the primary keys of the user groups to which the
users were added (optionally null)removeUserGroupIds - the primary keys of the user groups from which
the users were removed (optionally null)public void verifyPolicy(UserGroup userGroup)
UserGroupMembershipPolicy
verifyPolicy in interface UserGroupMembershipPolicyverifyPolicy in class BaseUserGroupMembershipPolicyuserGroup - the user group to verify
public void verifyPolicy(UserGroup userGroup,
UserGroup oldUserGroup,
Map<String,Serializable> oldExpandoAttributes)
UserGroupMembershipPolicyThe actions must ensure the integrity of the user group's membership policy based on what has changed in the user group's attribute values and expando attributes.
For example, if the membership policy is that user groups with the expando attribute A should only allow administrators, then this method could enforce that policy using the following logic:
assetTagLocalService.getTags(Group.class.getName(),
group.getGroupId());.
userGroup - the added or updated user group to verifyoldUserGroup - the old user groupoldExpandoAttributes - the old expando attributes
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||