<?xml version="1.0" encoding="UTF-8"?>
<meta id="simple_lock" label="CONF_MESSAGE[Simple Lock]" description="CONF_MESSAGE[Manual Locking mechanism to avoid concurrent edition]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
    <class_definition filename="plugins/meta.simple_lock/SimpleLockManager.php" classname="Pydio\Access\Meta\Lock\SimpleLockManager"/>
   	<client_settings icon="plugins/access.mysql/resources/images/mysql_icon.png">
   		<resources>
   			<i18n namespace="meta.simple_lock" path="plugins/meta.simple_lock/i18n" />
            <js className="LockActions" file="plugins/meta.simple_lock/res/build/LockActions.js"/>
        </resources>
   	</client_settings>
   	<registry_contributions>
   		<hooks>
   			<serverCallback hookName="node.info.nocache" methodName="processLockMeta"/>
   			<serverCallback hookName="node.before_change" methodName="checkFileLock"/>
   			<serverCallback hookName="node.before_path_change" methodName="checkFileLock"/>
   		</hooks>
        <actions>
            <action name="sl_lock">
                <gui src="meta_simple_lock/ICON_SIZE/lock.png" iconClass="icon-lock" text="meta.simple_lock.1" title="meta.simple_lock.2">
                    <context dir="false" recycle="false" selection="true" contextMenu="true" actionBar="true"
                             actionBarGroup="change" />
                    <selectionContext dir="false" file="true" recycle="false" unique="true"/>
                </gui>
                <rightsContext adminOnly="false" noUser="false" read="true" userLogged="true" write="true"/>
                <processing>
                    <clientCallback module="LockActions.Callbacks.toggleLock"/>
                    <clientListener module="LockActions.Listeners.selectionChange" name="selectionChange"/>
                    <serverCallback methodName="applyChangeLock" restParams="/file+" developerComment="Lock/Unlock a file for usage by other users.">
                        <input_param name="file" type="path" description="Path to the file to lock"/>
                        <input_param name="unlock" type="boolean" description="If set to true, will unlock the file"/>
                    </serverCallback>
                </processing>
            </action>
        </actions>
    </registry_contributions>
</meta>
