Commit 3f03a7ed authored by Nicolas Delaby's avatar Nicolas Delaby

add alert code configuration

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15495 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1a003532
...@@ -45,6 +45,7 @@ from XMLSyncUtils import Parse ...@@ -45,6 +45,7 @@ from XMLSyncUtils import Parse
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from PublicationSynchronization import PublicationSynchronization from PublicationSynchronization import PublicationSynchronization
from SubscriptionSynchronization import SubscriptionSynchronization from SubscriptionSynchronization import SubscriptionSynchronization
from SyncCode import SyncCode
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager from AccessControl.SecurityManagement import noSecurityManager
...@@ -206,7 +207,7 @@ class SynchronizationTool( SubscriptionSynchronization, ...@@ -206,7 +207,7 @@ class SynchronizationTool( SubscriptionSynchronization,
xml_mapping, conduit, gpg_key, xml_mapping, conduit, gpg_key,
synchronization_id_generator=None, gid_generator=None, synchronization_id_generator=None, gid_generator=None,
media_type=None, login=None, password=None, media_type=None, login=None, password=None,
RESPONSE=None, activity_enabled=False): RESPONSE=None, activity_enabled=False, alert_code=SyncCode.TWO_WAY):
""" """
XXX should be renamed as addSubscription XXX should be renamed as addSubscription
create a new subscription create a new subscription
...@@ -220,7 +221,7 @@ class SynchronizationTool( SubscriptionSynchronization, ...@@ -220,7 +221,7 @@ class SynchronizationTool( SubscriptionSynchronization,
destination_path, source_uri, target_uri, query, destination_path, source_uri, target_uri, query,
xml_mapping, conduit, gpg_key, xml_mapping, conduit, gpg_key,
synchronization_id_generator, gid_generator, media_type, synchronization_id_generator, gid_generator, media_type,
login, password, activity_enabled) login, password, activity_enabled, alert_code)
folder._setObject( new_id, sub ) folder._setObject( new_id, sub )
#if len(self.list_subscriptions) == 0: #if len(self.list_subscriptions) == 0:
# self.list_subscriptions = PersistentMapping() # self.list_subscriptions = PersistentMapping()
...@@ -264,7 +265,7 @@ class SynchronizationTool( SubscriptionSynchronization, ...@@ -264,7 +265,7 @@ class SynchronizationTool( SubscriptionSynchronization,
def manage_editSubscription(self, title, publication_url, subscription_url, def manage_editSubscription(self, title, publication_url, subscription_url,
destination_path, source_uri, target_uri, query, xml_mapping, conduit, destination_path, source_uri, target_uri, query, xml_mapping, conduit,
gpg_key, synchronization_id_generator, gid_generator, media_type=None, gpg_key, synchronization_id_generator, gid_generator, media_type=None,
login='', password='', RESPONSE=None, activity_enabled=False): login='', password='', RESPONSE=None, activity_enabled=False, alert_code=SyncCode.TWO_WAY):
""" """
modify a subscription modify a subscription
""" """
...@@ -285,6 +286,8 @@ class SynchronizationTool( SubscriptionSynchronization, ...@@ -285,6 +286,8 @@ class SynchronizationTool( SubscriptionSynchronization,
sub.setMediaType(media_type) sub.setMediaType(media_type)
sub.setLogin(login) sub.setLogin(login)
sub.setPassword(password) sub.setPassword(password)
sub.setAlertCode(alert_code)
if RESPONSE is not None: if RESPONSE is not None:
RESPONSE.redirect('manageSubscriptions') RESPONSE.redirect('manageSubscriptions')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment