public static void validateResolve(Action action) { if (action == null) { throw new ValidationException("Action is mandatory but was not provided."); } if (action.getResolutionType() == null) { throw new ValidationException("Parameter 'resolution_type' is mandatory but was not provided."); } }
@Override public Response resolve(Action action) { validateParameters(action, "resolutionType"); ResolutionType resolutionType = EnumValidator.validateEnum(ResolutionType.class, action.getResolutionType(), true); switch (resolutionType) { case ADD: return addToMissingServers(action); case COPY: return copy(action); default: return null; } }
to.setResolutionType(from.getResolutionType());