class StringComplexFieldActions implements AtlasFieldAction {

    @AtlasActionProcessor
    public static String padStringLeft(PadStringLeft padStringLeft, String input) {
        if (padStringLeft == null || padStringLeft.getPadCharacter() == null
                || padStringLeft.getPadCount() == null) {
            throw new IllegalArgumentException("PadStringLeft must be specified with padCharacter and padCount");
        }

        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < padStringLeft.getPadCount(); i++) {
            builder.append(padStringLeft.getPadCharacter());
        }
        if (input != null) {
            builder.append(input);
        }

        return builder.toString();
    }

}