当前位置: 首页>>代码示例>>Java>>正文


Java Version.getVersion方法代码示例

本文整理汇总了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>&nbsp;&nbsp;
            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;
}
 
开发者ID:Jebasuthan,项目名称:vehiclegps,代码行数:36,代码来源:WebPageAdaptor.java

示例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
    }
        

}
 
开发者ID:Jebasuthan,项目名称:vehiclegps,代码行数:28,代码来源:SystemProps.java


注:本文中的org.opengts.Version.getVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。