-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6555 from kaltura/Mercury-13.10.0-SUP-13055
SUP-13055: define http notification which is sent when entry which is not recorded is replaced
- Loading branch information
Showing
3 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...yment/updates/scripts/2017_12_19_deploy_not_recorded_entry_replaced_http_notification.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* @package deployment | ||
*/ | ||
require_once (__DIR__ . '/../../bootstrap.php'); | ||
|
||
$script = realpath(dirname(__FILE__) . "/../../../tests/standAloneClient/exec.php"); | ||
|
||
$newTemplateUpdate = realpath(dirname(__FILE__) . "/../../updates/scripts/xml/2017_12_19_notRecordedEntryReplaced.xml"); | ||
|
||
if(!file_exists($newTemplateUpdate) || !file_exists($script)) | ||
{ | ||
KalturaLog::err("Missing update script file"); | ||
return; | ||
} | ||
|
||
passthru("php $script $newTemplateUpdate"); |
77 changes: 77 additions & 0 deletions
77
deployment/updates/scripts/xml/2017_12_19_notRecordedEntryReplaced.template.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xml> | ||
<config> | ||
<serviceUrl>@SERVICE_URL@</serviceUrl> | ||
<partnerId>-2</partnerId> | ||
<clientTag>Stand alone php 1.0.0</clientTag> | ||
<curlTimeout>30</curlTimeout> | ||
<userAgent>Stand alone php 1.0.0</userAgent> | ||
</config> | ||
<session> | ||
<partnerId>-2</partnerId> | ||
<secret>@ADMIN_CONSOLE_PARTNER_ADMIN_SECRET@</secret> | ||
<sessionType>2</sessionType> | ||
</session> | ||
<multirequest> | ||
<request service="eventNotificationTemplate" action="add" plugin="eventNotification" partnerId="0"> | ||
<template objectType="KalturaHttpNotificationTemplate"> | ||
<name>Not Recorded Entry Content Replaced</name> | ||
<systemName>Not_Recorded_Entry_Content_Replaced</systemName> | ||
<description>Email notification template to be sent when a entry content which is not recorded replaced successfully.</description> | ||
<automaticDispatchEnabled>1</automaticDispatchEnabled> | ||
<eventType>12</eventType> <!-- EventNotificationEventType::OBJECT_REPLACED --> | ||
<eventObjectType>1</eventObjectType> <!-- EventNotificationEventObjectType::ENTRY --> | ||
<eventConditions objectType="array"> | ||
<item objectType="KalturaFieldMatchCondition"> | ||
<description>source_type_not_recorded_live</description> | ||
<not>1</not> | ||
<field objectType="KalturaEvalStringField"> | ||
<code>$scope->getObject()->getSourceType()</code> | ||
</field> | ||
<values objectType="array"> | ||
<item objectType="KalturaStringValue"> | ||
<value>36</value> | ||
</item> | ||
</values> | ||
</item> | ||
</eventConditions> | ||
<contentParameters objectType="array"> | ||
<item objectType="KalturaEventNotificationParameter"> | ||
<key>entry_id</key> | ||
<description>Entry ID</description> | ||
<value objectType="KalturaEvalStringField"> | ||
<code>$scope->getObject()->getId()</code> | ||
</value> | ||
</item> | ||
<item objectType="KalturaEventNotificationParameter"> | ||
<key>entry_name</key> | ||
<description>Entry name</description> | ||
<value objectType="KalturaEvalStringField"> | ||
<code>$scope->getObject()->getName()</code> | ||
</value> | ||
</item> | ||
<item objectType="KalturaEventNotificationParameter"> | ||
<key>entry_status</key> | ||
<description>Entry status</description> | ||
<value objectType="KalturaEvalStringField"> | ||
<code>$scope->getObject()->getStatus()</code> | ||
</value> | ||
</item> | ||
<item objectType="KalturaEventNotificationParameter"> | ||
<key>entry_reference_id</key> | ||
<description>Entry reference ID</description> | ||
<value objectType="KalturaEvalStringField"> | ||
<code>$scope->getObject()->getReferenceID()</code> | ||
</value> | ||
</item> | ||
</contentParameters> | ||
<method>2</method> <!-- KalturaHttpNotificationMethod::POST --> | ||
</template> | ||
</request> | ||
<request service="eventNotificationTemplate" action="updateStatus" plugin="eventNotification" partnerId="0"> | ||
<id>{1:result:id}</id> | ||
<status>1</status><!-- EventNotificationTemplateStatus::DISABLED --> | ||
</request> | ||
</multirequest> | ||
</xml> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters