From 5514dd9bc2f24dc5246ebabcb55a9133242204a0 Mon Sep 17 00:00:00 2001 From: Brian Remmington Date: Wed, 28 Sep 2011 10:17:29 +0000 Subject: [PATCH] Publishing: Corrected (or created) Javadoc comments for classes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30819 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../flickr/FlickrPublishingHelper.java | 5 ++ .../repo/publishing/flickr/FlickrTest.java | 2 +- .../flickr/springsocial/api/Flickr.java | 7 +- .../springsocial/api/FlickrException.java | 5 ++ .../flickr/springsocial/api/FlickrHelper.java | 5 ++ .../springsocial/api/MediaOperations.java | 5 ++ .../flickr/springsocial/api/PhotoInfo.java | 5 ++ .../springsocial/api/UserOperations.java | 5 ++ .../api/impl/AbstractFlickrOperations.java | 5 ++ .../api/impl/FlickrErrorHandler.java | 5 ++ .../springsocial/api/impl/FlickrTemplate.java | 5 ++ .../springsocial/api/impl/MediaTemplate.java | 5 ++ .../springsocial/api/impl/UserTemplate.java | 5 ++ .../api/impl/xml/FlickrError.java | 6 ++ .../api/impl/xml/FlickrPayload.java | 5 ++ .../api/impl/xml/FlickrResponse.java | 5 ++ .../springsocial/api/impl/xml/Photo.java | 5 ++ .../springsocial/api/impl/xml/PhotoId.java | 5 ++ .../springsocial/connect/FlickrAdapter.java | 5 ++ .../connect/FlickrConnectionFactory.java | 5 ++ .../connect/FlickrServiceProvider.java | 5 ++ .../linkedin/LinkedInChannelType.java | 1 + .../linkedin/springsocial/api/Activity.java | 23 +++++++ .../springsocial/api/AlfrescoLinkedIn.java | 5 ++ .../linkedin/springsocial/api/Share.java | 23 +++++++ .../springsocial/api/ShareVisibility.java | 23 +++++++ .../springsocial/api/ShareVisibilityCode.java | 23 +++++++ .../api/impl/AlfrescoLinkedInTemplate.java | 5 ++ .../api/impl/xml/JaxbActivityImpl.java | 23 +++++++ .../api/impl/xml/JaxbShareImpl.java | 23 +++++++ .../api/impl/xml/JaxbShareVisibilityImpl.java | 23 +++++++ .../springsocial/connect/LinkedInAdapter.java | 5 ++ .../connect/LinkedInConnectionFactory.java | 5 ++ .../connect/LinkedInServiceProvider.java | 5 ++ .../publishing/slideshare/SlideShareApi.java | 5 ++ .../slideshare/SlideShareApiImpl.java | 5 ++ .../slideshare/SlideShareChannelType.java | 5 ++ .../slideshare/SlideShareConnectorImpl.java | 5 ++ .../SlideSharePublishingHelper.java | 5 ++ .../slideshare/SlideSharePublishingModel.java | 3 +- .../publishing/slideshare/SlideShareTest.java | 3 +- .../twitter/TwitterChannelType.java | 5 ++ .../twitter/TwitterPublishingModel.java | 3 +- .../youtube/YouTubeChannelType.java | 5 ++ .../youtube/YouTubePublishingHelper.java | 5 ++ .../youtube/YouTubePublishingModel.java | 3 +- .../repo/publishing/youtube/YouTubeTest.java | 3 +- .../cmr/publishing/channels/Channel.java | 37 +++++++--- .../cmr/publishing/channels/ChannelType.java | 69 ++++++++++++++++++- 49 files changed, 432 insertions(+), 21 deletions(-) diff --git a/source/java/org/alfresco/repo/publishing/flickr/FlickrPublishingHelper.java b/source/java/org/alfresco/repo/publishing/flickr/FlickrPublishingHelper.java index ca9b69e870..94780b5c01 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/FlickrPublishingHelper.java +++ b/source/java/org/alfresco/repo/publishing/flickr/FlickrPublishingHelper.java @@ -31,6 +31,11 @@ import org.alfresco.service.namespace.QName; import org.springframework.social.connect.Connection; import org.springframework.social.oauth1.OAuthToken; +/** + * A utility class to support the {@link FlickrChannelType}. + * @author Brian + * @since 4.0 + */ public class FlickrPublishingHelper { private NodeService nodeService; diff --git a/source/java/org/alfresco/repo/publishing/flickr/FlickrTest.java b/source/java/org/alfresco/repo/publishing/flickr/FlickrTest.java index d6d3f81efa..85685a46d8 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/FlickrTest.java +++ b/source/java/org/alfresco/repo/publishing/flickr/FlickrTest.java @@ -51,7 +51,7 @@ import org.springframework.core.io.Resource; /** * @author Brian - * + * @since 4.0 */ public class FlickrTest extends BaseSpringTest { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/Flickr.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/Flickr.java index 02f89ba2fd..bbaba66d69 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/Flickr.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/Flickr.java @@ -18,15 +18,12 @@ */ package org.alfresco.repo.publishing.flickr.springsocial.api; -import org.alfresco.repo.publishing.flickr.springsocial.api.MediaOperations; -import org.alfresco.repo.publishing.flickr.springsocial.api.impl.FlickrTemplate; import org.springframework.social.ApiBinding; /** - * Interface specifying a basic set of operations for interacting with Facebook. - * Implemented by {@link FlickrTemplate}. * - * @author Craig Walls + * @author Brian + * @since 4.0 */ public interface Flickr extends ApiBinding { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrException.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrException.java index 6c8d7a91b2..d87f34bdce 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrException.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrException.java @@ -18,6 +18,11 @@ */ package org.alfresco.repo.publishing.flickr.springsocial.api; +/** + * + * @author Brian + * @since 4.0 + */ public class FlickrException extends RuntimeException { private static final long serialVersionUID = 7938720115597007302L; diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrHelper.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrHelper.java index 0f61d531fe..3bf9149fd6 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrHelper.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/FlickrHelper.java @@ -21,6 +21,11 @@ package org.alfresco.repo.publishing.flickr.springsocial.api; import org.springframework.social.support.URIBuilder; import org.springframework.util.MultiValueMap; +/** + * + * @author Brian + * @since 4.0 + */ public interface FlickrHelper { String getRestEndpoint(); diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/MediaOperations.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/MediaOperations.java index 5293863ccd..2633cfa7c2 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/MediaOperations.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/MediaOperations.java @@ -20,6 +20,11 @@ package org.alfresco.repo.publishing.flickr.springsocial.api; import org.springframework.core.io.Resource; +/** + * + * @author Brian + * @since 4.0 + */ public interface MediaOperations { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/PhotoInfo.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/PhotoInfo.java index e2f64d927d..ef8f90cf56 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/PhotoInfo.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/PhotoInfo.java @@ -18,6 +18,11 @@ */ package org.alfresco.repo.publishing.flickr.springsocial.api; +/** + * + * @author Brian + * @since 4.0 + */ public interface PhotoInfo { String getId(); diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/UserOperations.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/UserOperations.java index 2ff1641688..46e8dd5dd1 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/UserOperations.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/UserOperations.java @@ -18,6 +18,11 @@ */ package org.alfresco.repo.publishing.flickr.springsocial.api; +/** + * + * @author Brian + * @since 4.0 + */ public interface UserOperations { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/AbstractFlickrOperations.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/AbstractFlickrOperations.java index 0781f3b40e..249321d504 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/AbstractFlickrOperations.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/AbstractFlickrOperations.java @@ -20,6 +20,11 @@ package org.alfresco.repo.publishing.flickr.springsocial.api.impl; import org.springframework.social.MissingAuthorizationException; +/** + * + * @author Brian + * @since 4.0 + */ class AbstractFlickrOperations { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrErrorHandler.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrErrorHandler.java index 7facadc3ba..eb3b9a7619 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrErrorHandler.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrErrorHandler.java @@ -39,6 +39,11 @@ import org.springframework.social.facebook.api.NotAFriendException; import org.springframework.social.facebook.api.ResourceOwnershipException; import org.springframework.web.client.DefaultResponseErrorHandler; +/** + * + * @author Brian + * @since 4.0 + */ class FlickrErrorHandler extends DefaultResponseErrorHandler { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrTemplate.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrTemplate.java index 0571c6b019..650200cadb 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrTemplate.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/FlickrTemplate.java @@ -37,6 +37,11 @@ import org.springframework.social.support.URIBuilder; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +/** + * + * @author Brian + * @since 4.0 + */ public class FlickrTemplate extends AbstractOAuth1ApiBinding implements Flickr, FlickrHelper { private static final String DEFAULT_ENDPOINT = "http://api.flickr.com/services/"; diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/MediaTemplate.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/MediaTemplate.java index da006a86b8..7c3cc8aaba 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/MediaTemplate.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/MediaTemplate.java @@ -33,6 +33,11 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; +/** + * + * @author Brian + * @since 4.0 + */ class MediaTemplate extends AbstractFlickrOperations implements MediaOperations { private final RestTemplate restTemplate; diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/UserTemplate.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/UserTemplate.java index 7f797d6611..e5d34de962 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/UserTemplate.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/UserTemplate.java @@ -20,6 +20,11 @@ package org.alfresco.repo.publishing.flickr.springsocial.api.impl; import org.alfresco.repo.publishing.flickr.springsocial.api.UserOperations; +/** + * + * @author Brian + * @since 4.0 + */ class UserTemplate extends AbstractFlickrOperations implements UserOperations { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrError.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrError.java index e4c79d8ac5..167eb6244c 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrError.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrError.java @@ -21,6 +21,12 @@ package org.alfresco.repo.publishing.flickr.springsocial.api.impl.xml; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; +/** + * + * @author Brian + * @since 4.0 + */ + @XmlRootElement(name = "err") public class FlickrError implements FlickrPayload { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrPayload.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrPayload.java index aa56014cb3..b4b4528d17 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrPayload.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrPayload.java @@ -18,6 +18,11 @@ */ package org.alfresco.repo.publishing.flickr.springsocial.api.impl.xml; +/** + * + * @author Brian + * @since 4.0 + */ public interface FlickrPayload { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrResponse.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrResponse.java index e4e1494af0..6ef7edb5f3 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrResponse.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/FlickrResponse.java @@ -22,6 +22,11 @@ import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; +/** + * + * @author Brian + * @since 4.0 + */ @XmlRootElement(name = "rsp") public class FlickrResponse { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/Photo.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/Photo.java index 265907bca2..38d550e087 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/Photo.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/Photo.java @@ -28,6 +28,11 @@ import javax.xml.bind.annotation.XmlValue; import org.alfresco.repo.publishing.flickr.springsocial.api.PhotoInfo; +/** + * + * @author Brian + * @since 4.0 + */ @XmlRootElement(name = "photo") public class Photo implements FlickrPayload, PhotoInfo { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/PhotoId.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/PhotoId.java index 837b6a6305..94fc494a33 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/PhotoId.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/api/impl/xml/PhotoId.java @@ -21,6 +21,11 @@ package org.alfresco.repo.publishing.flickr.springsocial.api.impl.xml; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlValue; +/** + * + * @author Brian + * @since 4.0 + */ @XmlRootElement(name = "photoid") public class PhotoId implements FlickrPayload { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrAdapter.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrAdapter.java index d775d6a179..830aa7aba0 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrAdapter.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrAdapter.java @@ -25,6 +25,11 @@ import org.springframework.social.connect.ConnectionValues; import org.springframework.social.connect.UserProfile; import org.springframework.social.connect.UserProfileBuilder; +/** + * + * @author Brian + * @since 4.0 + */ public class FlickrAdapter implements ApiAdapter { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrConnectionFactory.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrConnectionFactory.java index 7a07ed6f1c..4086e497fd 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrConnectionFactory.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrConnectionFactory.java @@ -22,6 +22,11 @@ import org.alfresco.repo.publishing.flickr.springsocial.api.Flickr; import org.alfresco.repo.publishing.flickr.springsocial.connect.FlickrAdapter; import org.springframework.social.connect.support.OAuth1ConnectionFactory; +/** + * + * @author Brian + * @since 4.0 + */ public class FlickrConnectionFactory extends OAuth1ConnectionFactory { diff --git a/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrServiceProvider.java b/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrServiceProvider.java index 258e562f4b..94444a9b82 100644 --- a/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrServiceProvider.java +++ b/source/java/org/alfresco/repo/publishing/flickr/springsocial/connect/FlickrServiceProvider.java @@ -23,6 +23,11 @@ import org.alfresco.repo.publishing.flickr.springsocial.api.impl.FlickrTemplate; import org.springframework.social.oauth1.AbstractOAuth1ServiceProvider; import org.springframework.social.oauth1.OAuth1Template; +/** + * + * @author Brian + * @since 4.0 + */ public class FlickrServiceProvider extends AbstractOAuth1ServiceProvider { diff --git a/source/java/org/alfresco/repo/publishing/linkedin/LinkedInChannelType.java b/source/java/org/alfresco/repo/publishing/linkedin/LinkedInChannelType.java index 06bd537a9b..ef00d6b60f 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/LinkedInChannelType.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/LinkedInChannelType.java @@ -31,6 +31,7 @@ import org.springframework.social.connect.Connection; /** * @author Nick Smith + * @author Brian * @since 4.0 */ public class LinkedInChannelType extends AbstractOAuth1ChannelType diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Activity.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Activity.java index f3eac116e3..fdaa2ab193 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Activity.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Activity.java @@ -1,5 +1,28 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api; +/** + * + * @author Brian + * @since 4.0 + */ public interface Activity { public String getContentType(); diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/AlfrescoLinkedIn.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/AlfrescoLinkedIn.java index bb6c77b165..f55fdc829c 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/AlfrescoLinkedIn.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/AlfrescoLinkedIn.java @@ -20,6 +20,11 @@ package org.alfresco.repo.publishing.linkedin.springsocial.api; import org.springframework.social.linkedin.api.LinkedIn; +/** + * + * @author Brian + * @since 4.0 + */ public interface AlfrescoLinkedIn extends LinkedIn { void postNetworkUpdate(String update); diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Share.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Share.java index 1f786a8b10..aa4d89b1de 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Share.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/Share.java @@ -1,5 +1,28 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api; +/** + * + * @author Brian + * @since 4.0 + */ public interface Share { public String getComment(); diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibility.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibility.java index fd30ad567a..fd9c319eb2 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibility.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibility.java @@ -1,5 +1,28 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api; +/** + * + * @author Brian + * @since 4.0 + */ public interface ShareVisibility { ShareVisibilityCode getCode(); diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibilityCode.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibilityCode.java index b6f1901ad8..e2413ce1a4 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibilityCode.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/ShareVisibilityCode.java @@ -1,8 +1,31 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; +/** + * + * @author Brian + * @since 4.0 + */ @XmlEnum public enum ShareVisibilityCode { diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/AlfrescoLinkedInTemplate.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/AlfrescoLinkedInTemplate.java index 2e7fdb3b21..fcde474ade 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/AlfrescoLinkedInTemplate.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/AlfrescoLinkedInTemplate.java @@ -33,6 +33,11 @@ import org.springframework.http.converter.HttpMessageConverter; import org.springframework.social.linkedin.api.impl.LinkedInTemplate; import org.springframework.social.support.URIBuilder; +/** + * + * @author Brian + * @since 4.0 + */ public class AlfrescoLinkedInTemplate extends LinkedInTemplate implements AlfrescoLinkedIn { private static String JAXB_CONTEXT_PATH = "org.alfresco.repo.publishing.linkedin.springsocial.api.impl.xml:" diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbActivityImpl.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbActivityImpl.java index 7ea921181e..8d5cc181d3 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbActivityImpl.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbActivityImpl.java @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api.impl.xml; import java.util.Locale; @@ -11,6 +29,11 @@ import javax.xml.bind.annotation.XmlType; import org.alfresco.repo.publishing.linkedin.springsocial.api.Activity; +/** + * + * @author Brian + * @since 4.0 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = {"contentType", "body"}) @XmlRootElement(name = "activity") diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareImpl.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareImpl.java index 9577ac8c85..050ff283d7 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareImpl.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareImpl.java @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api.impl.xml; import javax.xml.bind.annotation.XmlAccessType; @@ -10,6 +28,11 @@ import org.alfresco.repo.publishing.linkedin.springsocial.api.Share; import org.alfresco.repo.publishing.linkedin.springsocial.api.ShareVisibility; import org.alfresco.repo.publishing.linkedin.springsocial.api.ShareVisibilityCode; +/** + * + * @author Brian + * @since 4.0 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "comment", "visibility" }) @XmlRootElement(name = "share") diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareVisibilityImpl.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareVisibilityImpl.java index 2fe81ee711..c370318f75 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareVisibilityImpl.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/api/impl/xml/JaxbShareVisibilityImpl.java @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2005-2011 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ package org.alfresco.repo.publishing.linkedin.springsocial.api.impl.xml; import javax.xml.bind.annotation.XmlAccessType; @@ -9,6 +27,11 @@ import javax.xml.bind.annotation.XmlType; import org.alfresco.repo.publishing.linkedin.springsocial.api.ShareVisibility; import org.alfresco.repo.publishing.linkedin.springsocial.api.ShareVisibilityCode; +/** + * + * @author Brian + * @since 4.0 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "code" }) @XmlRootElement(name = "visibility") diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInAdapter.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInAdapter.java index e151141bef..2d32461212 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInAdapter.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInAdapter.java @@ -26,6 +26,11 @@ import org.springframework.social.connect.UserProfileBuilder; import org.springframework.social.linkedin.api.LinkedInProfile; import org.springframework.web.client.HttpClientErrorException; +/** + * + * @author Brian + * @since 4.0 + */ public class LinkedInAdapter implements ApiAdapter { public boolean test(AlfrescoLinkedIn linkedin) { diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInConnectionFactory.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInConnectionFactory.java index c50dcc5743..3f00bb96da 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInConnectionFactory.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInConnectionFactory.java @@ -21,6 +21,11 @@ package org.alfresco.repo.publishing.linkedin.springsocial.connect; import org.alfresco.repo.publishing.linkedin.springsocial.api.AlfrescoLinkedIn; import org.springframework.social.connect.support.OAuth1ConnectionFactory; +/** + * + * @author Brian + * @since 4.0 + */ public class LinkedInConnectionFactory extends OAuth1ConnectionFactory{ public LinkedInConnectionFactory(String consumerKey, String consumerSecret) { diff --git a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInServiceProvider.java b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInServiceProvider.java index 4fc0dff191..5a12cc087d 100644 --- a/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInServiceProvider.java +++ b/source/java/org/alfresco/repo/publishing/linkedin/springsocial/connect/LinkedInServiceProvider.java @@ -23,6 +23,11 @@ import org.alfresco.repo.publishing.linkedin.springsocial.api.impl.AlfrescoLinke import org.springframework.social.oauth1.AbstractOAuth1ServiceProvider; import org.springframework.social.oauth1.OAuth1Template; +/** + * + * @author Brian + * @since 4.0 + */ public class LinkedInServiceProvider extends AbstractOAuth1ServiceProvider { public LinkedInServiceProvider(String consumerKey, String consumerSecret) { diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApi.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApi.java index 832730b4c8..339a1d3ceb 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApi.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApi.java @@ -22,6 +22,11 @@ import com.benfante.jslideshare.SlideShareAPI; import com.benfante.jslideshare.SlideShareErrorException; import com.benfante.jslideshare.SlideShareException; +/** + * + * @author Brian + * @since 4.0 + */ public interface SlideShareApi extends SlideShareAPI { String deleteSlideshow(String username, String password, String id) throws SlideShareException, diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApiImpl.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApiImpl.java index c4a5388afe..dd86cf02af 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApiImpl.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareApiImpl.java @@ -39,6 +39,11 @@ import com.benfante.jslideshare.messages.SlideshowInfo; import com.benfante.jslideshare.messages.Tag; import com.benfante.jslideshare.messages.User; +/** + * + * @author Brian + * @since 4.0 + */ public class SlideShareApiImpl implements SlideShareApi { private static final Log logger = LogFactory.getLog(SlideShareApiImpl.class); diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareChannelType.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareChannelType.java index a4b57c73f4..a65d325d83 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareChannelType.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareChannelType.java @@ -42,6 +42,11 @@ import org.apache.commons.logging.LogFactory; import com.benfante.jslideshare.SlideShareAPI; import com.benfante.jslideshare.messages.SlideshowInfo; +/** + * + * @author Brian + * @since 4.0 + */ public class SlideShareChannelType extends AbstractChannelType { public final static String ID = "slideshare"; diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareConnectorImpl.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareConnectorImpl.java index 157e306b3c..d5dceea1fd 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareConnectorImpl.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareConnectorImpl.java @@ -45,6 +45,11 @@ import org.apache.log4j.Logger; import com.benfante.jslideshare.SlideShareConnector; import com.benfante.jslideshare.SlideShareErrorException; +/** + * + * @author Brian + * @since 4.0 + */ public class SlideShareConnectorImpl implements SlideShareConnector { diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingHelper.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingHelper.java index a098b0201a..b273a1330a 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingHelper.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingHelper.java @@ -32,6 +32,11 @@ import org.alfresco.util.Pair; import com.benfante.jslideshare.SlideShareAPI; import com.benfante.jslideshare.SlideShareConnector; +/** + * + * @author Brian + * @since 4.0 + */ public class SlideSharePublishingHelper { private final static Map DEFAULT_MIME_TYPES = new TreeMap(); diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingModel.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingModel.java index 2260023afa..cfc3d6c8cd 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingModel.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideSharePublishingModel.java @@ -22,8 +22,9 @@ package org.alfresco.repo.publishing.slideshare; import org.alfresco.service.namespace.QName; /** + * * @author Brian - * + * @since 4.0 */ public interface SlideSharePublishingModel { diff --git a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareTest.java b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareTest.java index 8109f6632c..e5d87a5068 100644 --- a/source/java/org/alfresco/repo/publishing/slideshare/SlideShareTest.java +++ b/source/java/org/alfresco/repo/publishing/slideshare/SlideShareTest.java @@ -55,8 +55,9 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; /** - * @author Brian * + * @author Brian + * @since 4.0 */ public class SlideShareTest extends BaseSpringTest { diff --git a/source/java/org/alfresco/repo/publishing/twitter/TwitterChannelType.java b/source/java/org/alfresco/repo/publishing/twitter/TwitterChannelType.java index 2afa24a9a6..287b281511 100644 --- a/source/java/org/alfresco/repo/publishing/twitter/TwitterChannelType.java +++ b/source/java/org/alfresco/repo/publishing/twitter/TwitterChannelType.java @@ -27,6 +27,11 @@ import org.apache.commons.logging.LogFactory; import org.springframework.social.connect.Connection; import org.springframework.social.twitter.api.Twitter; +/** + * + * @author Brian + * @since 4.0 + */ public class TwitterChannelType extends AbstractOAuth1ChannelType { private final static Log log = LogFactory.getLog(TwitterChannelType.class); diff --git a/source/java/org/alfresco/repo/publishing/twitter/TwitterPublishingModel.java b/source/java/org/alfresco/repo/publishing/twitter/TwitterPublishingModel.java index 3f6a1e1d71..5b9c85dfbc 100644 --- a/source/java/org/alfresco/repo/publishing/twitter/TwitterPublishingModel.java +++ b/source/java/org/alfresco/repo/publishing/twitter/TwitterPublishingModel.java @@ -22,8 +22,9 @@ package org.alfresco.repo.publishing.twitter; import org.alfresco.service.namespace.QName; /** + * * @author Brian - * + * @since 4.0 */ public interface TwitterPublishingModel { diff --git a/source/java/org/alfresco/repo/publishing/youtube/YouTubeChannelType.java b/source/java/org/alfresco/repo/publishing/youtube/YouTubeChannelType.java index 44338189e0..92ad060781 100644 --- a/source/java/org/alfresco/repo/publishing/youtube/YouTubeChannelType.java +++ b/source/java/org/alfresco/repo/publishing/youtube/YouTubeChannelType.java @@ -60,6 +60,11 @@ import com.google.gdata.data.youtube.YouTubeMediaGroup; import com.google.gdata.data.youtube.YouTubeNamespace; import com.google.gdata.util.ServiceException; +/** + * + * @author Brian + * @since 4.0 + */ public class YouTubeChannelType extends AbstractChannelType { private final static Log log = LogFactory.getLog(YouTubeChannelType.class); diff --git a/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingHelper.java b/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingHelper.java index 7438538f61..6c039b931f 100644 --- a/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingHelper.java +++ b/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingHelper.java @@ -29,6 +29,11 @@ import org.apache.commons.logging.LogFactory; import com.google.gdata.client.youtube.YouTubeService; +/** + * + * @author Brian + * @since 4.0 + */ public class YouTubePublishingHelper { private static final Log log = LogFactory.getLog(YouTubePublishingHelper.class); diff --git a/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingModel.java b/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingModel.java index 783b880c65..70b77d918f 100644 --- a/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingModel.java +++ b/source/java/org/alfresco/repo/publishing/youtube/YouTubePublishingModel.java @@ -22,8 +22,9 @@ package org.alfresco.repo.publishing.youtube; import org.alfresco.service.namespace.QName; /** + * * @author Brian - * + * @since 4.0 */ public interface YouTubePublishingModel { diff --git a/source/java/org/alfresco/repo/publishing/youtube/YouTubeTest.java b/source/java/org/alfresco/repo/publishing/youtube/YouTubeTest.java index 5f040a0dbb..0b3e50c668 100644 --- a/source/java/org/alfresco/repo/publishing/youtube/YouTubeTest.java +++ b/source/java/org/alfresco/repo/publishing/youtube/YouTubeTest.java @@ -49,8 +49,9 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; /** - * @author Brian * + * @author Brian + * @since 4.0 */ public class YouTubeTest extends BaseSpringTest { diff --git a/source/java/org/alfresco/service/cmr/publishing/channels/Channel.java b/source/java/org/alfresco/service/cmr/publishing/channels/Channel.java index 6c04e8ce4d..ad3336bd22 100644 --- a/source/java/org/alfresco/service/cmr/publishing/channels/Channel.java +++ b/source/java/org/alfresco/service/cmr/publishing/channels/Channel.java @@ -26,6 +26,7 @@ import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; /** + * Represents a publishing channel * @author Brian * @author Nick Smith * @since 4.0 @@ -43,7 +44,7 @@ public interface Channel ChannelType getChannelType(); /** - * Retrieve the node ref of the node that represents this channel in the editorial environment + * Retrieve the node ref of the node that represents this channel object in the repository * @return */ NodeRef getNodeRef(); @@ -54,14 +55,28 @@ public interface Channel */ String getName(); + /** + * Retrieve the properties defined on this channel. + * @return + */ Map getProperties(); - void sendStatusUpdate(String status, String nodeUrl); + /** + * Post the specified text onto this channel as a status update. + * @param 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. + * @param urlToAppend 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. + */ + void sendStatusUpdate(String status, String urlToAppend); /** - * Returns the URL for some published content given the content node in the editorial environment. - * @param publishedNode The node representing the published content in the editorial environment. - * @return a URL for the published content. + * Returns the URL for the specified node on this channel. + * @param The content node whose published URL is being requested. + * @return a URL for the published content. May return null if the specified node has not + * been published to this channel. */ String getUrl(NodeRef publishedNode); @@ -78,21 +93,27 @@ public interface Channel /** * Returns true only if the currently authenticated user can publish content to this {@link Channel}. - * If the {@link ChannelType} does not support publishing, if the {@link Channel} is not authorised or if the currently authenticated user does not have permission to publish to this {@link Channel} then this method will return false. + * If the {@link ChannelType} does not support publishing, if the {@link Channel} is not authorised or if the + * currently authenticated user does not have permission to publish to this {@link Channel} then this + * method will return false. * @return */ boolean canPublish(); /** * Returns true only if the currently authenticated user can unpublish content from this {@link Channel}. - * If the {@link ChannelType} does not support unpublishing, if the {@link Channel} is not authorised or if the currently authenticated user does not have permission to publish to this {@link Channel} then this method will return false. + * If the {@link ChannelType} does not support unpublishing, if the {@link Channel} is not authorised or if the + * currently authenticated user does not have permission to publish to this {@link Channel} then this method + * will return false. * @return */ boolean canUnpublish(); /** * Returns true only if the currently authenticated user can unpublish status updates to this {@link Channel}. - * If the {@link ChannelType} does not support publishing of status updates, if the {@link Channel} is not authorised or if the currently authenticated user does not have permission to publish to this {@link Channel} then this method will return false. + * If the {@link ChannelType} does not support publishing of status updates, if the {@link Channel} is not authorised + * or if the currently authenticated user does not have permission to publish to this {@link Channel} then this method + * will return false. * @return */ boolean canPublishStatusUpdates(); diff --git a/source/java/org/alfresco/service/cmr/publishing/channels/ChannelType.java b/source/java/org/alfresco/service/cmr/publishing/channels/ChannelType.java index 277f253fe8..c08ed79753 100644 --- a/source/java/org/alfresco/service/cmr/publishing/channels/ChannelType.java +++ b/source/java/org/alfresco/service/cmr/publishing/channels/ChannelType.java @@ -34,16 +34,57 @@ public interface ChannelType { enum AuthStatus {AUTHORISED, RETRY, UNAUTHORISED} + /** + * Returns the unique identifier of this channel type + * @return + */ String getId(); + + /** + * Each channel is stored in the repository as a node. This operation returns + * the qualified name of the type of that node. + * @return + */ QName getChannelNodeType(); + /** + * Does this channel type support publishing content? + * @return + */ boolean canPublish(); + + /** + * Does this channel type support unpublishing content? That is to say, once content has been published + * to a channel of this type, can it later be removed from that channel? + * @return + */ boolean canUnpublish(); + + /** + * Does this channel type support status updates? + * @return + */ boolean canPublishStatusUpdates(); + /** + * Send the specified status update to the specified channel + * @param channel + * @param status + */ void sendStatusUpdate(Channel channel, String status); + /** + * Returns the set of MIME types supported by channels of this type. + * @return The set of MIME types supported by channels of this type or an empty set + * if content of any MIME type can be published. + */ Set getSupportedMimeTypes(); + + /** + * Returns the set of content types supported by channels of this type. + * @return The set of content types supported by channels of this type or an empty set + * if content of any content type can be published. + */ Set getSupportedContentTypes(); /** @@ -52,12 +93,36 @@ public interface ChannelType * @return a URL for the published content. */ String getNodeUrl(NodeRef node); + + /** + * If this channel type supports status updates then this operation returns the maximum permitted + * length of those status updates. + * @return The maximum length of status updates on channels of this type. A value of zero indicates that there + * is no maximum. + */ int getMaximumStatusLength(); + /** + * 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. + * @param channel The channel that needs to be authorised. + * @param callbackUrl Where the service provider represented by this channel type should redirect the user to once + * the authorisation procedure is complete. + * @return The URL that the user should be taken to in order to authorise access to Alfresco for the specified channel. + */ String getAuthorisationUrl(Channel channel, String callbackUrl); - AuthStatus acceptAuthorisationCallback(Channel channel, Map callbackHeaders, Map callbackParams); - String getIconFileExtension(); + /** + * This operation is called after the service provider represented by this channel type has redirected the user + * back to Alfresco. The HTTP headers and parameters received from the service provider are included, as they are likely + * to contain essential information such as tokens, error codes, and so on. + * @param channel The channel related to this authorisation callback. + * @param callbackHeaders All the HTTP headers received in the callback. + * @param callbackParams All the HTTP parameters received in the callback. + * @return A value indicating whether the authorisation was successful or not. If not, there is an indication as to + * whether the user may try again or not. + */ + AuthStatus acceptAuthorisationCallback(Channel channel, Map callbackHeaders, Map callbackParams); /** * Obtain the resource that represents an icon for this channel type.