details:   /erp/devel/pi/rev/fee7c73da9d8
changeset: 7573:fee7c73da9d8
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Jun 08 18:18:19 2010 +0200
summary:   Fixed a small typo in the warning message of the build.

details:   /erp/devel/pi/rev/fd8cd75cd810
changeset: 7574:fd8cd75cd810
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Wed Jun 09 12:33:38 2010 +0200
summary:   Fixed issue 13508. Compilation warnings will no longer appear in the 
rebuild window, even if you are updating from an early version of the New 
Rebuild Window
A trigger was created to filter the logging information, instead of doing it in 
the OBRebuildAppender class

details:   /erp/devel/pi/rev/92007843a516
changeset: 7575:92007843a516
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Wed Jun 09 12:37:57 2010 +0200
summary:   Fixed issue 13423. Deprecation tags added to the 
setAdminContext()-like methods in OBContext

diffstat:

 src-core/src/org/openbravo/utils/OBRebuildAppender.java                  |   5 
-
 src-db/database/model/triggers/AD_ERROR_LOG_TRG.xml                      |  34 
++++++++++
 src/org/openbravo/dal/core/OBContext.java                                |  16 
++-
 src/org/openbravo/erpCommon/ad_process/buildStructure/buildStructure.xml |   2 
+-
 4 files changed, 45 insertions(+), 12 deletions(-)

diffs (130 lines):

diff -r 8ab0feb4908c -r 92007843a516 
src-core/src/org/openbravo/utils/OBRebuildAppender.java
--- a/src-core/src/org/openbravo/utils/OBRebuildAppender.java   Tue Jun 08 
18:05:02 2010 +0200
+++ b/src-core/src/org/openbravo/utils/OBRebuildAppender.java   Wed Jun 09 
12:37:57 2010 +0200
@@ -80,11 +80,6 @@
             .prepareStatement("INSERT INTO ad_error_log (ad_error_log_id, 
ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, 
system_status, error_level, message, line_number) SELECT get_uuid(), '0', '0', 
'Y', now(), '0', now(), '0', system_status, ?,?, to_number(?) FROM 
ad_system_info");
         String level = arg0.getLevel().toString();
 
-        // Warnings show when compiling are changed to level Info, so that 
they don't appear in the
-        // rebuild window, because they are not relevant for common users
-        if (message.startsWith("Note: ")) {
-          level = Level.INFO.toString();
-        }
         ps.setString(1, level);
         ps.setString(2, message);
         ps.setString(3, line_number);
diff -r 8ab0feb4908c -r 92007843a516 
src-db/database/model/triggers/AD_ERROR_LOG_TRG.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/AD_ERROR_LOG_TRG.xml       Wed Jun 09 
12:37:57 2010 +0200
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER AD_ERROR_LOG_TRG">
+    <trigger name="AD_ERROR_LOG_TRG" table="AD_ERROR_LOG" fires="before" 
insert="true" update="false" delete="false" foreach="row">
+      <body><![CDATA[
+    /*************************************************************************
+    * The contents of this file are subject to the Openbravo  Public  License
+    * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+    * Version 1.1  with a permitted attribution clause; you may not  use this
+    * file except in compliance with the License. You  may  obtain  a copy of
+    * the License at http://www.openbravo.com/legal/license.html
+    * Software distributed under the License  is  distributed  on  an "AS IS"
+    * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+    * License for the specific  language  governing  rights  and  limitations
+    * under the License.
+    * The Original Code is Openbravo ERP.
+    * The Initial Developer of the Original Code is Openbravo SLU
+    * All portions are Copyright (C) 2010 Openbravo SLU
+    * All Rights Reserved.
+    * Contributor(s):  ______________________________________.
+    ************************************************************************/
+        
+BEGIN
+    
+    IF AD_isTriggerEnabled()='N' THEN RETURN;
+    END IF;
+    
+    IF :NEW.MESSAGE LIKE 'Note: %' THEN
+       :NEW.error_level='INFO';
+    END IF;
+    
+END AD_ERROR_LOG_TRG
+]]></body>
+    </trigger>
+  </database>
diff -r 8ab0feb4908c -r 92007843a516 src/org/openbravo/dal/core/OBContext.java
--- a/src/org/openbravo/dal/core/OBContext.java Tue Jun 08 18:05:02 2010 +0200
+++ b/src/org/openbravo/dal/core/OBContext.java Wed Jun 09 12:37:57 2010 +0200
@@ -97,8 +97,9 @@
   private static OBContext adminContext = null;
 
   /**
-   * deprecated use {...@link #setAdminMode()}
+   * @deprecated use {...@link #setAdminMode()}
    */
