public abstract class AbstractChannelType extends Object implements ChannelType, ChannelTypePublishingOperations
ChannelType.AuthStatus, ChannelType.AuthUrlPair
Constructor and Description |
---|
AbstractChannelType() |
Modifier and Type | Method and Description |
---|---|
ChannelType.AuthStatus |
acceptAuthorisationCallback(Channel channel,
Map<String,String[]> callbackHeaders,
Map<String,String[]> callbackParams)
This operation is called after the service provider represented by this channel type has redirected the user
back to Alfresco.
|
ChannelType.AuthUrlPair |
getAuthorisationUrls(Channel channel,
String callbackUrl)
When creating a new channel of this type, this operation is called to find out where the user should be taken
in order to authorise Alfresco to publish content / status updates to that channel.
|
protected ChannelService |
getChannelService() |
protected MetadataEncryptor |
getEncryptor() |
org.springframework.core.io.Resource |
getIcon(String sizeSuffix)
Obtain the resource that represents an icon for this channel type.
|
String |
getIconFileExtension() |
int |
getMaximumStatusLength()
If this channel type supports status updates then this operation returns the maximum permitted
length of those status updates.
|
protected org.alfresco.service.cmr.repository.NodeService |
getNodeService() |
String |
getNodeUrl(org.alfresco.service.cmr.repository.NodeRef node)
Returns the URL for a piece of content represented by the supplied
node . |
Set<org.alfresco.service.namespace.QName> |
getSupportedContentTypes()
Returns the set of content types supported by channels of this type.
|
Set<String> |
getSupportedMimeTypes()
Returns the set of MIME types supported by channels of this type.
|
String |
getTitle()
Returns the title (display name) of this channel type.
|
protected ChannelType.AuthStatus |
internalAcceptAuthorisation(Channel channel,
Map<String,String[]> callbackHeaders,
Map<String,String[]> callbackParams) |
boolean |
isHidden()
If a channel type is hidden then it doesn't appear in the list returned by
ChannelService.getChannelTypes() |
void |
publish(org.alfresco.service.cmr.repository.NodeRef nodeToPublish,
Map<org.alfresco.service.namespace.QName,Serializable> channelProperties) |
void |
sendStatusUpdate(Channel channel,
String status)
Send the specified status update to the specified channel
|
void |
setChannelService(ChannelService channelService) |
void |
setEncryptor(MetadataEncryptor encryptor) |
void |
setHidden(boolean hidden)
If a channel type is hidden then it doesn't appear in the list returned by
ChannelService.getChannelTypes() |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
unpublish(org.alfresco.service.cmr.repository.NodeRef nodeToUnpublish,
Map<org.alfresco.service.namespace.QName,Serializable> channelProperties) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canPublish, canPublishStatusUpdates, canUnpublish, getChannelNodeType, getId
public void setChannelService(ChannelService channelService)
protected ChannelService getChannelService()
public void setEncryptor(MetadataEncryptor encryptor)
protected MetadataEncryptor getEncryptor()
protected org.alfresco.service.cmr.repository.NodeService getNodeService()
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public String getTitle()
ChannelType
getTitle
in interface ChannelType
public int getMaximumStatusLength()
getMaximumStatusLength
in interface ChannelType
public ChannelType.AuthUrlPair getAuthorisationUrls(Channel channel, String callbackUrl)
ChannelType
getAuthorisationUrls
in interface ChannelType
channel
- The channel that needs to be authorised.callbackUrl
- Where the user's browser needs to send the authorisation tokens once
the authorisation procedure is complete. If possible, the authorisation URL should include this information
so the service provider can send the tokens straight back to us via the browser without any intermediate steps
being needed.public final ChannelType.AuthStatus acceptAuthorisationCallback(Channel channel, Map<String,String[]> callbackHeaders, Map<String,String[]> callbackParams)
ChannelType
acceptAuthorisationCallback
in interface ChannelType
channel
- The channel related to this authorisation callback.callbackHeaders
- All the HTTP headers received in the callback.callbackParams
- All the HTTP parameters received in the callback.protected ChannelType.AuthStatus internalAcceptAuthorisation(Channel channel, Map<String,String[]> callbackHeaders, Map<String,String[]> callbackParams)
public org.springframework.core.io.Resource getIcon(String sizeSuffix)
ChannelType
getIcon
in interface ChannelType
sizeSuffix
- A text representation of the icon size required. "16", "32", etc.null
otherwise.public String getIconFileExtension()
public Set<org.alfresco.service.namespace.QName> getSupportedContentTypes()
ChannelType
getSupportedContentTypes
in interface ChannelType
public Set<String> getSupportedMimeTypes()
ChannelType
getSupportedMimeTypes
in interface ChannelType
public void sendStatusUpdate(Channel channel, String status)
ChannelType
sendStatusUpdate
in interface ChannelType
channel
- Channelstatus
- Stringpublic void publish(org.alfresco.service.cmr.repository.NodeRef nodeToPublish, Map<org.alfresco.service.namespace.QName,Serializable> channelProperties)
publish
in interface ChannelTypePublishingOperations
public void unpublish(org.alfresco.service.cmr.repository.NodeRef nodeToUnpublish, Map<org.alfresco.service.namespace.QName,Serializable> channelProperties)
unpublish
in interface ChannelTypePublishingOperations
public String getNodeUrl(org.alfresco.service.cmr.repository.NodeRef node)
ChannelType
node
.getNodeUrl
in interface ChannelType
node
- The published content node in the live environment.public boolean isHidden()
ChannelType
ChannelService.getChannelTypes()
isHidden
in interface ChannelType
public void setHidden(boolean hidden)
ChannelType
ChannelService.getChannelTypes()
setHidden
in interface ChannelType
Copyright © 2005–2017 Alfresco Software. All rights reserved.