Copyright© 2008-2018 SiteVision AB, all rights reserved.
@Requireable(value="UserUtil") public interface UserUtil
This interface primarily handles nodes with primary node type sv:user
, but some methods can also handle
other user types (i.e. sv:simpleUser
and/or sv:systemUser
).
Tip! Some user-related functionality in other interfaces:
PortletContextUtil.getCurrentUser()
if you should get current user.
UserIdentityUtil.getUserIdentity(javax.jcr.Node)
if you should get
the sv:userIdentity
of a user.
DirectoryUtil
if you should lookup/search directory-bound users.
PermissionUtil
if you should check permission(s) for a sv:user
.
An instance of the SiteVision class implementing this interface can be obtained via
UserFactory.getUserUtil()
.
See UserFactory
for how to obtain an instance of the UserFactory
interface.
SystemUserUtil
,
SimpleUserUtil
Modifier and Type | Method and Description |
---|---|
boolean |
isMemberOfGroup(Node aGroup)
Checks if current user is member of a group.
|
boolean |
isMemberOfGroup(Node aUser,
Node aGroup)
Checks if a specific user is member of a group.
|
boolean isMemberOfGroup(Node aGroup)
This is a convenience for isMemberOfGroup(javax.jcr.Node, javax.jcr.Node)
using current user
(as of PortletContextUtil.getCurrentUser()
).
aGroup
- a group node (sv:userGroup or sv:virtualGroup)true
if current user is member of aGroup
, false
otherwiseboolean isMemberOfGroup(Node aUser, Node aGroup)
Tip! To check if a sv:userIdentity
is member of a sv:collaborationGroup
,
you would typically use UserIdentityWrapper.isMemberOf(javax.jcr.Node)
or
CollaborationGroupWrapper.isMember(javax.jcr.Node)
.
aUser
- a user node (sv:user, sv:simpleUser or sv:systemUser)aGroup
- a group node (sv:userGroup or sv:virtualGroup)true
if aUser
is member of aGroup
, false
otherwiseSiteVision - Portal and Content Management Made Easy
SiteVision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2018 SiteVision AB, all rights reserved.