mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
ACE-4174: Add concept of hidden channels to ChannelService and mark old core social publishing channels as hidden by default.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@114759 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
<bean id="facebookDeliveryChannelType" class="org.alfresco.repo.publishing.facebook.FacebookChannelType" parent="baseChannelType">
|
<bean id="facebookDeliveryChannelType" class="org.alfresco.repo.publishing.facebook.FacebookChannelType" parent="baseChannelType">
|
||||||
<property name="publishingHelper" ref="facebookPublishingHelper" />
|
<property name="publishingHelper" ref="facebookPublishingHelper" />
|
||||||
|
<property name="hidden" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="facebookPublishingHelper" class="org.alfresco.repo.publishing.facebook.FacebookPublishingHelper">
|
<bean id="facebookPublishingHelper" class="org.alfresco.repo.publishing.facebook.FacebookPublishingHelper">
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
<property name="taggingService" ref="TaggingService" />
|
<property name="taggingService" ref="TaggingService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
<property name="contentService" ref="ContentService" />
|
||||||
<property name="flickrHelper" ref="flickrPublishingHelper" />
|
<property name="flickrHelper" ref="flickrPublishingHelper" />
|
||||||
|
<property name="hidden" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="flickrPublishingHelper" class="org.alfresco.repo.publishing.flickr.FlickrPublishingHelper">
|
<bean id="flickrPublishingHelper" class="org.alfresco.repo.publishing.flickr.FlickrPublishingHelper">
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
<bean id="linkedInDeliveryChannelType" class="org.alfresco.repo.publishing.linkedin.LinkedInChannelType" parent="baseChannelType">
|
<bean id="linkedInDeliveryChannelType" class="org.alfresco.repo.publishing.linkedin.LinkedInChannelType" parent="baseChannelType">
|
||||||
<property name="nodeService" ref="NodeService" />
|
<property name="nodeService" ref="NodeService" />
|
||||||
<property name="connectionFactory" ref="linkedinConnectionFactory" />
|
<property name="connectionFactory" ref="linkedinConnectionFactory" />
|
||||||
|
<property name="hidden" value="true" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="linkedinConnectionFactory" class="org.alfresco.repo.publishing.linkedin.springsocial.connect.LinkedInConnectionFactory">
|
<bean id="linkedinConnectionFactory" class="org.alfresco.repo.publishing.linkedin.springsocial.connect.LinkedInConnectionFactory">
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
<property name="publishingHelper" ref="slidesharePublishingHelper" />
|
<property name="publishingHelper" ref="slidesharePublishingHelper" />
|
||||||
<property name="taggingService" ref="TaggingService" />
|
<property name="taggingService" ref="TaggingService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
<property name="contentService" ref="ContentService" />
|
||||||
|
<property name="hidden" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
<constructor-arg value="IdJ8j5Bx8MKYWWVNl4T98rNECSEDbqnBPIoAw1sIPyc" />
|
<constructor-arg value="IdJ8j5Bx8MKYWWVNl4T98rNECSEDbqnBPIoAw1sIPyc" />
|
||||||
</bean>
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="hidden" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -26,5 +26,6 @@
|
|||||||
<property name="taggingService" ref="TaggingService" />
|
<property name="taggingService" ref="TaggingService" />
|
||||||
<property name="contentService" ref="ContentService" />
|
<property name="contentService" ref="ContentService" />
|
||||||
<property name="youTubeHelper" ref="youtubePublishingHelper" />
|
<property name="youTubeHelper" ref="youtubePublishingHelper" />
|
||||||
|
<property name="hidden" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -46,6 +46,7 @@ public abstract class AbstractChannelType implements ChannelType, ChannelTypePub
|
|||||||
private NodeService nodeService;
|
private NodeService nodeService;
|
||||||
private ChannelService channelService;
|
private ChannelService channelService;
|
||||||
private MetadataEncryptor encryptor;
|
private MetadataEncryptor encryptor;
|
||||||
|
private boolean hidden = false;
|
||||||
|
|
||||||
public void setChannelService(ChannelService channelService)
|
public void setChannelService(ChannelService channelService)
|
||||||
{
|
{
|
||||||
@@ -197,4 +198,15 @@ public abstract class AbstractChannelType implements ChannelType, ChannelTypePub
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHidden()
|
||||||
|
{
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setHidden(boolean hidden)
|
||||||
|
{
|
||||||
|
this.hidden = hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,15 @@ public class ChannelServiceImpl implements ChannelService
|
|||||||
*/
|
*/
|
||||||
public List<ChannelType> getChannelTypes()
|
public List<ChannelType> getChannelTypes()
|
||||||
{
|
{
|
||||||
return new ArrayList<ChannelType>(channelTypes.values());
|
List<ChannelType> result = new ArrayList<ChannelType>();
|
||||||
|
for (ChannelType channelType : channelTypes.values())
|
||||||
|
{
|
||||||
|
if (!channelType.isHidden())
|
||||||
|
{
|
||||||
|
result.add(channelType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -53,7 +53,7 @@ public interface ChannelService
|
|||||||
ChannelType getChannelType(String id);
|
ChannelType getChannelType(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve all the registered channel types
|
* Retrieve all the registered channel types, excluding any that are hidden
|
||||||
* @return A list of ChannelType objects, each representing a channel type registered with this channel service
|
* @return A list of ChannelType objects, each representing a channel type registered with this channel service
|
||||||
*/
|
*/
|
||||||
@NotAuditable
|
@NotAuditable
|
||||||
|
@@ -160,4 +160,16 @@ public interface ChannelType
|
|||||||
* @return The resource that represents the requested icon if available. <code>null</code> otherwise.
|
* @return The resource that represents the requested icon if available. <code>null</code> otherwise.
|
||||||
*/
|
*/
|
||||||
Resource getIcon(String size);
|
Resource getIcon(String size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If a channel type is hidden then it doesn't appear in the list returned by {@link ChannelService#getChannelTypes()}
|
||||||
|
* @param hidden
|
||||||
|
*/
|
||||||
|
void setHidden(boolean hidden);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If a channel type is hidden then it doesn't appear in the list returned by {@link ChannelService#getChannelTypes()}
|
||||||
|
* @param hidden
|
||||||
|
*/
|
||||||
|
boolean isHidden();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user