Interface ChannelManager


public interface ChannelManager
Management interface for Channels. Basic Channel operations are provided.
  • Method Summary

    Modifier and Type
    Method
    Description
    persist(Session session, String blueprintId, Channel channel)
    Persists a channel.
    void
    save(Session session, String hostGroupName, Channel channel)
    Save channel properties for the given host group.
  • Method Details

    • persist

      String persist(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 changes
      blueprintId - blueprint that contains prototypes for mount, site and hst configuration
      channel - 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(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 changes
    hostGroupName -
    channel -
    Throws:
    ChannelException