Package org.g4studio.core.properties

Examples of org.g4studio.core.properties.PropertiesHelper


   *            参数对象(入参、出参)
   * @throws PrcException
   *             存储过程调用异常
   */
  public void callPrc(String prcName, Dto prcDto) throws PrcException {
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    String callPrcSuccessFlag = pHelper.getValue("callPrcSuccessFlag", "1");
    // getSqlMapClientTemplate().queryForObject(prcName, prcDto);
    getSqlMapClientTemplate().insert(prcName, prcDto);
    if (G4Utils.isEmpty(prcDto.getAsString("appCode"))) {
      throw new PrcException(prcName, "存储过程没有返回状态码appCode");
    } else {
View Full Code Here


   * @return
   * @throws IOException
   */
  public boolean isDemoMode(HttpServletResponse response) throws IOException{
    boolean flag = false;
      PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
      String runMode = pHelper.getValue("runMode");
      if (runMode.equals(G4Constants.RUNMODE_DEMO)) {
        setOkTipMsg(G4Constants.PLAYBOY, response);
        flag = true;
    }
    return flag;
View Full Code Here

   *
   * @param resultList
   * @return
   */
  private List doProcessList(List resultList){
    PropertiesHelper g4PHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    String defaultShortcut = g4PHelper.getValue("desktopShortcut", "window.png");
    for (int i = 0; i < resultList.size(); i++) {
      MenuVo vo = (MenuVo)resultList.get(i);
      vo.setMaxed("false");
      if (G4Utils.isEmpty(vo.getShortcut())) {
        vo.setShortcut(defaultShortcut);
View Full Code Here

    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    UserInfoVo userInfo = WebUtils.getSessionContainer(request).getUserInfo();
    String contextPath = request.getContextPath();
    request.setAttribute("webContext", contextPath);
    Dto dto = new BaseDto();
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    dto.put("title", WebUtils.getParamValue("SYS_TITLE", request));
    dto.put("contextPath", contextPath);
    String titleIcon = WebUtils.getParamValue("TITLE_ICON", request);
    dto.put("titleIcon", G4Utils.isEmpty(titleIcon) ? "G4Studio.ico" : titleIcon);
    Dto themeDto = new BaseDto();
    Dto resultDto = new BaseDto();
    if(G4Utils.isNotEmpty(userInfo)){
      themeDto.put("userid", userInfo.getUserid());
      resultDto = armTagSupportService.getEauserSubInfo(themeDto);
    }
    String theme = null;
    if(G4Utils.isNotEmpty(resultDto))
      theme = resultDto.getAsString("theme");
    String defaultTheme = WebUtils.getParamValue("SYS_DEFAULT_THEME", request);
    theme = G4Utils.isEmpty(theme) ? defaultTheme : theme;
    dto.put("theme", theme);
    String layout = null;
    if(G4Utils.isNotEmpty(resultDto))
      layout = resultDto.getAsString("layout");
    String defaultLayout = WebUtils.getParamValue("APP_LAYOUT", request);
    layout = G4Utils.isEmpty(layout) ? defaultLayout : layout;
    dto.put("layout", layout);
    String background = null;
    if(G4Utils.isNotEmpty(resultDto))
      background = resultDto.getAsString("background");
    String defaultBackfround = WebUtils.getParamValue("DESKTOP_BACKGROUND", request);
    background = G4Utils.isEmpty(background) ? defaultBackfround : background;
    dto.put("background", background);
    PropertiesHelper p = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    dto.put("extMode", p.getValue("extMode", TagConstant.Ext_Mode_Run));
    dto.put("runMode", p.getValue("runMode", TagConstant.RUN_MODE_NORMAL));
    dto.put("ajaxErrCode", G4Constants.Ajax_Timeout);
    String micolor = pHelper.getValue("micolor", "blue");
    dto.put("username", WebUtils.getSessionContainer(request).getUserInfo().getUsername());
    dto.put("account", WebUtils.getSessionContainer(request).getUserInfo().getAccount());
    Dto qDto = new BaseDto();
View Full Code Here

    String ctxPath = request.getContextPath();
    String requestUri = request.getRequestURI();
    String uri = requestUri.substring(ctxPath.length());
    UserInfoVo userInfo = WebUtils.getSessionContainer(request).getUserInfo();
    BigDecimal costTime = null;
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    String eventMonitorEnabel = pHelper.getValue("requestMonitor", "1");
    String isAjax = request.getHeader("x-requested-with");
    if (G4Utils.isEmpty(userInfo) && !uri.equals("/login.do") && enabled) {
      if (G4Utils.isEmpty(isAjax)) {
        response.getWriter().write(
            "<script type=\"text/javascript\">parent.location.href='" + ctxPath
View Full Code Here

* @author XiongChun
* @since 2009-01-13
*/
public class StartUp {
  public static void main(String[] args) {
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4SERVER);
    G4Server server = new G4Server(
        pHelper.getValue("g4server.WebContext"),
        new Integer(pHelper.getValue("g4server.WebPort"))
        );
    try {
      server.start();
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

    setWebContext(pWebContext);
    setPort(pPort);
  }

  public void start() throws Exception {
      PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
      String forceLoad = pHelper.getValue("forceLoad", SystemConstants.FORCELOAD_N);
    /**
     * 强制改变加载顺序
     * 解决直接使用iBatis源码带来的初始化Spring容器报错的问题
     */
      if(forceLoad.equals(SystemConstants.FORCELOAD_Y)){
View Full Code Here

   * @throws SQLException
   *             - if the update fails
   */
  public int executeUpdate(StatementScope statementScope, Connection conn, String sql, Object[] parameters)
      throws SQLException {
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    // 获取监控开关参数
    String jdbcMonitor = pHelper.getValue("jdbcMonitor", "0");
    boolean flag = jdbcMonitor.equalsIgnoreCase("1") ? true : false;
    ErrorContext errorContext = statementScope.getErrorContext();
    errorContext.setActivity("executing update");
    errorContext.setObjectId(sql);
    PreparedStatement ps = null;
View Full Code Here

   * @throws SQLException
   *             - if the query fails
   */
  public void executeQuery(StatementScope statementScope, Connection conn, String sql, Object[] parameters,
      int skipResults, int maxResults, RowHandlerCallback callback) throws SQLException {
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    String jdbcMonitor = pHelper.getValue("jdbcMonitor", "0");
    String dbString = "";
    boolean flag = jdbcMonitor.equalsIgnoreCase("1") ? true : false;
    ErrorContext errorContext = statementScope.getErrorContext();
    errorContext.setActivity("executing query");
    errorContext.setObjectId(sql);
View Full Code Here

  /**
   * 应用平台启动
   */
  private void systemStartup(ServletContext servletContext) {
    PropertiesHelper pHelper = PropertiesFactory.getPropertiesHelper(PropertiesFile.G4);
    String forceLoad = pHelper.getValue("forceLoad", SystemConstants.FORCELOAD_N);
    long start = System.currentTimeMillis();
    if (forceLoad.equalsIgnoreCase(SystemConstants.FORCELOAD_N)) {
      log.info("*******************************************************");
      log.info("G4Studio行业应用二次快速开发平台->开始启动...");
      log.info("*******************************************************");
 
View Full Code Here

TOP

Related Classes of org.g4studio.core.properties.PropertiesHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.