From: Jorg J. <jj...@us...> - 2005-11-25 21:58:43
|
Update of /cvsroot/compiere/dbPort/src/org/compiere/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21263/src/org/compiere/util Modified Files: CLogger.java CLogMgt.java Log Message: Index: CLogger.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/CLogger.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CLogger.java 8 Oct 2005 02:03:38 -0000 1.5 --- CLogger.java 25 Nov 2005 21:58:34 -0000 1.6 *************** *** 93,96 **** --- 93,98 ---- /** Last Exception */ private static Exception s_lastException = null; + /** Last Warning Message */ + private static ValueNamePair s_lastWarning = null; /** *************** *** 122,126 **** * @param message clear text message * @param issueError print error message (default true) ! * @return true (to avoid removal of method) */ public boolean saveError (String AD_Message, String message, boolean issueError) --- 124,128 ---- * @param message clear text message * @param issueError print error message (default true) ! * @return true */ public boolean saveError (String AD_Message, String message, boolean issueError) *************** *** 131,135 **** severe(AD_Message + " - " + message); return true; ! } // setError /** --- 133,137 ---- severe(AD_Message + " - " + message); return true; ! } // saveError /** *************** *** 146,150 **** /** * Get Error from Stack ! * @return AD_Message as Value and Message as String */ public static Exception retrieveException() --- 148,152 ---- /** * Get Error from Stack ! * @return last exception */ public static Exception retrieveException() *************** *** 155,158 **** --- 157,183 ---- } // retrieveError + /** + * Save Warning as ValueNamePair + * @param AD_Message message key + * @param message clear text message + * @return true + */ + public boolean saveWarning (String AD_Message, String message) + { + s_lastWarning = new ValueNamePair (AD_Message, message); + return true; + } // setError + + /** + * Get Warning from Stack + * @return AD_Message as Value and Message as String + */ + public static ValueNamePair retrieveWarning() + { + ValueNamePair vp = s_lastWarning; + s_lastWarning = null; + return vp; + } // retrieveWarning + /** Index: CLogMgt.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/CLogMgt.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CLogMgt.java 26 Oct 2005 00:38:20 -0000 1.12 --- CLogMgt.java 25 Nov 2005 21:58:34 -0000 1.13 *************** *** 417,421 **** /** ! * Get Compiere Info * @return Info as multiple Line String */ --- 417,421 ---- /** ! * Get Compiere System Info * @return Info as multiple Line String */ *************** *** 533,550 **** { StringBuffer sb = new StringBuffer(); // Host ! sb.append(CConnection.get().getAppsHost()).append(" : ") ! .append(CConnection.get().getAppsPort()) .append(" ("); // Server ! if (CConnection.get().isAppsServerOK(false)) sb.append(CConnection.get().getServerVersion()); else sb.append(getMsg("NotActive")); // ! sb.append(")\n\tTunnel=").append(CConnection.get().isRMIoverHTTP()&&CConnection.get().isAppsServerOK(false)) ! .append(", Objects=").append(DB.isRemoteObjects()) ! .append(", Process=").append(DB.isRemoteProcess()); return sb.toString(); --- 533,563 ---- { StringBuffer sb = new StringBuffer(); + CConnection cc = CConnection.get(); // Host ! sb.append(cc.getAppsHost()).append(" : ") ! .append(cc.getAppsPort()) .append(" ("); // Server ! if (cc.isAppsServerOK(false)) sb.append(CConnection.get().getServerVersion()); else sb.append(getMsg("NotActive")); // ! sb.append(")\n "); ! // ! boolean remoteObjects = DB.isRemoteObjects(); ! boolean remoteProcess = DB.isRemoteProcess(); ! String realCP = CConnection.PROFILE_LAN; ! if (cc.isRMIoverHTTP() && cc.isAppsServerOK(false)) ! realCP = CConnection.PROFILE_WAN; ! else if (remoteObjects && remoteProcess) ! realCP = CConnection.PROFILE_VPN; ! else if (remoteProcess) ! realCP = CConnection.PROFILE_TERMINAL; ! sb.append(cc.getConnectionProfileText(realCP)); ! sb.append(": Tunnel=").append(cc.isRMIoverHTTP() && cc.isAppsServerOK(false)) ! .append(", Objects=").append(remoteObjects) ! .append(", Process=").append(remoteProcess); return sb.toString(); |