+  @Deprecated
   public static void setAdminContext() {
     if (adminContext == null) {
       setOBContext("0", "0", "0", "0");
@@ -118,8 +119,9 @@
   }
 
   /**
-   * deprecated use {...@link #setAdminMode()}
+   * @deprecated use {...@link #setAdminMode()}
    */
+  @Deprecated
   public static void enableAsAdminContext() {
     setAdminMode();
   }
@@ -131,7 +133,7 @@
    * To restore the previous privileges call the {...@link 
#restorePreviousMode()}.
    * 
    * @see OBContext#restorePreviousMode()
-   * @since 2.50MP18
+   * @since 2.50MP16
    */
   public static void setAdminMode() {
     getAdminModeStack().push(Boolean.TRUE);
@@ -153,8 +155,9 @@
   }
 
   /**
-   * deprecated use {...@link #restorePreviousMode()}
+   * @deprecated use {...@link #restorePreviousMode()}
    */
+  @Deprecated
   public static void resetAsAdminContext() {
     restorePreviousMode();
   }
@@ -164,7 +167,7 @@
    * {...@link #setAdminMode()}.
    * 
    * @see OBContext#setAdminMode()
-   * @since 2.50MP18
+   * @since 2.50MP16
    */
   public static void restorePreviousMode() {
     // remove the last admin mode from the stack
@@ -932,8 +935,9 @@
   }
 
   /**
-   * deprecated use {...@link #setAdminMode()} and {...@link 
#restorePreviousMode()}.
+   * @deprecated use {...@link #setAdminMode()} and {...@link 
#restorePreviousMode()}.
    */
+  @Deprecated
   public boolean setInAdministratorMode(boolean inAdministratorMode) {
     final boolean prevMode = isInAdministratorMode() && !isAdministrator;
     if (inAdministratorMode) {
diff -r 8ab0feb4908c -r 92007843a516 
src/org/openbravo/erpCommon/ad_process/buildStructure/buildStructure.xml
--- a/src/org/openbravo/erpCommon/ad_process/buildStructure/buildStructure.xml  
Tue Jun 08 18:05:02 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/buildStructure/buildStructure.xml  
Wed Jun 09 12:37:57 2010 +0200
@@ -11,7 +11,7 @@
       <mainStep code="RB20" successCode="RB60" warningCode="RB60" 
errorCode="RB59">
         <name>Build</name>
         <successMessage>The build was successful</successMessage>
-        <warningMessage><![CDATA[There were warnings on the build. The 
application will run, but you should check them to see if there were important. 
Go to <a href="http://wiki.openbravo.com/wiki/ERP/2.50/Update_Tips"; 
target="_blank" class="MessageBox_TextLink"> for more information. <b>You must 
now restart the application container</b> to see the 
changes.]]></warningMessage>
+        <warningMessage><![CDATA[There were warnings on the build. The 
application will run, but you should check them to see if there were important. 
Go to <a href="http://wiki.openbravo.com/wiki/ERP/2.50/Update_Tips"; 
target="_blank" class="MessageBox_TextLink"> this link</a> for more 
information. <b>You must now restart the application container</b> to see the 
changes.]]></warningMessage>
         <errorMessage><![CDATA[An error has occurred in the build. For a list 
of actions to take, go to <a 
href="http://wiki.openbravo.com/wiki/ERP/2.50/Update_Tips"; target="_blank" 
class="MessageBox_TextLink">this link</a>]]></errorMessage>
         <stepList>
           <step code="RB12" name="Database update"/>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to