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.
|
Blueprint |
getBlueprint(String id)
Retrieve a blue print from it's ID.
|
List<Blueprint> |
getBlueprints()
The list of available blueprints
|
Channel |
getChannelById(String id)
Get a
Channel given its id |
Channel |
getChannelByJcrPath(String channelPath)
Returns the channel configured at the given JCR path.
|
<T extends ChannelInfo> |
getChannelInfo(Channel channel)
The channel info for this channel.
|
Class<? extends ChannelInfo> |
getChannelInfoClass(Channel channel)
The channel info class for this channel.
|
Class<? extends ChannelInfo> |
getChannelInfoClass(String id)
The channel info class for this channel identified by id.
|
Map<String,Channel> |
getChannels()
List all managed channels, identified by their channel IDs
|
List<HstPropertyDefinition> |
getPropertyDefinitions(Channel channel)
|
List<HstPropertyDefinition> |
getPropertyDefinitions(String channelId)
|
ResourceBundle |
getResourceBundle(Channel channel,
Locale locale)
The resource bundle for the channel info.
|
String |
persist(String blueprintId,
Channel channel)
Persists a channel.
|
void |
removeChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
Removes channel manager listeners.
|
void |
save(Channel channel)
Save channel properties.
|
Map<String,Channel> getChannels() throws ChannelException
ChannelException
Channel getChannelByJcrPath(String channelPath) throws ChannelException
ChannelException
Channel getChannelById(String id) throws ChannelException
Channel
given its idid
- - Channel
idChannel
which has this idChannelException
- - When an error happens while retrieving the Channel
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 #getChannels#get(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.UNKNOWN
} when the channel could not be persisted.List<Blueprint> getBlueprints() throws ChannelException
ChannelException
Blueprint getBlueprint(String id) throws ChannelException
id
- ChannelException
Class<? extends ChannelInfo> getChannelInfoClass(Channel channel) throws ChannelException
channel
- - Channel
for which ChannelInfo
is going to be retrievedChannelInfo
Class
type of Channel
ChannelException
Class<? extends ChannelInfo> getChannelInfoClass(String id) throws ChannelException
id
- - Channel
idChannelInfo
Class
type of Channel
identified by idChannelException
<T extends ChannelInfo> T getChannelInfo(Channel channel) throws ChannelException
getChannelInfoClass(org.hippoecm.hst.configuration.channel.Channel)
class.T
- channel
- ChannelException
ResourceBundle getResourceBundle(Channel channel, Locale locale)
List<HstPropertyDefinition> getPropertyDefinitions(Channel channel)
channel
- - Channel
for which property definitions are going to be retrievedList
of HstPropertyDefinition
List<HstPropertyDefinition> getPropertyDefinitions(String channelId)
channelId
- - Channel
id for which property definitions are going to be retrievedList
of HstPropertyDefinition
boolean canUserModifyChannels()
void addChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
channelManagerEventListeners
- void removeChannelManagerEventListeners(ChannelManagerEventListener... channelManagerEventListeners)
channelManagerEventListeners
- Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.