本文整理汇总了Java中org.opengts.Version.getVersion方法的典型用法代码示例。如果您正苦于以下问题:Java Version.getVersion方法的具体用法?Java Version.getVersion怎么用?Java Version.getVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opengts.Version
的用法示例。
在下文中一共展示了Version.getVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPageNavigationHTML
import org.opengts.Version; //导入方法依赖的package包/类
public String getPageNavigationHTML(RequestProperties reqState, boolean reInit)
{
if ((reInit || (this.pageNavHTML == null)) && this.hasPageNavigation()) {
String pageNavNames[] = this.getPageNavigation();
PrivateLabel privLbl = this.getPrivateLabel();
if (privLbl == null) {
Print.logWarn("Page Navigation PrivateLabel undefined: " + this.getPageName());
this.pageNavHTML = "";
} else {
// <a href="/track/Track?page=menu.top">Main Menu</a> |
// <a href="/track/Track?page=login">Logout</a>
StringBuffer sb = new StringBuffer();
for (int i = pageNavNames.length - 1; i >= 0; i--) {
String pageName = pageNavNames[i];
WebPage page = privLbl.getWebPage(pageName);
if (page != null) {
if (sb.length() > 0) { sb.append(" | "); }
String uri = WebPageAdaptor.EncodeURL(reqState, page.getPageURI());
String desc = page.getNavigationDescription(reqState);
sb.append("<a href='"+uri+"'>").append(desc).append("</a>");
} else {
String vers = Version.getVersion();
String plName = privLbl.getName();
Print.logWarn("Page not found: " + pageName + " [v="+vers+", pl="+plName+"]");
//Print.logStackTrace("Page not found: " + pageName + " [v="+vers+", pl="+plName+"]");
}
}
this.pageNavHTML = sb.toString();
}
//Print.logStackTrace("Setting Navigation HTML: " + this.pageNavHTML);
} else {
//Print.logStackTrace("Returning Previous Navigation HTML: " + this.pageNavHTML);
}
return this.pageNavHTML;
}
示例2: updateVersions
import org.opengts.Version; //导入方法依赖的package包/类
public static void updateVersions()
{
/* OpenGTS version */
String gtsCurrVersion = Version.getVersion();
String gtsPropVersion = SystemProps.getGTSVersion();
if (!gtsCurrVersion.equals(gtsPropVersion)) {
Print.logInfo("Updating GTS Version: " + gtsCurrVersion);
SystemProps.setStringValue(SystemProps.GTS_VERSION, gtsCurrVersion);
}
/* OpenDMTP version */
try {
// lazily bind to OpenDMTP Version, in case it is not included in this installation
MethodAction dmtpVersMeth = new MethodAction("org.opendmtp.server.Version", "getVersion");
String dmtpCurrVersion = (String)dmtpVersMeth.invoke();
String dmtpPropVersion = SystemProps.getDMTPVersion();
if (!dmtpCurrVersion.equals(dmtpPropVersion)) {
Print.logInfo("Updating DMTP Version: " + dmtpCurrVersion);
SystemProps.setStringValue(SystemProps.DMTP_VERSION, dmtpCurrVersion);
}
} catch (Throwable th) {
// ignore
}
}