info.magnolia.commands.impl
Class ExtractCommentCommand

java.lang.Object
  extended by info.magnolia.commands.MgnlCommand
      extended by info.magnolia.commands.impl.BaseRepositoryCommand
          extended by info.magnolia.commands.impl.ExtractCommentCommand
All Implemented Interfaces:
Command, Cloneable

public class ExtractCommentCommand
extends BaseRepositoryCommand

Extracts comment from the resource and put it in the context. Regular java regex pattern is used for extraction. Using commentTemplate it is possible to format extracted comment info further.


Field Summary
 
Fields inherited from class info.magnolia.commands.MgnlCommand
log
 
Fields inherited from interface info.magnolia.commands.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
ExtractCommentCommand()
           
 
Method Summary
 boolean execute(Context context)
          This is the actual method to be overridden in descendant classes.
 String getCommentTemplate()
           
 void setCommentTemplate(String commentTemplate)
           
 void setPattern(String pattern)
           
 
Methods inherited from class info.magnolia.commands.impl.BaseRepositoryCommand
getJCRNode, getNode, getPath, getRepository, getUuid, release, setPath, setRepository, setUuid
 
Methods inherited from class info.magnolia.commands.MgnlCommand
clone, execute, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractCommentCommand

public ExtractCommentCommand()
Method Detail

execute

public boolean execute(Context context)
                throws Exception
Description copied from class: MgnlCommand
This is the actual method to be overridden in descendant classes.

Specified by:
execute in class MgnlCommand
Throws:
Exception

setPattern

public void setPattern(String pattern)

getCommentTemplate

public String getCommentTemplate()

setCommentTemplate

public void setCommentTemplate(String commentTemplate)


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.