Skip to content

Commit

Permalink
added scheduled task template for archiving
Browse files Browse the repository at this point in the history
  • Loading branch information
rkreich committed Feb 16, 2014
1 parent 1977af5 commit ad3a366
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions tests/standAloneClient/scheduledTaskProfiles/24MonthsArchive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<variables>
<variable name="partnerId">{prompt:Partner ID:}</variable>
<variable name="metadataProfileId">{prompt:Metadata profile:}</variable>
<variable name="archiveCategoryId">{prompt:Archive Category ID:}</variable>
</variables>
<config>
<serviceUrl>http://{prompt:Host name:}/</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 />
<!-- 24 Months Archive -->
<request service="scheduledTaskProfile" action="add" plugin="scheduledTask" partnerId="{variable:partnerId}">
<scheduledTaskProfile objectType="KalturaScheduledTaskProfile">
<name>24 Months Archive</name>
<objectFilterEngineType>1</objectFilterEngineType>
<objectFilter objectType="KalturaMediaEntryFilter">
<createdAtLessThanOrEqual>{php:return -24*30*24*60*60;}</createdAtLessThanOrEqual>
<advancedSearch objectType="KalturaSearchOperator">
<type>1</type>
<items objectType="array">
<item objectType="KalturaMetadataSearchItem">
<metadataProfileId>{variable:metadataProfileId}</metadataProfileId>
<type>1</type>
<items objectType="array">
<item objectType="KalturaSearchCondition">
<field>/*[local-name()='metadata']/*[local-name()='ArchiveStatus']</field>
<value>Not Archived</value>
</item>
</items>
</item>
</items>
</advancedSearch>
</objectFilter>
<objectTasks objectType="array">
<item objectType="KalturaExecuteMetadataXsltObjectTask">
<metadataProfileId>{variable:metadataProfileId}</metadataProfileId>
<metadataObjectType>1</metadataObjectType><!-- ENTRY -->
<xslt>
<![CDATA[
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="utf-8" indent="no"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="ArchiveStatus" />
<xsl:template match="metadata">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
<ArchiveStatus>Archived</ArchiveStatus>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
]]>
</xslt>
</item>
<item objectType="KalturaModifyCategoriesObjectTask">
<addRemoveType>2</addRemoveType><!-- REMOVE -->
</item>
<item objectType="KalturaModifyCategoriesObjectTask">
<addRemoveType>1</addRemoveType><!-- ADD -->
<categoryIds objectType="array">
<item objectType="KalturaIntegerValue">
<value>{variable:archiveCategoryId}</value>
</item>
</categoryIds>
</item>
</objectTasks>
</scheduledTaskProfile>
</request>
</xml>

0 comments on commit ad3a366

Please sign in to comment.