class StringComplexFieldActions implements AtlasFieldAction {

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

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

        return builder.toString();
    }

}