Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #8896 #669

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
</profiles>
<parameters>
<parameter>
<!-- the name of the parameter is defined by the ResourceSubscriptionService interface as it
is used to automatically listen any value change of this parameter -->
<name>useSubscription</name>
<label>
<message lang="fr">Gestion de l'abonnement</message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.silverpeas.core.contribution.content.wysiwyg.notification.WysiwygEvent;
import org.silverpeas.core.node.model.NodePK;
import org.silverpeas.core.notification.system.CDIResourceEventListener;
import org.silverpeas.core.subscription.ResourceSubscriptionService;

import javax.inject.Inject;

Expand All @@ -56,8 +57,8 @@ private void notifyUsersAboutChange(WysiwygContent content) {
String componentId = content.getContribution().getContributionId().getComponentInstanceId();

// If parameter useSubscription is used
if ("yes".equals(
organisationController.getComponentParameterValue(componentId, "useSubscription"))) {
if ("yes".equals(organisationController.getComponentParameterValue(componentId,
ResourceSubscriptionService.Constants.SUBSCRIPTION_PARAMETER))) {
if (isAboutWebPage(content)) {
WebPagesUserNotifier.notify(new NodePK("0", componentId), userId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.silverpeas.core.index.indexing.model.FullIndexEntry;
import org.silverpeas.core.index.indexing.model.IndexEngineProxy;
import org.silverpeas.core.node.model.NodePK;
import org.silverpeas.core.subscription.ResourceSubscriptionService;
import org.silverpeas.core.subscription.SubscriptionService;
import org.silverpeas.core.subscription.SubscriptionServiceProvider;
import org.silverpeas.core.subscription.service.ComponentSubscription;
Expand Down Expand Up @@ -122,7 +123,8 @@ private SubscriptionService getSubscribeService() {
* @return boolean
*/
public boolean isSubscriptionUsed() {
return StringUtil.getBooleanValue(getComponentParameterValue("useSubscription"));
return StringUtil.getBooleanValue(
getComponentParameterValue(ResourceSubscriptionService.Constants.SUBSCRIPTION_PARAMETER));
}

/*
Expand Down