}else{
throw new ParseException(ParseException.ERR_NO_F_OR_L_OR_D);
}
//-u
StringParam uOption = (StringParam) cmdLineHandler.getOption(ConcatParsedCommand.U_ARG);
//if it's set we proceed with validation
if (uOption.isSet()){
String[] selections = StringUtils.split(uOption.getValue(), ":");
String[] trimmedSelection = new String[selections.length];
for(int i = 0; i<selections.length; i++){
trimmedSelection[i] = selections[i].trim();
}
ValidationUtility.assertValidPageSelectionsArray(trimmedSelection);
parsedCommandDTO.setPageSelections(trimmedSelection);
}
//-copyfields
parsedCommandDTO.setCopyFields(((BooleanParam) cmdLineHandler.getOption(ConcatParsedCommand.COPYFIELDS_ARG)).isTrue());
//-r
StringParam rOption = (StringParam) cmdLineHandler.getOption(ConcatParsedCommand.R_ARG);
if(rOption.isSet()){
PageRotation[] rotations = ValidationUtility.getPagesRotation(rOption.getValue());
parsedCommandDTO.setRotations(rotations);
}
}else{
throw new ConsoleException(ConsoleException.CMD_LINE_HANDLER_NULL);
}