public interface ChannelManager
Channel
s. Basic Channel operations are provided.Modifier and Type | Method and Description |
---|---|
void |
addChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
Adds channel manager listeners.
|
boolean |
canUserModifyChannels()
Can the current user (set in HstSubject) create or modify channels.
|
String |
persist(String blueprintId,
Channel channel)
Persists a channel.
|
void |
removeChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
Removes channel manager listeners.
|
void |
save(Channel channel)
Save channel properties.
|
String persist(String blueprintId, Channel channel) throws ChannelException
When invoking this method, an HstSubject context must be provided with the credentials necessary to persist the channel.
The persisted channel can be retrieved again via VirtualHosts.getChannelById(String, String)
with the returned channel ID.
blueprintId
- blueprint that contains prototypes for mount, site and hst configurationchannel
- a channel instance to be persistedChannelException
- with type @{link ChannelException.Type#MOUNT_NOT_FOUND} when all but the last path-step
in the URL path of a new channel do not map to existing mounts. The exception has one parameter: the absolute
JCR path of the missing mount.ChannelException
- with type @{link ChannelException.Type#MOUNT_EXISTS} when the mount of a new channel
already exists. The exception has one parameter: the absolute JCR path of the existing mount.
void save(Channel channel) throws ChannelException
When invoking this method, an HstSubject context must be provided with the credentials necessary to persist the channel.
channel
- the channel to persistChannelException
- with type @{link ChannelException.Type#MOUNT_NOT_FOUND} when all but the last path-step
in the URL path of a new channel do not map to existing mounts, or the URL path of an existing channel does not
map to an existing mount. The exception has one parameter: the absolute JCR path of the missing mount.ChannelException
- with type ChannelException.Type.CHANNEL_LOCKED
, ChannelException.Type.CHANNEL_OUT_OF_SYNC
or ChannelException.Type.UNKNOWN
when the channel could not be persisted.boolean canUserModifyChannels()
void addChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
channelManagerEventListeners
- void removeChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
channelManagerEventListeners
- Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.