Class ArgumentHelper

java.lang.Object
org.alfresco.util.ArgumentHelper

public class ArgumentHelper extends Object
Utility class to assist in extracting program arguments.
Since:
V2.1-A
Author:
Derek Hulley
  • Constructor Details

    • ArgumentHelper

      public ArgumentHelper(String usage, String[] args)
  • Method Details

    • ripArgs

      public static Map<String,String> ripArgs(String... args)
    • getStringValue

      public String getStringValue(String arg, boolean mandatory, boolean nonEmpty)
      Throws:
      IllegalArgumentException - if the argument doesn't match the requirements.
    • getIntegerValue

      public int getIntegerValue(String arg, boolean mandatory, int minValue, int maxValue)
      Returns:
      Returns the value assigned or the minimum value if the parameter was not present
      Throws:
      IllegalArgumentException - if the argument doesn't match the requirements.
    • printUsage

      public void printUsage()