public class ChannelServiceImpl extends Object implements ChannelService
Constructor and Description |
---|
ChannelServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Channel |
createChannel(String channelTypeId,
String name,
Map<org.alfresco.service.namespace.QName,Serializable> 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.
|
List<Channel> |
getAuthorisedStatusUpdateChannels() |
Channel |
getChannelById(String id)
Retrieve the channel with the given id.
|
Channel |
getChannelByName(String channelName)
Retrieve the channel with the given channel name.
|
List<Channel> |
getChannels()
Retrieve all the channels.
|
ChannelType |
getChannelType(String id)
Retrieve the channel type that has the specified identifier
|
List<ChannelType> |
getChannelTypes()
Retrieve all the registered channel types, excluding any that are hidden
|
List<Channel> |
getPublishingChannels(boolean filterByPublishPermission)
Returns a list of all the channels that are capable of publishing in the specified Share site.
|
List<Channel> |
getRelevantPublishingChannels(org.alfresco.service.cmr.repository.NodeRef nodeToPublish)
Returns a list of all the channels that are capable of publishing the specified NodeRef.
|
List<Channel> |
getStatusUpdateChannels(boolean filterByPublishPermission)
Returns all
Channel s 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,
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,
Map<org.alfresco.service.namespace.QName,Serializable> properties)
Update the properties of the specified channel.
|
public static final String NAME
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the nodeService to setpublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- the dictionaryService to setpublic void setPublishingRootObject(PublishingRootObject rootObject)
rootObject
- the rootObject to setpublic void setChannelHelper(ChannelHelper channelHelper)
channelHelper
- the channelHelper to setpublic void setEncryptor(MetadataEncryptor encryptor)
public void register(AbstractChannelType channelType)
register
in interface ChannelService
channelType
- The channel type to be registered.public List<ChannelType> getChannelTypes()
getChannelTypes
in interface ChannelService
public Channel createChannel(String channelTypeId, String name, Map<org.alfresco.service.namespace.QName,Serializable> properties)
createChannel
in interface ChannelService
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.public void deleteChannel(Channel channel)
deleteChannel
in interface ChannelService
channel
- The channel to delete.public List<Channel> getChannels()
getChannels
in interface ChannelService
public Channel getChannelByName(String channelName)
getChannelByName
in interface ChannelService
channelName
- The name of the channelnull
if the specified channel does not exist.public List<Channel> getRelevantPublishingChannels(org.alfresco.service.cmr.repository.NodeRef nodeToPublish)
getRelevantPublishingChannels
in interface ChannelService
nodeToPublish
- NodeRefpublic List<Channel> getPublishingChannels(boolean filterByPublishPermission)
getPublishingChannels
in interface ChannelService
filterByPublishPermission
- If true then the returned channels are filtered to include only those
to which the authenticated user can publishpublic List<Channel> getStatusUpdateChannels(boolean filterByPublishPermission)
Channel
s cpaable of performing a status update for the given Share Site.getStatusUpdateChannels
in interface ChannelService
filterByPublishPermission
- If true then the returned channels are filtered to include only those
to which the authenticated user can post status updatespublic ChannelType getChannelType(String id)
getChannelType
in interface ChannelService
id
- The identifier of the channel type to be retrievedpublic void renameChannel(Channel channel, String newName)
renameChannel
in interface ChannelService
channel
- The channel that is to be renamed.newName
- The new name of the channelpublic void updateChannel(Channel channel, Map<org.alfresco.service.namespace.QName,Serializable> properties)
updateChannel
in interface ChannelService
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.public Channel getChannelById(String id)
getChannelById
in interface ChannelService
id
- The string value of the channel NodeRef
.null
if the specified channel does not exist.Copyright © 2005–2017 Alfresco Software. All rights reserved.