forked from jessp01/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added scheduled task template for archiving
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
tests/standAloneClient/scheduledTaskProfiles/24MonthsArchive.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> | ||
<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> |