From: <mol...@us...> - 2011-01-04 11:26:02
|
Revision: 3211 http://openutils.svn.sourceforge.net/openutils/?rev=3211&view=rev Author: molaschi Date: 2011-01-04 11:25:56 +0000 (Tue, 04 Jan 2011) Log Message: ----------- MEDIA-198 Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/commands/MediaDeactivationCommand.java trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.adminInterface.commands.media.deactivate.xml Added: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/commands/MediaDeactivationCommand.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/commands/MediaDeactivationCommand.java (rev 0) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/commands/MediaDeactivationCommand.java 2011-01-04 11:25:56 UTC (rev 3211) @@ -0,0 +1,32 @@ +package net.sourceforge.openutils.mgnlmedia.media.commands; + +import info.magnolia.commands.CommandsManager; +import info.magnolia.context.Context; +import info.magnolia.module.admininterface.commands.BaseRepositoryCommand; +import net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl; + +import org.apache.commons.chain.Command; + + +/** + * @author molaschi + * @version $Id: $ + */ +public class MediaDeactivationCommand extends BaseRepositoryCommand +{ + + /** + * {@inheritDoc} + */ + @Override + public boolean execute(Context context) throws Exception + { + if (!MediaEl.module().isSingleinstance()) + { + Command cmd = CommandsManager.getInstance().getCommand(CommandsManager.DEFAULT_CATALOG, "deactivate"); + return cmd.execute(context); + } + return true; + } + +} Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.adminInterface.commands.media.deactivate.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.adminInterface.commands.media.deactivate.xml (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media-nooverwrite/config.modules.adminInterface.commands.media.deactivate.xml 2011-01-04 11:25:56 UTC (rev 3211) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="deactivate" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>099b2eba-442d-4104-9d80-4a111b1fc0f9</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.commands.MediaDeactivationCommand</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2011-01-04T12:06:31.789+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-01-04T12:16:57.641+01:00</sv:value> + </sv:property> + </sv:node> +</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |