return new RequestParameterVersionAll();
} else if (value.startsWith(RequestParameterVersion.VersionChanges)) {
try {
return new RequestParameterVersionChanges(Integer.parseInt(value.substring(RequestParameterVersion.VersionChanges.length())));
} catch (NumberFormatException e) {
throw new WikiRequestException(WikiRequestException.InvalidParameterValue, parameter.toString());
}
} else {
try {
return new RequestParameterVersionSingle(Integer.parseInt(value));
} catch (NumberFormatException e) {
throw new WikiRequestException(WikiRequestException.InvalidParameterValue, parameter.toString());
}
}
} else {
throw new WikiRequestException(WikiRequestException.MissingParameterValue, parameter.toString());
}
} else {
return new RequestParameterVersionCurrent();
}
}