Constructor and Description |
---|
ChannelImpl(ServiceRegistry serviceRegistry,
AbstractChannelType channelType,
org.alfresco.service.cmr.repository.NodeRef nodeRef,
String name,
ChannelHelper channelHelper,
PublishingEventHelper eventHelper) |
Modifier and Type | Method and Description |
---|---|
boolean |
canPublish()
Returns
true only if the currently authenticated user can publish content to this Channel . |
boolean |
canPublishStatusUpdates()
Returns
true only if the currently authenticated user can unpublish status updates to this Channel . |
boolean |
canUnpublish()
Returns
true only if the currently authenticated user can unpublish content from this Channel . |
ChannelType |
getChannelType() |
String |
getId() |
String |
getName()
Retrieve the name of this channel
|
org.alfresco.service.cmr.repository.NodeRef |
getNodeRef()
Retrieve the node ref of the node that represents this channel object in the repository
|
Map<org.alfresco.service.namespace.QName,Serializable> |
getProperties()
Retrieve the properties defined on this channel.
|
String |
getUrl(org.alfresco.service.cmr.repository.NodeRef publishedNode)
Returns the URL for the specified node on this channel.
|
boolean |
isAuthorised()
Has this channel been authorised yet?
Typically, when a channel is created in Alfresco the user is sent to the service provider to authorise
Alfresco to access their account on their behalf.
|
org.alfresco.service.cmr.repository.NodeRef |
publishEntry(PublishingPackageEntry entry,
org.alfresco.service.cmr.repository.NodeRef eventNode) |
void |
publishEvent(PublishingEvent event) |
void |
sendStatusUpdate(String status,
String nodeUrl)
Post the specified text onto this channel as a status update.
|
void |
unpublishEntry(PublishingPackageEntry entry) |
public ChannelImpl(ServiceRegistry serviceRegistry, AbstractChannelType channelType, org.alfresco.service.cmr.repository.NodeRef nodeRef, String name, ChannelHelper channelHelper, PublishingEventHelper eventHelper)
public String getId()
public ChannelType getChannelType()
getChannelType
in interface Channel
ChannelType
for this Channel.public String getName()
public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
getNodeRef
in interface Channel
public Map<org.alfresco.service.namespace.QName,Serializable> getProperties()
getProperties
in interface Channel
public void publishEvent(PublishingEvent event)
public void unpublishEntry(PublishingPackageEntry entry)
public org.alfresco.service.cmr.repository.NodeRef publishEntry(PublishingPackageEntry entry, org.alfresco.service.cmr.repository.NodeRef eventNode)
public void sendStatusUpdate(String status, String nodeUrl)
sendStatusUpdate
in interface Channel
status
- The text of the status update. Note that if the length of this text plus the
length of the urlToAppend text is greater than the maximum length permitted as a status
update on this channel then this text will be truncated to fit.nodeUrl
- Text that is to be appended to the status update - often a URL to a relevant
piece of content. If this channel can't accept both the status text and the URL then the status text
will be truncated in preference to the URL. This argument may be null.public String getUrl(org.alfresco.service.cmr.repository.NodeRef publishedNode)
public boolean isAuthorised()
isAuthorised
in interface Channel
public boolean canPublish()
true
only if the currently authenticated user can publish content to this Channel
.
If the ChannelType
does not support publishing, if the Channel
is not authorised or if the
currently authenticated user does not have permission to publish to this Channel
then this
method will return false
.canPublish
in interface Channel
public boolean canUnpublish()
true
only if the currently authenticated user can unpublish content from this Channel
.
If the ChannelType
does not support unpublishing, if the Channel
is not authorised or if the
currently authenticated user does not have permission to publish to this Channel
then this method
will return false
.canUnpublish
in interface Channel
public boolean canPublishStatusUpdates()
true
only if the currently authenticated user can unpublish status updates to this Channel
.
If the ChannelType
does not support publishing of status updates, if the Channel
is not authorised
or if the currently authenticated user does not have permission to publish to this Channel
then this method
will return false
.canPublishStatusUpdates
in interface Channel
Copyright © 2005–2017 Alfresco Software. All rights reserved.