org.alfresco.repo.publishing
Class AbstractOAuth1ChannelType
java.lang.Object
org.alfresco.repo.publishing.AbstractChannelType
org.alfresco.repo.publishing.AbstractOAuth1ChannelType
- All Implemented Interfaces:
- ChannelTypePublishingOperations, ChannelType
- Direct Known Subclasses:
- FlickrChannelType, LinkedInChannelType, TwitterChannelType
public abstract class AbstractOAuth1ChannelType
- extends AbstractChannelType
- Since:
- 4.0
Method Summary |
java.lang.String |
getAuthorisationUrl(Channel channel,
java.lang.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 org.springframework.social.connect.Connection |
getConnectionForChannel(org.alfresco.service.cmr.repository.NodeRef channelNode)
|
protected org.springframework.social.oauth1.OAuth1Parameters |
getOAuth1Parameters(java.lang.String callbackUrl)
Override this method to add additonal parameters onto the URL that the user is redirected to
to authorise access to their account. |
protected java.lang.String |
getOAuthVerifierParamName()
|
protected ChannelType.AuthStatus |
internalAcceptAuthorisation(Channel channel,
java.util.Map callbackHeaders,
java.util.Map callbackParams)
|
void |
setConnectionFactory(org.springframework.social.connect.support.OAuth1ConnectionFactory connectionFactory)
|
Methods inherited from class org.alfresco.repo.publishing.AbstractChannelType |
acceptAuthorisationCallback, getChannelService, getEncryptor, getIcon, getIconFileExtension, getMaximumStatusLength, getNodeService, getNodeUrl, getSupportedContentTypes, getSupportedMimeTypes, publish, sendStatusUpdate, setChannelService, setEncryptor, setNodeService, unpublish |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractOAuth1ChannelType
public AbstractOAuth1ChannelType()
getConnectionForChannel
protected org.springframework.social.connect.Connection getConnectionForChannel(org.alfresco.service.cmr.repository.NodeRef channelNode)
getAuthorisationUrl
public java.lang.String getAuthorisationUrl(Channel channel,
java.lang.String callbackUrl)
- Description copied from interface:
ChannelType
- 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.
- Specified by:
getAuthorisationUrl
in interface ChannelType
- Overrides:
getAuthorisationUrl
in class AbstractChannelType
- Parameters:
channel
- The channel that needs to be authorised.callbackUrl
- Where the service provider represented by this channel type should redirect the user to once
the authorisation procedure is complete.
- Returns:
- The URL that the user should be taken to in order to authorise access to Alfresco for the specified channel.
internalAcceptAuthorisation
protected ChannelType.AuthStatus internalAcceptAuthorisation(Channel channel,
java.util.Map callbackHeaders,
java.util.Map callbackParams)
- Overrides:
internalAcceptAuthorisation
in class AbstractChannelType
getOAuth1Parameters
protected org.springframework.social.oauth1.OAuth1Parameters getOAuth1Parameters(java.lang.String callbackUrl)
- Override this method to add additonal parameters onto the URL that the user is redirected to
to authorise access to their account. By default, no parameters are added, but this may be useful to
specify things such as the permissions being sought, and so on.
- Parameters:
callbackUrl
-
- Returns:
- Do not return null. If no parameters are to be added, return
OAuth1Parameters.NONE
getOAuthVerifierParamName
protected java.lang.String getOAuthVerifierParamName()
setConnectionFactory
public void setConnectionFactory(org.springframework.social.connect.support.OAuth1ConnectionFactory connectionFactory)
- Parameters:
connectionFactory
- the connectionFactory to set
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.