private void showVersion(boolean server, boolean client, boolean protocol) {
if (versionRequest == null) {
versionRequest = new VersionRequest();
}
VersionBean versionBean =
versionRequest.doGet(Environment.getServerUrl());
MessageFormat msg;
String s;
if (server) {
s = MessageFormat.format(getResource().getString(Constants
.RES_SHOW_PROMPT_VERSION_CLIENT_SERVER), Constants.OPT_SERVER,
versionBean.getVersion(), versionBean.getRevision(),
versionBean.getUser(), versionBean.getDate());
io.out.println(StringEscapeUtils.unescapeJava(s));
}
if (client) {
s = MessageFormat.format(getResource().getString(Constants
.RES_SHOW_PROMPT_VERSION_CLIENT_SERVER), Constants.OPT_CLIENT,
versionBean.getVersion(), versionBean.getRevision(),
versionBean.getUser(), versionBean.getDate());
io.out.println(StringEscapeUtils.unescapeJava(s));
}
if (protocol) {
s = MessageFormat.format(getResource().getString(Constants
.RES_SHOW_PROMPT_VERSION_PROTOCOL), Arrays.toString(versionBean.
getProtocols()));
io.out.println(StringEscapeUtils.unescapeJava(s));
}
io.out.println();