Projet esup-ecm

Recherche

Sommaire

Pages enfant
  • Personnaliser les messages des notifications

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

Bloc de code
langxml
<component name="org.esup.notification.service.NotificationContrib">

<require>org.nuxeo.ecm.platform.notification.service.NotificationContrib</require>
<require>org.nuxeo.ecm.platform.comment.workflow.notification.service.NotificationContrib</require>

<extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="notifications">
<!-- first disable defaults notifications => no merge -->
    <notification name="Modification" channel="email" enabled="false">
      <event name="documentModified"/>
    </notification>
    <notification name="Creation" channel="email" enabled="false">
      <event name="documentCreated"/>
    </notification>    

<!-- then declare ours notifications -->

    <notification   name="Esup Modification"
                    channel="email"
                    enabled="true"     
                    availableIn="Workspace"
                    autoSubscribed="false"
                    template="modif"
                    subject="Modification du document ${docTitle}"
                    label="label.nuxeo.notifications.modif">
                <event name="documentModified"/>
    </notification>
        
    <notification   name="Esup Creation"
                    channel="email"
                    enabled="true"
                    availableIn="Workspace"
                    autoSubscribed="false"
                    template="create"
                    subject="Nouveau document"
                    label="label.nuxeo.notifications.create">
        <event name="documentCreated"/>
    </notification>
</extension>
    
<!-- define template files -->
<extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="templates">
    <template name="modif" src="templates/esupNotificationModifDoc.ftl" />
    <template name="create" src="templates/esupNotificationCreateDoc.ftl" /> 
</extension>
</component>
Info

Cette configuration va créer de nouvelles notifications et désactiver celles par défaut de Nuxeo. Il faut donc de s'abonner aux nouvelles notifications. Si on était abonnés aux anciennes, on ne les recevra plus !