org.alfresco.repo.publishing
Class ChannelServiceImpl

java.lang.Object
  extended by org.alfresco.repo.publishing.ChannelServiceImpl
All Implemented Interfaces:
ChannelService

public class ChannelServiceImpl
extends java.lang.Object
implements ChannelService

Since:
4.0

Field Summary
static java.lang.String NAME
           
 
Constructor Summary
ChannelServiceImpl()
           
 
Method Summary
 Channel createChannel(java.lang.String channelTypeId, java.lang.String name, java.util.Map properties)
          Create a new channel of the specified channel type on the specified Share site with the specified name and properties.
 void deleteChannel(Channel channel)
          Remove the specified channel.
 java.util.List getAuthorisedStatusUpdateChannels()
          
 Channel getChannelById(java.lang.String id)
          Retrieve the channel with the given id.
 Channel getChannelByName(java.lang.String channelName)
          Retrieve the channel with the given channel name.
 java.util.List getChannels()
          Retrieve all the channels.
 ChannelType getChannelType(java.lang.String id)
          Retrieve the channel type that has the specified identifier
 java.util.List getChannelTypes()
          Retrieve all the registered channel types
 java.util.List getPublishingChannels(boolean filterByPublishPermission)
          Returns a list of all the channels that are capable of publishing in the specified Share site.
 java.util.List getRelevantPublishingChannels(org.alfresco.service.cmr.repository.NodeRef nodeToPublish)
          Returns a list of all the channels that are capable of publishing the specified NodeRef.
 java.util.List getStatusUpdateChannels(boolean filterByPublishPermission)
          Returns all Channels cpaable of performing a status update for the given Share Site.
 void register(AbstractChannelType channelType)
          Register a new channel type with the channel service
 void renameChannel(Channel channel, java.lang.String newName)
          Rename the specified channel
 void setChannelHelper(ChannelHelper channelHelper)
           
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setEncryptor(MetadataEncryptor encryptor)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPublishingRootObject(PublishingRootObject rootObject)
           
 void updateChannel(Channel channel, java.util.Map properties)
          Update the properties of the specified channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

ChannelServiceImpl

public ChannelServiceImpl()
Method Detail

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - the nodeService to set

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Parameters:
dictionaryService - the dictionaryService to set

setPublishingRootObject

public void setPublishingRootObject(PublishingRootObject rootObject)
Parameters:
rootObject - the rootObject to set

setChannelHelper

public void setChannelHelper(ChannelHelper channelHelper)
Parameters:
channelHelper - the channelHelper to set

setEncryptor

public void setEncryptor(MetadataEncryptor encryptor)

register

public void register(AbstractChannelType channelType)
Register a new channel type with the channel service

Specified by:
register in interface ChannelService
Parameters:
channelType - The channel type to be registered.

getChannelTypes

public java.util.List getChannelTypes()
Retrieve all the registered channel types

Specified by:
getChannelTypes in interface ChannelService
Returns:
A list of ChannelType objects, each representing a channel type registered with this channel service

createChannel

public Channel createChannel(java.lang.String channelTypeId,
                             java.lang.String name,
                             java.util.Map properties)
Create a new channel of the specified channel type on the specified Share site with the specified name and properties.

Specified by:
createChannel in interface ChannelService
Parameters:
channelTypeId - The identifier of the channel type that is to be used for the new channel. This must identify a channel type that has been registered with the channel service.
name - The name of the new channel. This must be unique within the specified Share site.
properties - Any additional properties that are to be saved as part of the new channel.
Returns:
A Channel object corresponding to the newly created channel.

deleteChannel

public void deleteChannel(Channel channel)
Remove the specified channel.

Specified by:
deleteChannel in interface ChannelService
Parameters:
channel - The channel to delete.

getChannels

public java.util.List getChannels()
Retrieve all the channels.

Specified by:
getChannels in interface ChannelService
Returns:
A list of Channel objects, each one representing a channel that exists within the specified Share site.

getChannelByName

public Channel getChannelByName(java.lang.String channelName)
Retrieve the channel with the given channel name.

Specified by:
getChannelByName in interface ChannelService
Parameters:
channelName - The name of the channel
Returns:
The specified Channel objects or null if the specified channel does not exist.

getRelevantPublishingChannels

public java.util.List getRelevantPublishingChannels(org.alfresco.service.cmr.repository.NodeRef nodeToPublish)
Returns a list of all the channels that are capable of publishing the specified NodeRef.

Specified by:
getRelevantPublishingChannels in interface ChannelService
Returns:

getPublishingChannels

public java.util.List getPublishingChannels(boolean filterByPublishPermission)
Returns a list of all the channels that are capable of publishing in the specified Share site.

Specified by:
getPublishingChannels in interface ChannelService
Parameters:
filterByPublishPermission - TODO
Returns:

getStatusUpdateChannels

public java.util.List getStatusUpdateChannels(boolean filterByPublishPermission)
Returns all Channels cpaable of performing a status update for the given Share Site.

Specified by:
getStatusUpdateChannels in interface ChannelService
Parameters:
filterByPublishPermission - TODO
Returns:

getAuthorisedStatusUpdateChannels

public java.util.List getAuthorisedStatusUpdateChannels()


getChannelType

public ChannelType getChannelType(java.lang.String id)
Retrieve the channel type that has the specified identifier

Specified by:
getChannelType in interface ChannelService
Parameters:
id - The identifier of the channel type to be retrieved
Returns:
A ChannelType object that represents the channel type with the specified identifier

renameChannel

public void renameChannel(Channel channel,
                          java.lang.String newName)
Rename the specified channel

Specified by:
renameChannel in interface ChannelService
Parameters:
channel - The channel that is to be renamed.
newName - The new name of the channel

updateChannel

public void updateChannel(Channel channel,
                          java.util.Map properties)
Update the properties of the specified channel.

Specified by:
updateChannel in interface ChannelService
Parameters:
channel - The channel that is to be updated.
properties - The properties to set on the channel. These are blended with the current properties on the channel. Any that aren't currently set will be added, others will be updated.

getChannelById

public Channel getChannelById(java.lang.String id)
Retrieve the channel with the given id.

Specified by:
getChannelById in interface ChannelService
Parameters:
id - The string value of the channel NodeRef.
Returns:
The specified Channel objects or null if the specified channel does not exist.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.