Class Tool

    • Constructor Detail

      • Tool

        public Tool()
    • Method Detail

      • processArgs

        protected org.alfresco.tools.ToolContext processArgs​(String[] args)
                                                      throws org.alfresco.tools.ToolArgumentException
        Process Tool Arguments
        Parameters:
        args - the arguments
        Returns:
        the tool context
        Throws:
        ToolException
        org.alfresco.tools.ToolArgumentException
      • displayHelp

        protected void displayHelp()
        Display Tool Help
      • getToolName

        protected abstract String getToolName()
        Get the tool name
        Returns:
        the tool name
      • logInfo

        protected void logInfo​(String msg)
        Log message
        Parameters:
        msg - message to log
      • logVerbose

        protected void logVerbose​(String msg)
        Log Verbose message
        Parameters:
        msg - message to log
      • logError

        protected void logError​(String msg)
        Log Error message
        Parameters:
        msg - message to log
      • handleError

        protected int handleError​(Throwable e)
        Handle Error Message
        Parameters:
        e - exception
      • exit

        protected void exit​(int status)
        Exit Tool
        Parameters:
        status - status code
      • getApplicationContext

        protected final org.springframework.context.ApplicationContext getApplicationContext()
        Get the Application Context
        Returns:
        the application context
      • getServiceRegistry

        protected final ServiceRegistry getServiceRegistry()
        Get the Repository Service Registry
        Returns:
        the service registry
      • start

        public final void start​(String[] args)
        Tool entry point
        Parameters:
        args - the tool arguments