|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.configuration.channel.ChannelManagerImpl
public class ChannelManagerImpl
Constructor Summary | |
---|---|
ChannelManagerImpl()
|
Method Summary | ||
---|---|---|
void |
addChannelManagerEventListeners(ChannelManagerEventListener... listeners)
Adds channel manager listeners. |
|
boolean |
canUserModifyChannels()
Can the current user (set in HstSubject) create or modify channels. |
|
protected String |
createUniqueChannelId(String channelName,
javax.jcr.Session session)
Creates a unique ID for a channel. |
|
Blueprint |
getBlueprint(String id)
Retrieve a blue print from it's ID. |
|
List<Blueprint> |
getBlueprints()
The list of available blueprints |
|
Channel |
getChannel(String jcrPath)
Returns the channel configured at the given JCR path. |
|
|
getChannelInfo(Channel channel)
The channel info for this channel. |
|
Class<? extends ChannelInfo> |
getChannelInfoClass(Channel channel)
The channel info class for this channel. |
|
Map<String,Channel> |
getChannels()
List all managed channels, identified by their channel IDs |
|
List<HstPropertyDefinition> |
getPropertyDefinitions(Channel channel)
|
|
ResourceBundle |
getResourceBundle(Channel channel,
Locale locale)
The resource bundle for the channel info. |
|
protected javax.jcr.Session |
getSession(boolean writable)
|
|
org.hippoecm.repository.api.Workflow |
getWorkflow(String category,
javax.jcr.Node node)
|
|
void |
invalidate()
discard cached channel information; there have been external changes to the backend storage. |
|
void |
load(VirtualHosts virtualHosts)
Populate the mounts under the virtual hosts with channel information. |
|
String |
persist(String blueprintId,
Channel channel)
Persists a channel. |
|
void |
removeChannelManagerEventListeners(ChannelManagerEventListener... listeners)
Removes channel manager listeners. |
|
void |
save(Channel channel)
Save channel properties. |
|
void |
setContentRoot(String contentRoot)
|
|
void |
setCredentials(javax.jcr.Credentials credentials)
|
|
void |
setRepository(javax.jcr.Repository repository)
|
|
void |
setRootPath(String rootPath)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChannelManagerImpl()
Method Detail |
---|
public void setCredentials(javax.jcr.Credentials credentials)
public void setRepository(javax.jcr.Repository repository)
public void setRootPath(String rootPath)
public void setContentRoot(String contentRoot)
public void addChannelManagerEventListeners(ChannelManagerEventListener... listeners)
ChannelManager
addChannelManagerEventListeners
in interface ChannelManager
public void removeChannelManagerEventListeners(ChannelManagerEventListener... listeners)
ChannelManager
removeChannelManagerEventListeners
in interface ChannelManager
public void load(VirtualHosts virtualHosts) throws RepositoryNotAvailableException
MutableChannelManager
load
in interface MutableChannelManager
RepositoryNotAvailableException
protected javax.jcr.Session getSession(boolean writable) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public Channel getChannel(String jcrPath) throws ChannelException
ChannelManager
getChannel
in interface ChannelManager
ChannelException
public Map<String,Channel> getChannels() throws ChannelException
ChannelManager
getChannels
in interface ChannelManager
ChannelException
public String persist(String blueprintId, Channel channel) throws ChannelException
ChannelManager
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.
persist
in interface ChannelManager
blueprintId
- blueprint that contains prototypes for mount, site and hst configurationchannel
- a channel instance to be persisted
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.protected String createUniqueChannelId(String channelName, javax.jcr.Session session) throws ChannelException
channelName
- the name of the channelsession
- JCR session to use for sanity checks of node names
ChannelException
public void save(Channel channel) throws ChannelException
ChannelManager
When invoking this method, an HstSubject context must be provided with the credentials necessary to persist the channel.
save
in interface ChannelManager
channel
- the channel to persist
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, 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.public List<Blueprint> getBlueprints() throws ChannelException
ChannelManager
getBlueprints
in interface ChannelManager
ChannelException
public Blueprint getBlueprint(String id) throws ChannelException
ChannelManager
getBlueprint
in interface ChannelManager
ChannelException
public Class<? extends ChannelInfo> getChannelInfoClass(Channel channel) throws ChannelException
ChannelManager
getChannelInfoClass
in interface ChannelManager
ChannelException
public <T extends ChannelInfo> T getChannelInfo(Channel channel) throws ChannelException
ChannelManager
ChannelManager.getChannelInfoClass(org.hippoecm.hst.configuration.channel.Channel)
class.
getChannelInfo
in interface ChannelManager
ChannelException
public List<HstPropertyDefinition> getPropertyDefinitions(Channel channel)
getPropertyDefinitions
in interface ChannelManager
public ResourceBundle getResourceBundle(Channel channel, Locale locale)
ChannelManager
getResourceBundle
in interface ChannelManager
public boolean canUserModifyChannels()
ChannelManager
canUserModifyChannels
in interface ChannelManager
public void invalidate()
MutableChannelManager
invalidate
in interface MutableChannelManager
public org.hippoecm.repository.api.Workflow getWorkflow(String category, javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |