Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="CollaborationGroupUtil") public interface CollaborationGroupUtil
Note! This interface is used to create collaboration groups. You would typically use
CollaborationGroupWrapper
to update an existing
collaboration group.
An instance of the Sitevision class implementing this interface can be obtained via CollaborationFactory.getCollaborationGroupUtil()
.
See CollaborationFactory
for how to obtain an instance of the CollaborationFactory
interface.
Modifier and Type | Method and Description |
---|---|
Node |
createCollaborationGroup(Node aGroupTemplate,
Node aGroupFolder,
String aGroupName)
Creates an open collaboration group.
|
Node |
createCollaborationGroup(Node aGroupTemplate,
Node aGroupFolder,
String aGroupName,
CollaborationGroupType aGroupType)
Creates a collaboration group.
|
boolean |
removeCollaborationGroup(Node aCollaborationGroup)
Removes a collaboration group.
|
Node createCollaborationGroup(Node aGroupTemplate, Node aGroupFolder, String aGroupName) throws ConstraintViolationException, RepositoryException
This is a legacy convenience method that delegates to createCollaborationGroup(Node, Node, String, CollaborationGroupType)
using CollaborationGroupType.OPEN
as group type.
aGroupTemplate
- the collaboration group template (sv:collaborationGroupTemplate) to use when creating the collaboration
group page of the collaboration groupaGroupFolder
- the collaboration group folder (sv:collaborationGroupFolder) where the collaboration group page of the
collaboration group should resideaGroupName
- the name of the collaboration groupNullPointerException
- if aGroupTemplate
, aGroupFolder
or aGroupName
is null
ConstraintViolationException
- if aGroupTemplate
or aGroupFolder
is of invalid type,
if aGroupName
is whitespace only,
if aGroupFolder
already contains a collaboration group named aGroupName
(case ignored)
or if current user is not authorized to create the collaboration groupRepositoryException
- if something else goes wrongcreateCollaborationGroup(Node, Node, String, CollaborationGroupType)
Node createCollaborationGroup(Node aGroupTemplate, Node aGroupFolder, String aGroupName, CollaborationGroupType aGroupType) throws RepositoryException
Permission note! Current user must have
PermissionUtil.Permission.READ
on aGroupTemplate
and PermissionUtil.Permission.CREATE_COLLABORATION_GROUP
on aGroupFolder
.
In order to create a CollaborationGroupType.CLOSED
collaboration group, current user must also have
PermissionUtil.Permission.CREATE_CLOSED_COLLABORATION_GROUP
on aGroupFolder
.
User note! Current user must have a user identity as it will be the administrator of the created
group. Anonymous users doesn't have a user identity, nor the Indexer, Validator or the Extractor.
In other words: PortletContextUtil.getCurrentUserIdentity()
must be non-null
.
Tip! Use CollaborationGroupTemplateUtil
to get a group template,
use CollaborationGroupFolderUtil
to get the default group folder (and perhaps check if the collaboration folder already contains
a collaboration group with specified name). Use CollaborationGroupWrapper
to update the group that is created.
aGroupTemplate
- the collaboration group template (sv:collaborationGroupTemplate) to use when creating the collaboration group page of
the collaboration groupaGroupFolder
- the collaboration group folder (sv:collaborationGroupFolder) where the collaboration group page of the collaboration
group should resideaGroupName
- the name of the collaboration groupaGroupType
- the group type, note that CollaborationGroupType.CLOSED
needs additional permissionNullPointerException
- if aGroupTemplate
, aGroupFolder
, aGroupName
or aGroupType
is null
ConstraintViolationException
- if aGroupTemplate
or aGroupFolder
is of invalid type,
if aGroupName
is whitespace only,
if aGroupFolder
already contains a collaboration group named aGroupName
(case ignored)
or if current user is not authorized to create the collaboration group (see permission note above)RepositoryException
- if something else goes wrongboolean removeCollaborationGroup(Node aCollaborationGroup)
Note! When a collaboration group (sv:collaborationGroup
) is removed,
its collaboration group page (sv:collaborationGroupPage
) is moved to the trashcan.
Permission note! To remove a collaboration group current user must have
PermissionUtil.Permission.MANAGE_COLLABORATION_GROUP
on the collaboration group page.
aCollaborationGroup
- a collaboration group to removetrue
if aCollaborationGroup
was removed, i.e. collaboration group page was moved to trashcan,
false
otherwise.Sitevision - 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-2022 Sitevision AB, all rights reserved.