Class CmdUtil

  • All Implemented Interfaces:
    CmdUtilProperties, CmdUtilMBean, org.bedework.util.jmx.BaseMBean, org.bedework.util.jmx.ConfBaseMBean, org.bedework.util.logging.Logged

    public class CmdUtil
    extends org.bedework.util.jmx.ConfBase<CmdUtilPropertiesImpl>
    implements CmdUtilMBean
    Utility to execute various operations specified by commands.

    Takes one or more lines of input specifying the action. Lines starting with "#" are treated as comments. Non-comment lines are:

     create category val
     

    Creates a category. val must be quoted if it contains non-work characters.

     create collection (folder| calendar) parent-path name
                [filter=qfexpr] (category=cat)* [owner]
     create collection alias parent-path name alias-target
                [filter=qfexpr] (category=cat)* [owner]
     

    Creates a folder or calendar collection under the given parent with the given name and optional owner.

    qfexpr is a quoted filter expression.

     list categories val*
     

    List categories. If no val is supplied all categories are listed. Any supplied values are matched against the categories. Any case insignificant match results in the category being listed.

       move events [addcats] from to category*
     

    where from and to are possibly quoted paths, e.g. /public/Arts/Dance and category* is 0 or more possibly quoted categories to set on the entities events as they are moved.

    If addcats is specified the events will have categories set derived from the from path. e.g. if from="/public/Arts/Dance" then the event will have categories "Arts" and "Dance" (which must exist)

       stop
     

    Terminate the utility

    Author:
    douglm
    • Field Summary

      • Fields inherited from class org.bedework.util.jmx.ConfBase

        cfg, statusDone, statusFailed, statusInterrupted, statusRunning, statusStopped, statusTimedout, statusUnknown
    • Constructor Summary

      Constructors 
      Constructor Description
      CmdUtil()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String exec​(String cmd)
      Execute a single command.
      String execfile​(String path)
      Execute commands from a file.
      String getAccount()  
      String getDataOut()  
      static String getServiceName​(String name)  
      boolean getSuperUser()  
      String loadConfig()  
      void setAccount​(String val)  
      void setDataOut​(String val)  
      void setSuperUser​(boolean val)  
      • Methods inherited from class org.bedework.util.jmx.ConfBase

        createObjectName, getConfig, getConfigInfo, getConfigInfo, getConfigInfo, getConfigName, getConfigPname, getConfigUri, getLogger, getManagementContext, getPathSuffix, getRegisteredMBeans, getServiceName, getServiceObjectName, getStatus, getStore, isRunning, loadConfig, loadOnlyConfig, makeObject, register, register, saveConfig, setConfigName, setConfigPname, setConfigUri, setPathSuffix, setServiceName, setStatus, setStore, start, stop, unregister, unregister
      • Methods inherited from interface org.bedework.util.jmx.BaseMBean

        getServiceName, isRunning, start, stop
      • Methods inherited from interface org.bedework.util.jmx.ConfBaseMBean

        getConfigName, getStatus, saveConfig, setConfigName, setStatus
      • Methods inherited from interface org.bedework.util.logging.Logged

        audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn