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,
org.onehippo.cms7.services.hst.Channel channel)
Persists a channel.
|
void |
removeChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
Removes channel manager listeners.
|
void |
save(org.onehippo.cms7.services.hst.Channel channel)
Deprecated.
This method is deprecated by {
save(String, Channel) } since version 4.0.0.
Save channel properties. If the URL path of the new channel is not empty, all path-steps except the last one should already map to an existing mount. When invoking this method, an HstSubject context must be provided with the credentials necessary to persist the channel. |
void |
save(String hostGroupName,
org.onehippo.cms7.services.hst.Channel channel)
Save channel properties for the given host group.
|
String persist(String blueprintId, org.onehippo.cms7.services.hst.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.
@Deprecated void save(org.onehippo.cms7.services.hst.Channel channel) throws ChannelException
save(String, Channel)
} since version 4.0.0.
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.void save(String hostGroupName, org.onehippo.cms7.services.hst.Channel channel) throws ChannelException
hostGroupName
- channel
- ChannelException
boolean canUserModifyChannels()
void addChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
channelManagerEventListeners
- void removeChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
channelManagerEventListeners
- Copyright © 2008–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.