class StringComplexFieldActions implements AtlasFieldAction {

    @AtlasActionProcessor
    public static String subString(SubString subString, String input) {
        if (input == null || input.length() == 0) {
            return input;
        }

        if (subString == null || subString.getStartIndex() == null || subString.getStartIndex() < 0) {
            throw new IllegalArgumentException("SubString action must be specified with a positive startIndex");
        }

        return doSubString(input, subString.getStartIndex(), subString.getEndIndex());
    }

}