Copyright© 2008-2024 Sitevision AB, all rights reserved.
@Requireable(value="ChannelUtil") public interface ChannelUtil
An instance of the Sitevision class implementing this interface can be obtained via
MessagesFactory.getChannelUtil()
.
See MessagesFactory
for how to obtain an instance of the MessagesFactory
interface.
Modifier and Type | Method and Description |
---|---|
Node |
createChannel(String aName,
String aDescription,
boolean aPrivate)
Creates a channel.
|
Node |
findChannelByName(String aChannelName)
Searches for a channel by name.
|
Node createChannel(String aName, String aDescription, boolean aPrivate) throws RepositoryException
A ConstraintViolationException
will be thrown if social collaboration is not enabled
Or if current user is attempting to create a private channel without
PermissionUtil.Permission.CREATE_PRIVATE_CHANNELS
permission.
A IllegalArgumentException
will be thrown if aName is null, blank or exceeds 80 characters.
A ItemExistsException
will be thrown if a channel with the same name already exists.
A RepositoryException
will be thrown If an error occurs while fetching channels
aName
- the name of the channel (Must be unique and must not exceed 80 characters)aDescription
- the description of the channelaPrivate
- whether the channel should be private or notchannel
, or null
.RepositoryException
- if an error occurs.Node findChannelByName(String aChannelName) throws RepositoryException
Permission note Private channels can only be found by members.
A ConstraintViolationException
will be thrown if social collaboration is not enabled.
A RepositoryException
will be thrown if an error occurs while fetching channels.
aChannelName
- the name of the channel to search for.RepositoryException
- if an error occurs.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-2024 Sitevision AB, all rights reserved.