diff --git a/config/alfresco/facebook-publishing-context.xml b/config/alfresco/facebook-publishing-context.xml index b94d4619f2..b2784558e6 100644 --- a/config/alfresco/facebook-publishing-context.xml +++ b/config/alfresco/facebook-publishing-context.xml @@ -10,6 +10,14 @@ + + + + org.alfresco.repo.publishing.facebook.facebook-publishing + + + + diff --git a/config/alfresco/flickr-publishing-context.xml b/config/alfresco/flickr-publishing-context.xml index 0b662f4895..83cd3d888a 100644 --- a/config/alfresco/flickr-publishing-context.xml +++ b/config/alfresco/flickr-publishing-context.xml @@ -10,6 +10,14 @@ + + + + org.alfresco.repo.publishing.flickr.flickr-publishing + + + + diff --git a/config/alfresco/linkedin-publishing-context.xml b/config/alfresco/linkedin-publishing-context.xml index 059d9c10c4..9f0e6d7de3 100644 --- a/config/alfresco/linkedin-publishing-context.xml +++ b/config/alfresco/linkedin-publishing-context.xml @@ -10,6 +10,14 @@ + + + + org.alfresco.repo.publishing.linkedin.linkedin-publishing + + + + diff --git a/config/alfresco/slideshare-publishing-context.xml b/config/alfresco/slideshare-publishing-context.xml index b3f5aeeef1..6b18d27423 100644 --- a/config/alfresco/slideshare-publishing-context.xml +++ b/config/alfresco/slideshare-publishing-context.xml @@ -10,6 +10,14 @@ + + + + org.alfresco.repo.publishing.slideshare.slideshare-publishing + + + + diff --git a/config/alfresco/twitter-publishing-context.xml b/config/alfresco/twitter-publishing-context.xml index 4e5301bc56..8c7c4ff7ca 100644 --- a/config/alfresco/twitter-publishing-context.xml +++ b/config/alfresco/twitter-publishing-context.xml @@ -10,6 +10,14 @@ + + + + org.alfresco.repo.publishing.twitter.twitter-publishing + + + + diff --git a/config/alfresco/youtube-publishing-context.xml b/config/alfresco/youtube-publishing-context.xml index fbfbf5093b..709260f398 100644 --- a/config/alfresco/youtube-publishing-context.xml +++ b/config/alfresco/youtube-publishing-context.xml @@ -10,6 +10,14 @@ + + + + org.alfresco.repo.publishing.youtube.youtube-publishing + + + + diff --git a/source/java/org/alfresco/repo/publishing/AbstractChannelType.java b/source/java/org/alfresco/repo/publishing/AbstractChannelType.java index f3cdef5978..d6dcf33b1e 100644 --- a/source/java/org/alfresco/repo/publishing/AbstractChannelType.java +++ b/source/java/org/alfresco/repo/publishing/AbstractChannelType.java @@ -35,6 +35,7 @@ import org.alfresco.service.namespace.QName; import org.alfresco.util.ParameterCheck; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import org.springframework.extensions.surf.util.I18NUtil; /** * @author Nick Smith @@ -77,6 +78,13 @@ public abstract class AbstractChannelType implements ChannelType, ChannelTypePub this.nodeService = nodeService; } + @Override + public String getTitle() + { + String title = I18NUtil.getMessage("publishing.channel-type." + getId() + ".title"); + return title == null ? getId() : title; + } + /** * {@inheritDoc} */ diff --git a/source/java/org/alfresco/repo/publishing/facebook/facebook-publishing.properties b/source/java/org/alfresco/repo/publishing/facebook/facebook-publishing.properties new file mode 100644 index 0000000000..2170416867 --- /dev/null +++ b/source/java/org/alfresco/repo/publishing/facebook/facebook-publishing.properties @@ -0,0 +1 @@ +publishing.channel-type.facebook.title=Facebook \ No newline at end of file diff --git a/source/java/org/alfresco/repo/publishing/flickr/flickr-publishing.properties b/source/java/org/alfresco/repo/publishing/flickr/flickr-publishing.properties new file mode 100644 index 0000000000..efc55ed550 --- /dev/null +++ b/source/java/org/alfresco/repo/publishing/flickr/flickr-publishing.properties @@ -0,0 +1 @@ +publishing.channel-type.flickr.title=Flickr \ No newline at end of file diff --git a/source/java/org/alfresco/repo/publishing/linkedin/linkedin-publishing.properties b/source/java/org/alfresco/repo/publishing/linkedin/linkedin-publishing.properties new file mode 100644 index 0000000000..74e1cf3d48 --- /dev/null +++ b/source/java/org/alfresco/repo/publishing/linkedin/linkedin-publishing.properties @@ -0,0 +1 @@ +publishing.channel-type.linkedin.title=LinkedIn \ No newline at end of file diff --git a/source/java/org/alfresco/repo/publishing/slideshare/slideshare-publishing.properties b/source/java/org/alfresco/repo/publishing/slideshare/slideshare-publishing.properties new file mode 100644 index 0000000000..6f9930d962 --- /dev/null +++ b/source/java/org/alfresco/repo/publishing/slideshare/slideshare-publishing.properties @@ -0,0 +1 @@ +publishing.channel-type.slideshare.title=SlideShare \ No newline at end of file diff --git a/source/java/org/alfresco/repo/publishing/twitter/twitter-publishing.properties b/source/java/org/alfresco/repo/publishing/twitter/twitter-publishing.properties new file mode 100644 index 0000000000..2b6c4b41c0 --- /dev/null +++ b/source/java/org/alfresco/repo/publishing/twitter/twitter-publishing.properties @@ -0,0 +1 @@ +publishing.channel-type.twitter.title=Twitter \ No newline at end of file diff --git a/source/java/org/alfresco/repo/publishing/youtube/youtube-publishing.properties b/source/java/org/alfresco/repo/publishing/youtube/youtube-publishing.properties new file mode 100644 index 0000000000..8aee7d850a --- /dev/null +++ b/source/java/org/alfresco/repo/publishing/youtube/youtube-publishing.properties @@ -0,0 +1 @@ +publishing.channel-type.youtube.title=YouTube \ No newline at end of file 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 c08ed79753..73dc6b6a1c 100644 --- a/source/java/org/alfresco/service/cmr/publishing/channels/ChannelType.java +++ b/source/java/org/alfresco/service/cmr/publishing/channels/ChannelType.java @@ -40,6 +40,13 @@ public interface ChannelType */ String getId(); + /** + * Returns the title (display name) of this channel type. + * The title may be localised, but this is implementation specific + * @return + */ + String getTitle(); + /** * Each channel is stored in the repository as a node. This operation returns * the qualified name of the type of that node.