Interface ChannelManager
-
public interface ChannelManager
Management interface forChannel
s. Basic Channel operations are provided.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
persist(javax.jcr.Session session, String blueprintId, Channel channel)
Persists a channel.void
save(javax.jcr.Session session, String hostGroupName, Channel channel)
Save channel properties for the given host group.
-
-
-
Method Detail
-
persist
String persist(javax.jcr.Session session, String blueprintId, Channel channel) throws ChannelException
Persists a channel. Will create the mounts, sites and configuration when the channel is new.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.- Parameters:
session
- the session used to persist the changesblueprintId
- blueprint that contains prototypes for mount, site and hst configurationchannel
- a channel instance to be persisted- Returns:
- the channel ID of the created channel
- Throws:
ChannelException
- 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.
-
-
save
void save(javax.jcr.Session session, String hostGroupName, Channel channel) throws ChannelException
Save channel properties for the given host group. 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.- Parameters:
session
- the session used to persist the changeshostGroupName
-channel
-- Throws:
ChannelException
-