<?xml version="1.0" encoding="UTF-8"?>
<!--
- Licensed Materials - Property of IBM* and/or HCL**
- UrbanCode Deploy
- UrbanCode Build
- UrbanCode Release
- AnthillPro
- (c) Copyright IBM Corporation 2011, 2017. All Rights Reserved.
- (c) Copyright HCL Technologies Ltd. 2018. All Rights Reserved.
-
- U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by
- GSA ADP Schedule Contract with IBM Corp.
-
- * Trademark of International Business Machines
- ** Trademark of HCL Technologies Limited
-->
<plugin xmlns="http://www.urbancode.com/PluginXMLSchema_v1"
    xmlns:server="http://www.urbancode.com/PluginServerXMLSchema_v1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <header>
    <identifier id="com.urbancode.air.plugin.source.fileSystemVersioned" name="File System (Versioned)" version="24"/>
    <description>
      The File System (Versioned) plug-in automates uploading artifacts from a versioned file system.
    </description>
    <tag>Source and Repositories/File System Versioned</tag>
    <server:plugin-type>Source</server:plugin-type>
  </header>
  <step-type name="Import Version">
    <description>Description</description>
    <properties>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${PLUGIN_HOME}/javawrapper.sh">
      <arg value="-jar"/>
      <arg file="FileSystemVersionedSourceConfig.jar"/>
      <arg value="ImportVersion"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>
  <!-- ==================================== -->
  <!--   Properties                         -->
  <!-- ==================================== -->
  <server:property-group type="Component" name="FileSystemVersionedComponentProperties">
    <server:property name="basePath" required="true">
      <server:property-ui type="textBox"
                          label="Base Path"
                          description="The path to the directory that contains the artifacts. The content of each subdirectory within the base directory is considered a distinct component version. The subdirectory with the most recent timestamp is considered to be the latest 
						  version."
                          placeholder= "/home/user/components"/>
    </server:property>
    <server:property name="saveFileExecuteBits">
      <server:property-ui type="checkBox"
                          label="Preserve Execute Permissions"
                          description="For Linux and UNIX operating systems, enable this property
                          to retain the execute permissions for each file." />
    </server:property>
    <server:property name="extensions">
      <server:property-ui type="textBox"
                          label="Text File Extensions"
                          description="A list of file extensions to convert into another character set. Separate each fle extension with a common. Specify this property if you have text-type files that must be converted into another character set. Matching file
                          types are converted into the default character set of the system where the agent is located."
                          placeholder=".txt,.log,.properties." />
    </server:property>
    <server:property name="includes" required="false">
      <server:property-ui type="textAreaBox"
                          label="Include Files"
                          description="A list of files to include in the version upload. Separate each file with a comma or newline character.The default setting is to uploads all files. You can use the asterisk or double-asterisk as wildcards to expand the number of files to upload. Specifying 
                          **/* uploads all files."
                          placeholder="**/*" />
    </server:property>
    <server:property name="excludes">
      <server:property-ui type="textAreaBox"
                          label="Exclude Files"
                          description="A list of files to exclude in the version upload. Separate each file with a comma or place on a 
						  separate line." />
    </server:property>
  </server:property-group>
</plugin>
