mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Publishing:
- SlideShare channel now tested (the service seems pretty flaky, but the publishing works fine). - A couple of tweaks to ensure that credentials are being stored correctly for each channel. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,23 +24,32 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
import com.benfante.jslideshare.SlideShareAPI;
|
||||
import com.benfante.jslideshare.SlideShareAPIFactory;
|
||||
import com.benfante.jslideshare.SlideShareConnector;
|
||||
|
||||
public class SlideSharePublishingHelper
|
||||
{
|
||||
private NodeService nodeService;
|
||||
private SlideShareConnector slideshareConnector;
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
|
||||
public void setSlideshareConnector(SlideShareConnector slideshareConnector)
|
||||
{
|
||||
this.slideshareConnector = slideshareConnector;
|
||||
}
|
||||
|
||||
public SlideShareAPI getSlideShareApi()
|
||||
{
|
||||
return SlideShareAPIFactory.getSlideShareAPI("hhjh", "oijkl");
|
||||
return createApiObject();
|
||||
}
|
||||
|
||||
private SlideShareApiImpl createApiObject()
|
||||
{
|
||||
return new SlideShareApiImpl(slideshareConnector);
|
||||
}
|
||||
|
||||
public Pair<String, String> getSlideShareCredentialsForNode(NodeRef publishNode)
|
||||
{
|
||||
@@ -61,4 +70,12 @@ public class SlideSharePublishingHelper
|
||||
return result;
|
||||
}
|
||||
|
||||
public SlideShareAPI getSlideShareApi(String username, String password)
|
||||
{
|
||||
SlideShareApiImpl api = createApiObject();
|
||||
api.setUsername(username);
|
||||
api.setPassword(password);
|
||||
return api;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user