diff --git a/migration/360lts-release/oracle/876_IDEMPIERE-364_FixWrongField.sql b/migration/360lts-release/oracle/876_IDEMPIERE-364_FixWrongField.sql new file mode 100644 index 0000000000..3f6ea648ec --- /dev/null +++ b/migration/360lts-release/oracle/876_IDEMPIERE-364_FixWrongField.sql @@ -0,0 +1,22 @@ +-- Aug 14, 2012 3:36:39 PM COT +-- IDEMPIERE-364 Improve Grid Layout +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200273 +; + +-- Aug 14, 2012 3:36:39 PM COT +UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y' WHERE AD_Field_ID=200275 +; + +-- Aug 14, 2012 3:36:45 PM COT +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200273 +; + +-- Aug 14, 2012 3:36:45 PM COT +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=200275 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='876_IDEMPIERE-364_FixWrongField.sql' +WHERE LastMigrationScriptApplied<'876_IDEMPIERE-364_FixWrongField.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/876_IDEMPIERE-364_FixWrongField.sql b/migration/360lts-release/postgresql/876_IDEMPIERE-364_FixWrongField.sql new file mode 100644 index 0000000000..3f6ea648ec --- /dev/null +++ b/migration/360lts-release/postgresql/876_IDEMPIERE-364_FixWrongField.sql @@ -0,0 +1,22 @@ +-- Aug 14, 2012 3:36:39 PM COT +-- IDEMPIERE-364 Improve Grid Layout +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200273 +; + +-- Aug 14, 2012 3:36:39 PM COT +UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y' WHERE AD_Field_ID=200275 +; + +-- Aug 14, 2012 3:36:45 PM COT +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200273 +; + +-- Aug 14, 2012 3:36:45 PM COT +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=200275 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='876_IDEMPIERE-364_FixWrongField.sql' +WHERE LastMigrationScriptApplied<'876_IDEMPIERE-364_FixWrongField.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/org.adempiere.base.process/src/org/compiere/process/HashPasswords.java b/org.adempiere.base.process/src/org/compiere/process/HashPasswords.java index f294650a08..1ecdced41c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/HashPasswords.java +++ b/org.adempiere.base.process/src/org/compiere/process/HashPasswords.java @@ -44,7 +44,7 @@ public class HashPasswords extends SvrProcess */ protected String doIt() throws Exception { - boolean hash_password = MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); if (hash_password) throw new AdempiereException("Passwords already hashed"); diff --git a/org.adempiere.base.process/src/org/compiere/process/UserPassword.java b/org.adempiere.base.process/src/org/compiere/process/UserPassword.java index 72e0a167fb..47fd389231 100644 --- a/org.adempiere.base.process/src/org/compiere/process/UserPassword.java +++ b/org.adempiere.base.process/src/org/compiere/process/UserPassword.java @@ -84,7 +84,7 @@ public class UserPassword extends SvrProcess MUser operator = MUser.get(getCtx(), getAD_User_ID()); log.fine("User=" + user + ", Operator=" + operator); - boolean hash_password = MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); // Do we need a password ? if (Util.isEmpty(p_OldPassword)) // Password required diff --git a/org.adempiere.base/src/org/adempiere/pdf/Document.java b/org.adempiere.base/src/org/adempiere/pdf/Document.java index c0a78d6d26..3900ca4883 100644 --- a/org.adempiere.base/src/org/adempiere/pdf/Document.java +++ b/org.adempiere.base/src/org/adempiere/pdf/Document.java @@ -41,8 +41,6 @@ public class Document { FontFactory.registerDirectories(); } - private final static String PDF_FONT_DIR = "PDF_FONT_DIR"; - private static void writePDF(Pageable pageable, OutputStream output) { try { @@ -58,7 +56,7 @@ public class Document { final DefaultFontMapper mapper = new DefaultFontMapper(); //Elaine 2009/02/17 - load additional font from directory set in PDF_FONT_DIR of System Configurator - String pdfFontDir = MSysConfig.getValue(PDF_FONT_DIR, ""); + String pdfFontDir = MSysConfig.getValue(MSysConfig.PDF_FONT_DIR, ""); if(pdfFontDir != null && pdfFontDir.trim().length() > 0) { pdfFontDir = pdfFontDir.trim(); diff --git a/org.adempiere.base/src/org/compiere/Base.java b/org.adempiere.base/src/org/compiere/Base.java index 3876ea85d5..fdff198e79 100644 --- a/org.adempiere.base/src/org/compiere/Base.java +++ b/org.adempiere.base/src/org/compiere/Base.java @@ -23,7 +23,7 @@ import org.compiere.model.GridWindow; import org.compiere.model.GridWindowVO; import org.compiere.model.MConversionRate; import org.compiere.model.MUOMConversion; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.Env; import org.compiere.util.Login; @@ -33,7 +33,7 @@ import org.compiere.util.Login; * @author Jorg Janke * @version $Id: Base.java,v 1.5 2006/09/21 20:44:54 jjanke Exp $ */ -class Base implements SystemIDs +class Base { /** * Base Test diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java b/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java index a8c42cc968..03dd905649 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java @@ -109,7 +109,7 @@ public class Doc_Payment extends Doc // create Fact Header Fact fact = new Fact(this, as, Fact.POST_Actual); // Cash Transfer - if ("X".equals(m_TenderType) && !MSysConfig.getBooleanValue("CASH_AS_PAYMENT", true , getAD_Client_ID())) + if ("X".equals(m_TenderType) && !MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT, true , getAD_Client_ID())) { ArrayList facts = new ArrayList(); facts.add(fact); diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert.java b/org.adempiere.base/src/org/compiere/dbPort/Convert.java index 29cf5bb668..256bfeca9a 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert.java @@ -551,13 +551,13 @@ public abstract class Convert private static void writeLogMigrationScript(Writer w, String statement) throws IOException { - boolean isUseCentralizedID = "Y".equals(MSysConfig.getValue("DICTIONARY_ID_USE_CENTRALIZED_ID", "Y")); // defaults to Y - boolean isUseProjectCentralizedID = "Y".equals(MSysConfig.getValue("PROJECT_ID_USE_CENTRALIZED_ID", "N")); // defaults to N + boolean isUseCentralizedID = "Y".equals(MSysConfig.getValue(MSysConfig.DICTIONARY_ID_USE_CENTRALIZED_ID, "Y")); // defaults to Y + boolean isUseProjectCentralizedID = "Y".equals(MSysConfig.getValue(MSysConfig.PROJECT_ID_USE_CENTRALIZED_ID, "N")); // defaults to N String prm_COMMENT; if (!isUseCentralizedID && isUseProjectCentralizedID) - prm_COMMENT = MSysConfig.getValue("PROJECT_ID_COMMENTS"); + prm_COMMENT = MSysConfig.getValue(MSysConfig.PROJECT_ID_COMMENTS); else - prm_COMMENT = MSysConfig.getValue("DICTIONARY_ID_COMMENTS"); + prm_COMMENT = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_COMMENTS); // log time and date SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.DateTime); String dateTimeText = format.format(new Timestamp(System.currentTimeMillis())); diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java index 10aeb1a43c..a1da4942bf 100644 --- a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java +++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java @@ -24,7 +24,7 @@ import java.util.Properties; import java.util.logging.Level; import org.compiere.model.I_AD_ImpFormat; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_AD_ImpFormat; import org.compiere.model.X_I_GLJournal; import org.compiere.util.CLogger; @@ -40,7 +40,7 @@ import org.compiere.util.Env; * @version $Id: ImpFormat.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $ */ -public final class ImpFormat implements SystemIDs +public final class ImpFormat { /** * Format diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index c5d155d01b..2b2753b047 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -27,6 +27,7 @@ import java.util.logging.Level; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; +import static org.compiere.model.SystemIDs.*; /** @@ -39,7 +40,7 @@ import org.compiere.util.Env; * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1877902&group_id=176962 to FR [1877902] * @version $Id: GridFieldVO.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $ */ -public class GridFieldVO implements Serializable, SystemIDs +public class GridFieldVO implements Serializable { /** * diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 67fc35de63..1894cb78f0 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -55,6 +55,7 @@ import org.compiere.util.MSort; import org.compiere.util.SecureEngine; import org.compiere.util.Trx; import org.compiere.util.ValueNamePair; +import static org.compiere.model.SystemIDs.*; /** * Grid Table Model for JDBC access including buffering. @@ -89,7 +90,7 @@ import org.compiere.util.ValueNamePair; * https://sourceforge.net/tracker/?func=detail&aid=2910368&group_id=176962&atid=879332 */ public class GridTable extends AbstractTableModel - implements Serializable, SystemIDs + implements Serializable { /** * diff --git a/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java b/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java index a438a35d10..62b0a90ab5 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java @@ -158,7 +158,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location return true; MLocation address = getLocation(true); m_uniqueName = getName(); - m_unique = MSysConfig.getIntValue("START_VALUE_BPLOCATION_NAME", 0, getAD_Client_ID(), getAD_Org_ID()); + m_unique = MSysConfig.getIntValue(MSysConfig.START_VALUE_BPLOCATION_NAME, 0, getAD_Client_ID(), getAD_Org_ID()); if (m_unique < 0 || m_unique > 4) m_unique = 0; if (m_uniqueName != null && m_uniqueName.equals(".")) { diff --git a/org.adempiere.base/src/org/compiere/model/MClient.java b/org.adempiere.base/src/org/compiere/model/MClient.java index cb52f75b77..307cf70ee9 100644 --- a/org.adempiere.base/src/org/compiere/model/MClient.java +++ b/org.adempiere.base/src/org/compiere/model/MClient.java @@ -885,21 +885,21 @@ public class MClient extends X_AD_Client private static final String CLIENT_ACCOUNTING_IMMEDIATE = "I"; public static boolean isClientAccounting() { - String ca = MSysConfig.getValue("CLIENT_ACCOUNTING", + String ca = MSysConfig.getValue(MSysConfig.CLIENT_ACCOUNTING, CLIENT_ACCOUNTING_QUEUE, // default Env.getAD_Client_ID(Env.getCtx())); return (ca.equalsIgnoreCase(CLIENT_ACCOUNTING_IMMEDIATE) || ca.equalsIgnoreCase(CLIENT_ACCOUNTING_QUEUE)); } public static boolean isClientAccountingQueue() { - String ca = MSysConfig.getValue("CLIENT_ACCOUNTING", + String ca = MSysConfig.getValue(MSysConfig.CLIENT_ACCOUNTING, CLIENT_ACCOUNTING_QUEUE, // default Env.getAD_Client_ID(Env.getCtx())); return ca.equalsIgnoreCase(CLIENT_ACCOUNTING_QUEUE); } public static boolean isClientAccountingImmediate() { - String ca = MSysConfig.getValue("CLIENT_ACCOUNTING", + String ca = MSysConfig.getValue(MSysConfig.CLIENT_ACCOUNTING, CLIENT_ACCOUNTING_QUEUE, // default Env.getAD_Client_ID(Env.getCtx())); return ca.equalsIgnoreCase(CLIENT_ACCOUNTING_IMMEDIATE); diff --git a/org.adempiere.base/src/org/compiere/model/MCountry.java b/org.adempiere.base/src/org/compiere/model/MCountry.java index 0d861684f1..781ed5bdd4 100644 --- a/org.adempiere.base/src/org/compiere/model/MCountry.java +++ b/org.adempiere.base/src/org/compiere/model/MCountry.java @@ -30,6 +30,7 @@ import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Language; +import static org.compiere.model.SystemIDs.*; /** * Location Country Model (Value Object) @@ -41,7 +42,7 @@ import org.compiere.util.Language; *
  • BF [ 2695078 ] Country is not translated on invoice */ public final class MCountry extends X_C_Country - implements Comparator, Serializable, SystemIDs + implements Comparator, Serializable { /** * diff --git a/org.adempiere.base/src/org/compiere/model/MEntityType.java b/org.adempiere.base/src/org/compiere/model/MEntityType.java index 30c23e9128..06d01664d2 100644 --- a/org.adempiere.base/src/org/compiere/model/MEntityType.java +++ b/org.adempiere.base/src/org/compiere/model/MEntityType.java @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.StringTokenizer; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; @@ -38,7 +39,7 @@ import org.compiere.util.CLogger; *
  • BF [ 2861194 ] EntityType is not using normal PO framework for getting IDs * https://sourceforge.net/tracker/?func=detail&aid=2861194&group_id=176962&atid=879332 */ -public class MEntityType extends X_AD_EntityType implements SystemIDs +public class MEntityType extends X_AD_EntityType { /** * diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index c6e367d8e7..6d28cfe442 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1127,7 +1127,7 @@ public class MInOut extends X_M_InOut implements DocAction { I_C_Order order = getC_Order(); if (order != null && MDocType.DOCSUBTYPESO_PrepayOrder.equals(order.getC_DocType().getDocSubTypeSO()) - && !MSysConfig.getBooleanValue("CHECK_CREDIT_ON_PREPAY_ORDER", true, getAD_Client_ID(), getAD_Org_ID())) { + && !MSysConfig.getBooleanValue(MSysConfig.CHECK_CREDIT_ON_PREPAY_ORDER, true, getAD_Client_ID(), getAD_Org_ID())) { // ignore -- don't validate Prepay Orders depending on sysconfig parameter } else { MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 0ead4329e0..b9f4f4ae2c 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -1422,16 +1422,23 @@ public class MInvoice extends X_C_Invoice implements DocAction } // Credit Status - if (isSOTrx() && !isReversal()) + if (isSOTrx()) { - MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), null); - if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) - { - m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" - + bp.getTotalOpenBalance() - + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); - return DocAction.STATUS_Invalid; - } + MDocType doc = (MDocType) getC_DocTypeTarget(); + // IDEMPIERE-365 - just check credit if is going to increase the debt + if ( (doc.getDocBaseType().equals(MDocType.DOCBASETYPE_ARCreditMemo) && getGrandTotal().signum() < 0 ) || + (doc.getDocBaseType().equals(MDocType.DOCBASETYPE_ARInvoice) && getGrandTotal().signum() > 0 ) + ) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), null); + if ( MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus()) ) + { + m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + } } // Landed Costs @@ -2215,7 +2222,7 @@ public class MInvoice extends X_C_Invoice implements DocAction // Deep Copy MInvoice reversal = null; - if (MSysConfig.getBooleanValue("Invoice_ReverseUseNewNumber", true, getAD_Client_ID())) + if (MSysConfig.getBooleanValue(MSysConfig.Invoice_ReverseUseNewNumber, true, getAD_Client_ID())) reversal = copyFrom (this, getDateInvoiced(), getDateAcct(), getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true); else reversal = copyFrom (this, getDateInvoiced(), getDateAcct(), getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true, getDocumentNo()+"^"); diff --git a/org.adempiere.base/src/org/compiere/model/MLocation.java b/org.adempiere.base/src/org/compiere/model/MLocation.java index 04049d4f38..78d223b67a 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MLocation.java @@ -52,10 +52,10 @@ public class MLocation extends X_C_Location implements Comparator private static final long serialVersionUID = 8332515185354248079L; // http://jira.idempiere.com/browse/IDEMPIERE-147 - public static String LOCATION_MAPS_URL_PREFIX = MSysConfig.getValue("LOCATION_MAPS_URL_PREFIX"); - public static String LOCATION_MAPS_ROUTE_PREFIX = MSysConfig.getValue("LOCATION_MAPS_ROUTE_PREFIX"); - public static String LOCATION_MAPS_SOURCE_ADDRESS = MSysConfig.getValue("LOCATION_MAPS_SOURCE_ADDRESS"); - public static String LOCATION_MAPS_DESTINATION_ADDRESS = MSysConfig.getValue("LOCATION_MAPS_DESTINATION_ADDRESS"); + public static String LOCATION_MAPS_URL_PREFIX = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_URL_PREFIX); + public static String LOCATION_MAPS_ROUTE_PREFIX = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_ROUTE_PREFIX); + public static String LOCATION_MAPS_SOURCE_ADDRESS = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_SOURCE_ADDRESS); + public static String LOCATION_MAPS_DESTINATION_ADDRESS = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_DESTINATION_ADDRESS); /** * Get Location from Cache diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 4e6f71c603..b546366066 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -1325,39 +1325,43 @@ public class MOrder extends X_C_Order implements DocAction { if ( MDocType.DOCSUBTYPESO_POSOrder.equals(dt.getDocSubTypeSO()) && PAYMENTRULE_Cash.equals(getPaymentRule()) - && !MSysConfig.getBooleanValue("CHECK_CREDIT_ON_CASH_POS_ORDER", true, getAD_Client_ID(), getAD_Org_ID())) { + && !MSysConfig.getBooleanValue(MSysConfig.CHECK_CREDIT_ON_CASH_POS_ORDER, true, getAD_Client_ID(), getAD_Org_ID())) { // ignore -- don't validate for Cash POS Orders depending on sysconfig parameter } else if (MDocType.DOCSUBTYPESO_PrepayOrder.equals(dt.getDocSubTypeSO()) - && !MSysConfig.getBooleanValue("CHECK_CREDIT_ON_PREPAY_ORDER", true, getAD_Client_ID(), getAD_Org_ID())) { + && !MSysConfig.getBooleanValue(MSysConfig.CHECK_CREDIT_ON_PREPAY_ORDER, true, getAD_Client_ID(), getAD_Org_ID())) { // ignore -- don't validate Prepay Orders depending on sysconfig parameter } else { MBPartner bp = new MBPartner (getCtx(), getBill_BPartner_ID(), get_TrxName()); // bill bp is guaranteed on beforeSave - if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) - { - m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" - + bp.getTotalOpenBalance() - + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); - return DocAction.STATUS_Invalid; + if (getGrandTotal().signum() > 0) // IDEMPIERE-365 - just check credit if is going to increase the debt + { + + if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + BigDecimal grandTotal = MConversionRate.convertBase(getCtx(), + getGrandTotal(), getC_Currency_ID(), getDateOrdered(), + getC_ConversionType_ID(), getAD_Client_ID(), getAD_Org_ID()); + if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus(grandTotal))) + { + m_processMsg = "@BPartnerOverOCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + ", @GrandTotal@=" + grandTotal + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } } - if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus())) - { - m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@=" - + bp.getTotalOpenBalance() - + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); - return DocAction.STATUS_Invalid; - } - BigDecimal grandTotal = MConversionRate.convertBase(getCtx(), - getGrandTotal(), getC_Currency_ID(), getDateOrdered(), - getC_ConversionType_ID(), getAD_Client_ID(), getAD_Org_ID()); - if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus(grandTotal))) - { - m_processMsg = "@BPartnerOverOCreditHold@ - @TotalOpenBalance@=" - + bp.getTotalOpenBalance() + ", @GrandTotal@=" + grandTotal - + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); - return DocAction.STATUS_Invalid; - } - } + } } m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); @@ -1781,7 +1785,7 @@ public class MOrder extends X_C_Order implements DocAction log.info(toString()); StringBuffer info = new StringBuffer(); - boolean realTimePOS = MSysConfig.getBooleanValue("REAL_TIME_POS", false , getAD_Client_ID()); + boolean realTimePOS = MSysConfig.getBooleanValue(MSysConfig.REAL_TIME_POS, false , getAD_Client_ID()); // Create SO Shipment - Force Shipment MInOut shipment = null; diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index f03ec15f7a..1939101d13 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -543,7 +543,7 @@ public final class MPayment extends X_C_Payment { // @Trifon - CashPayments //if ( getTenderType().equals("X") ) { - if ( isCashTrx() && !MSysConfig.getBooleanValue("CASH_AS_PAYMENT", true , getAD_Client_ID())) { + if ( isCashTrx() && !MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT, true , getAD_Client_ID())) { // Cash Book Is mandatory if ( getC_CashBook_ID() <= 0 ) { log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_CashBook_ID@")); @@ -1070,7 +1070,7 @@ public final class MPayment extends X_C_Payment // Credit Card if (TENDERTYPE_CreditCard.equals(getTenderType())) { - if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD", true, getAD_Client_ID())) { + if (MSysConfig.getBooleanValue(MSysConfig.PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD, true, getAD_Client_ID())) { documentNo = getCreditCardType() + " " + Obscure.obscure(getCreditCardNumber()) + " " + getCreditCardExpMM() @@ -1082,7 +1082,7 @@ public final class MPayment extends X_C_Payment && !isReceipt() && getCheckNo() != null && getCheckNo().length() > 0) { - if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT", true, getAD_Client_ID())) { + if (MSysConfig.getBooleanValue(MSysConfig.PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT, true, getAD_Client_ID())) { documentNo = getCheckNo(); } } @@ -1090,7 +1090,7 @@ public final class MPayment extends X_C_Payment else if (TENDERTYPE_Check.equals(getTenderType()) && isReceipt()) { - if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT", true, getAD_Client_ID())) { + if (MSysConfig.getBooleanValue(MSysConfig.PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT, true, getAD_Client_ID())) { if (getRoutingNo() != null) documentNo = getRoutingNo() + ": "; if (getAccountNo() != null) @@ -1829,7 +1829,7 @@ public final class MPayment extends X_C_Payment // @Trifon - CashPayments //if ( getTenderType().equals("X") ) { - if ( isCashTrx() && !MSysConfig.getBooleanValue("CASH_AS_PAYMENT", true , getAD_Client_ID())) { + if ( isCashTrx() && !MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT, true , getAD_Client_ID())) { // Create Cash Book entry if ( getC_CashBook_ID() <= 0 ) { log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_CashBook_ID@")); diff --git a/org.adempiere.base/src/org/compiere/model/MRecentItem.java b/org.adempiere.base/src/org/compiere/model/MRecentItem.java index db6c1c5522..e425f59181 100644 --- a/org.adempiere.base/src/org/compiere/model/MRecentItem.java +++ b/org.adempiere.base/src/org/compiere/model/MRecentItem.java @@ -151,7 +151,7 @@ public class MRecentItem extends X_AD_RecentItem * it adds a record in recent item, or touches the record if it was added before */ public static void addModifiedField(Properties ctx, int AD_Table_ID, int Record_ID, int AD_User_ID, int AD_Role_ID, int AD_Window_ID, int AD_Tab_ID) { - int maxri = MSysConfig.getIntValue("RecentItems_MaxSaved", 50, Env.getAD_Client_ID(ctx)); + int maxri = MSysConfig.getIntValue(MSysConfig.RecentItems_MaxSaved, 50, Env.getAD_Client_ID(ctx)); if (maxri <= 0) return; MRecentItem ri = get(ctx, AD_Table_ID, Record_ID, AD_User_ID); @@ -182,7 +182,7 @@ public class MRecentItem extends X_AD_RecentItem private static void deleteExtraRecentItems(Properties ctx, int AD_User_ID) { int AD_Client_ID = Env.getAD_Client_ID(ctx); - int maxri = MSysConfig.getIntValue("RecentItems_MaxSaved", 50, AD_Client_ID); + int maxri = MSysConfig.getIntValue(MSysConfig.RecentItems_MaxSaved, 50, AD_Client_ID); if (maxri < 0) maxri = 0; int cntri = DB.getSQLValue(null, "SELECT COUNT(*) FROM AD_RecentItem WHERE NVL(AD_User_ID,0)=? AND AD_Client_ID=?", AD_User_ID, AD_Client_ID); diff --git a/org.adempiere.base/src/org/compiere/model/MRegion.java b/org.adempiere.base/src/org/compiere/model/MRegion.java index 8f5783ed8c..ec6fc04e2b 100644 --- a/org.adempiere.base/src/org/compiere/model/MRegion.java +++ b/org.adempiere.base/src/org/compiere/model/MRegion.java @@ -32,6 +32,7 @@ import org.compiere.util.CCache; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; +import static org.compiere.model.SystemIDs.*; /** * Localtion Region Model (Value Object) @@ -40,7 +41,7 @@ import org.compiere.util.Env; * @version $Id: MRegion.java,v 1.3 2006/07/30 00:58:36 jjanke Exp $ */ public final class MRegion extends X_C_Region - implements Comparator, Serializable, SystemIDs + implements Comparator, Serializable { /** * diff --git a/org.adempiere.base/src/org/compiere/model/MRequest.java b/org.adempiere.base/src/org/compiere/model/MRequest.java index 9f81f17f75..6040ce32bb 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MRequest.java @@ -31,6 +31,7 @@ import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.TimeUtil; +import static org.compiere.model.SystemIDs.*; /** * Request Model @@ -38,7 +39,7 @@ import org.compiere.util.TimeUtil; * @author Jorg Janke * @version $Id: MRequest.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $ */ -public class MRequest extends X_R_Request implements SystemIDs +public class MRequest extends X_R_Request { /** * diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index 880d089d1b..871e5e394b 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -42,6 +42,7 @@ import org.compiere.util.Ini; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; import org.compiere.util.Trace; +import static org.compiere.model.SystemIDs.*; /** * Role Model. @@ -54,7 +55,7 @@ import org.compiere.util.Trace; * @contributor KittiU - FR [ 3062553 ] - Duplicated action in DocAction list for Multiple Role Users * @version $Id: MRole.java,v 1.5 2006/08/09 16:38:47 jjanke Exp $ */ -public final class MRole extends X_AD_Role implements SystemIDs +public final class MRole extends X_AD_Role { /** * diff --git a/org.adempiere.base/src/org/compiere/model/MSequence.java b/org.adempiere.base/src/org/compiere/model/MSequence.java index 29af818d8e..6815b5c133 100644 --- a/org.adempiere.base/src/org/compiere/model/MSequence.java +++ b/org.adempiere.base/src/org/compiere/model/MSequence.java @@ -175,7 +175,7 @@ public class MSequence extends X_AD_Sequence // If maintaining official dictionary try to get the ID from http official server if (adempiereSys) { - String isUseCentralizedID = MSysConfig.getValue("DICTIONARY_ID_USE_CENTRALIZED_ID", "Y"); // defaults to Y + String isUseCentralizedID = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_USE_CENTRALIZED_ID, "Y"); // defaults to Y if ( ( ! isUseCentralizedID.equals("N") ) && ( ! isExceptionCentralized(TableName) ) ) { // get ID from http site retValue = getNextOfficialID_HTTP(TableName); @@ -204,7 +204,7 @@ public class MSequence extends X_AD_Sequence // If not official dictionary try to get the ID from http custom server - if configured if (queryProjectServer && ( ! adempiereSys ) && ( ! isExceptionCentralized(TableName) ) ) { - String isUseProjectCentralizedID = MSysConfig.getValue("PROJECT_ID_USE_CENTRALIZED_ID", "N"); // defaults to N + String isUseProjectCentralizedID = MSysConfig.getValue(MSysConfig.PROJECT_ID_USE_CENTRALIZED_ID, "N"); // defaults to N if (isUseProjectCentralizedID.equals("Y")) { // get ID from http site retValue = getNextProjectID_HTTP(TableName); @@ -1037,7 +1037,7 @@ public class MSequence extends X_AD_Sequence */ public static boolean createTableSequence (Properties ctx, String TableName, String trxName) { - boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false); + boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false); if(SYSTEM_NATIVE_SEQUENCE) { @@ -1511,12 +1511,12 @@ public class MSequence extends X_AD_Sequence */ public static synchronized int getNextOfficialID_HTTP (String TableName) { - String website = MSysConfig.getValue("DICTIONARY_ID_WEBSITE"); // "http://developer.adempiere.com/cgi-bin/get_ID"; - String prm_USER = MSysConfig.getValue("DICTIONARY_ID_USER"); // "globalqss"; - String prm_PASSWORD = MSysConfig.getValue("DICTIONARY_ID_PASSWORD"); // "password_inseguro"; + String website = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_WEBSITE); // "http://developer.adempiere.com/cgi-bin/get_ID"; + String prm_USER = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_USER); // "globalqss"; + String prm_PASSWORD = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_PASSWORD); // "password_inseguro"; String prm_TABLE = TableName; String prm_ALTKEY = ""; // TODO: generate alt-key based on key of table - String prm_COMMENT = MSysConfig.getValue("DICTIONARY_ID_COMMENTS"); + String prm_COMMENT = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_COMMENTS); String prm_PROJECT = new String("Adempiere"); return getNextID_HTTP(TableName, website, prm_USER, @@ -1532,13 +1532,13 @@ public class MSequence extends X_AD_Sequence */ public static synchronized int getNextProjectID_HTTP (String TableName) { - String website = MSysConfig.getValue("PROJECT_ID_WEBSITE"); // "http://developer.adempiere.com/cgi-bin/get_ID"; - String prm_USER = MSysConfig.getValue("PROJECT_ID_USER"); // "globalqss"; - String prm_PASSWORD = MSysConfig.getValue("PROJECT_ID_PASSWORD"); // "password_inseguro"; + String website = MSysConfig.getValue(MSysConfig.PROJECT_ID_WEBSITE); // "http://developer.adempiere.com/cgi-bin/get_ID"; + String prm_USER = MSysConfig.getValue(MSysConfig.PROJECT_ID_USER); // "globalqss"; + String prm_PASSWORD = MSysConfig.getValue(MSysConfig.PROJECT_ID_PASSWORD); // "password_inseguro"; String prm_TABLE = TableName; String prm_ALTKEY = ""; // TODO: generate alt-key based on key of table - String prm_COMMENT = MSysConfig.getValue("PROJECT_ID_COMMENTS"); - String prm_PROJECT = MSysConfig.getValue("PROJECT_ID_PROJECT"); + String prm_COMMENT = MSysConfig.getValue(MSysConfig.PROJECT_ID_COMMENTS); + String prm_PROJECT = MSysConfig.getValue(MSysConfig.PROJECT_ID_PROJECT); return getNextID_HTTP(TableName, website, prm_USER, prm_PASSWORD, prm_TABLE, prm_ALTKEY, prm_COMMENT, prm_PROJECT); diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index 79ac48dc21..ce6bbff582 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -34,6 +34,7 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; import org.compiere.util.Trx; +import static org.compiere.model.SystemIDs.*; /** * Initial Setup Model @@ -46,7 +47,7 @@ import org.compiere.util.Trx; * @author Carlos Ruiz - globalqss *
  • Setup correctly IsSOTrx for return documents */ -public final class MSetup implements SystemIDs +public final class MSetup { /** * Constructor diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 2083f14630..9724704d71 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -37,7 +37,69 @@ public class MSysConfig extends X_AD_SysConfig /** * */ - private static final long serialVersionUID = -5271070197457739666L; + private static final long serialVersionUID = -9111154530183645884L; + + public final static String PDF_FONT_DIR = "PDF_FONT_DIR"; + public final static String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS"; + public static final String ZK_DESKTOP_CLASS = "ZK_DESKTOP_CLASS"; + public static final String CASH_AS_PAYMENT = "CASH_AS_PAYMENT"; + public static final String MAX_ACTIVITIES_IN_LIST = "MAX_ACTIVITIES_IN_LIST"; + public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER"; + public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE"; + public static final String ZK_GRID_EDIT_MODELESS = "ZK_GRID_EDIT_MODELESS"; + public static final String ZK_DASHBOARD_REFRESH_INTERVAL = "ZK_DASHBOARD_REFRESH_INTERVAL"; + public static final String RecentItems_MaxShown = "RecentItems_MaxShown"; + public static final String USE_EMAIL_FOR_LOGIN = "USE_EMAIL_FOR_LOGIN"; + public static final String ALogin_ShowOneRole = "ALogin_ShowOneRole"; + public static final String ZK_BROWSER_ICON = "ZK_BROWSER_ICON"; + public static final String ZK_BROWSER_TITLE = "ZK_BROWSER_TITLE"; + public static final String ZK_LOGO_LARGE = "ZK_LOGO_LARGE"; + public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL"; + public static final String WEBUI_LOGOURL = "WEBUI_LOGOURL"; + public static final String LOCATION_MAX_CITY_ROWS = "LOCATION_MAX_CITY_ROWS"; + public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE"; + public static final String ZK_REPORT_TABLE_OUTPUT_TYPE = "ZK_REPORT_TABLE_OUTPUT_TYPE"; + public static final String MENU_INFOUPDATER_SLEEP_MS = "MENU_INFOUPDATER_SLEEP_MS"; + public static final String SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION = "SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION"; + public static final String SYSCONFIG_INFO_DEFAULTSELECTED = "SYSCONFIG_INFO_DEFAULTSELECTED"; + public static final String DICTIONARY_ID_USE_CENTRALIZED_ID = "DICTIONARY_ID_USE_CENTRALIZED_ID"; + public static final String PROJECT_ID_USE_CENTRALIZED_ID = "PROJECT_ID_USE_CENTRALIZED_ID"; + public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE"; + public static final String START_VALUE_BPLOCATION_NAME = "START_VALUE_BPLOCATION_NAME"; + public static final String CLIENT_ACCOUNTING = "CLIENT_ACCOUNTING"; + public static final String CHECK_CREDIT_ON_PREPAY_ORDER = "CHECK_CREDIT_ON_PREPAY_ORDER"; + public static final String CHECK_CREDIT_ON_CASH_POS_ORDER = "CHECK_CREDIT_ON_CASH_POS_ORDER"; + public static final String Invoice_ReverseUseNewNumber = "Invoice_ReverseUseNewNumber"; + public static final String PROJECT_ID_COMMENTS = "PROJECT_ID_COMMENTS"; + public static final String DICTIONARY_ID_COMMENTS = "DICTIONARY_ID_COMMENTS"; + public static final String LOCATION_MAPS_URL_PREFIX = "LOCATION_MAPS_URL_PREFIX"; + public static final String LOCATION_MAPS_ROUTE_PREFIX = "LOCATION_MAPS_ROUTE_PREFIX"; + public static final String LOCATION_MAPS_SOURCE_ADDRESS = "LOCATION_MAPS_SOURCE_ADDRESS"; + public static final String LOCATION_MAPS_DESTINATION_ADDRESS = "LOCATION_MAPS_DESTINATION_ADDRESS"; + public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD"; + public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT"; + public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT"; + public static final String RecentItems_MaxSaved = "RecentItems_MaxSaved"; + public static final String DICTIONARY_ID_WEBSITE = "DICTIONARY_ID_WEBSITE"; + public static final String DICTIONARY_ID_USER = "DICTIONARY_ID_USER"; + public static final String DICTIONARY_ID_PASSWORD = "DICTIONARY_ID_PASSWORD"; + public static final String PROJECT_ID_WEBSITE = "PROJECT_ID_WEBSITE"; + public static final String PROJECT_ID_USER = "PROJECT_ID_USER"; + public static final String PROJECT_ID_PASSWORD = "PROJECT_ID_PASSWORD"; + public static final String PROJECT_ID_PROJECT = "PROJECT_ID_PROJECT"; + public static final String ZK_LOGIN_ALLOW_REMEMBER_ME = "ZK_LOGIN_ALLOW_REMEMBER_ME"; + public static final String SWING_LOGIN_ALLOW_REMEMBER_ME = "SWING_LOGIN_ALLOW_REMEMBER_ME"; + public static final String USER_PASSWORD_HASH = "USER_PASSWORD_HASH"; + public static final String ProductUOMConversionUOMValidate = "ProductUOMConversionUOMValidate"; + public static final String ProductUOMConversionRateValidate = "ProductUOMConversionRateValidate"; + public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG"; + public static final String REPORT_SWAP_MAX_ROWS = "REPORT_SWAP_MAX_ROWS"; + public static final String JASPER_SWAP_MAX_PAGES = "JASPER_SWAP_MAX_PAGES"; + public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS"; + public static final String SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR = "SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR"; + public static final String MAIL_SEND_BCC_TO_ADDRESS = "MAIL_SEND_BCC_TO_ADDRESS"; + public static final String MAIL_SEND_BCC_TO_FROM = "MAIL_SEND_BCC_TO_FROM"; + public static final String REAL_TIME_POS = "REAL_TIME_POS"; /** * Standard Constructor @@ -508,4 +570,5 @@ public class MSysConfig extends X_AD_SysConfig +", EntityType="+getEntityType() +"]"; } + } // MSysConfig \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/MSystem.java b/org.adempiere.base/src/org/compiere/model/MSystem.java index 6b9bd683d9..8fadd018b1 100644 --- a/org.adempiere.base/src/org/compiere/model/MSystem.java +++ b/org.adempiere.base/src/org/compiere/model/MSystem.java @@ -474,23 +474,23 @@ public class MSystem extends X_AD_System private static final String SYSTEM_ALLOW_REMEMBER_PASSWORD = "P"; public static boolean isZKRememberUserAllowed() { - String ca = MSysConfig.getValue("ZK_LOGIN_ALLOW_REMEMBER_ME", SYSTEM_ALLOW_REMEMBER_USER); + String ca = MSysConfig.getValue(MSysConfig.ZK_LOGIN_ALLOW_REMEMBER_ME, SYSTEM_ALLOW_REMEMBER_USER); return (ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_USER) || ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_PASSWORD)); } public static boolean isZKRememberPasswordAllowed() { - String ca = MSysConfig.getValue("ZK_LOGIN_ALLOW_REMEMBER_ME", SYSTEM_ALLOW_REMEMBER_USER); - return (ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_PASSWORD) && !MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false)); + String ca = MSysConfig.getValue(MSysConfig.ZK_LOGIN_ALLOW_REMEMBER_ME, SYSTEM_ALLOW_REMEMBER_USER); + return (ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_PASSWORD) && !MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false)); } public static boolean isSwingRememberUserAllowed() { - String ca = MSysConfig.getValue("SWING_LOGIN_ALLOW_REMEMBER_ME", SYSTEM_ALLOW_REMEMBER_PASSWORD); + String ca = MSysConfig.getValue(MSysConfig.SWING_LOGIN_ALLOW_REMEMBER_ME, SYSTEM_ALLOW_REMEMBER_PASSWORD); return (ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_USER) || ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_PASSWORD)); } public static boolean isSwingRememberPasswordAllowed() { - String ca = MSysConfig.getValue("SWING_LOGIN_ALLOW_REMEMBER_ME", SYSTEM_ALLOW_REMEMBER_PASSWORD); - return (ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_PASSWORD) && !MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false)); + String ca = MSysConfig.getValue(MSysConfig.SWING_LOGIN_ALLOW_REMEMBER_ME, SYSTEM_ALLOW_REMEMBER_PASSWORD); + return (ca.equalsIgnoreCase(SYSTEM_ALLOW_REMEMBER_PASSWORD) && !MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false)); } /** diff --git a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java index b9737c7391..5e683104a7 100644 --- a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java +++ b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java @@ -702,7 +702,7 @@ public class MUOMConversion extends X_C_UOM_Conversion return false; } // Enforce Product UOM - if (MSysConfig.getBooleanValue("ProductUOMConversionUOMValidate", true)) + if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionUOMValidate, true)) { if (getM_Product_ID() != 0 && (newRecord || is_ValueChanged("M_Product_ID"))) @@ -718,7 +718,7 @@ public class MUOMConversion extends X_C_UOM_Conversion } // The Product UoM needs to be the smallest UoM - Multiplier must be < 0; Divider must be > 0 - if (MSysConfig.getBooleanValue("ProductUOMConversionRateValidate", true)) + if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionRateValidate, true)) { if (getM_Product_ID() != 0 && getDivideRate().compareTo(Env.ONE) < 0) { diff --git a/org.adempiere.base/src/org/compiere/model/MUser.java b/org.adempiere.base/src/org/compiere/model/MUser.java index 7120e3c87e..1c71102eaa 100644 --- a/org.adempiere.base/src/org/compiere/model/MUser.java +++ b/org.adempiere.base/src/org/compiere/model/MUser.java @@ -172,7 +172,7 @@ public class MUser extends X_AD_User s_log.warning ("Invalid Name/Password = " + name + "/" + password); return null; } - boolean hash_password = MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); MUser retValue = null; if (!hash_password) { @@ -432,7 +432,7 @@ public class MUser extends X_AD_User super.setPassword(password); return; } - boolean hash_password = MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); if(!hash_password){ super.setPassword(password); @@ -922,7 +922,7 @@ public class MUser extends X_AD_User if (newRecord || super.getValue() == null || is_ValueChanged("Value")) setValue(super.getValue()); - boolean email_login = MSysConfig.getBooleanValue("USE_EMAIL_FOR_LOGIN", false); + boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); if (email_login && getPassword() != null && getPassword().length() > 0) { // email is mandatory for users with password if (getEMail() == null || getEMail().length() == 0) { @@ -952,7 +952,7 @@ public class MUser extends X_AD_User } // Hash password - IDEMPIERE-347 - boolean hash_password = MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); if (hash_password) setPassword(getPassword()); } @@ -996,7 +996,7 @@ public class MUser extends X_AD_User .append(" INNER JOIN AD_User_Roles ur ON (u.AD_User_ID=ur.AD_User_ID AND ur.IsActive='Y')") .append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID AND r.IsActive='Y') "); sql.append("WHERE u.Password IS NOT NULL AND ur.AD_Client_ID=? AND "); // #1/2 - boolean email_login = MSysConfig.getBooleanValue("USE_EMAIL_FOR_LOGIN", false); + boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); if (email_login) sql.append("u.EMail=?"); else diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 49f01af8c6..fac45bc018 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -2828,7 +2828,7 @@ public abstract class PO } // Change Log - Only - String insertLog = MSysConfig.getValue("SYSTEM_INSERT_CHANGELOG", "Y", getAD_Client_ID()); + String insertLog = MSysConfig.getValue(MSysConfig.SYSTEM_INSERT_CHANGELOG, "Y", getAD_Client_ID()); if ( session != null && m_IDs.length == 1 && p_info.isAllowLogging(i) // logging allowed diff --git a/org.adempiere.base/src/org/compiere/model/SystemIDs.java b/org.adempiere.base/src/org/compiere/model/SystemIDs.java index d6e5afb7dd..f9d8bbffea 100644 --- a/org.adempiere.base/src/org/compiere/model/SystemIDs.java +++ b/org.adempiere.base/src/org/compiere/model/SystemIDs.java @@ -16,14 +16,12 @@ *****************************************************************************/ package org.compiere.model; -import org.compiere.util.DisplayType; - /** * List all hardcoded ID used in the code * @author Carlos Ruiz, Nicolas Micoud, ... */ -public interface SystemIDs +public class SystemIDs { public final static int COLUMN_AD_WF_ACTIVITY_AD_USER_ID = 10443; public final static int COLUMN_C_BANKSTATEMENT_C_BANKACCOUNT_ID = 4917; diff --git a/org.adempiere.base/src/org/compiere/print/ReportEngine.java b/org.adempiere.base/src/org/compiere/print/ReportEngine.java index 9ff47e7715..c359c9fed9 100644 --- a/org.adempiere.base/src/org/compiere/print/ReportEngine.java +++ b/org.adempiere.base/src/org/compiere/print/ReportEngine.java @@ -71,7 +71,7 @@ import org.compiere.model.MProject; import org.compiere.model.MQuery; import org.compiere.model.MRfQResponse; import org.compiere.model.PrintInfo; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.layout.LayoutEngine; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; @@ -108,7 +108,7 @@ import org.eevolution.model.X_PP_Order; * * FR 2872010 - Dunning Run for a complete Dunning (not just level) - Developer: Carlos Ruiz - globalqss - Sponsor: Metas */ -public class ReportEngine implements PrintServiceAttributeListener, SystemIDs +public class ReportEngine implements PrintServiceAttributeListener { /** * Constructor diff --git a/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java b/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java index 83cc63b166..f0f5e7b2e2 100644 --- a/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java +++ b/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java @@ -38,9 +38,6 @@ public class SerializableMatrixImpl implements Serializa /** Default to start swapping after 2k row **/ private static final int DEFAULT_SWAP_MAX_ROWS = 2000; - /** set to 0 or smaller to disable swap file usage **/ - private static final String REPORT_SWAP_MAX_ROWS = "REPORT_SWAP_MAX_ROWS"; - private static final CLogger log = CLogger.getCLogger(SerializableMatrixImpl.class); /** Data Structure rows */ @@ -63,7 +60,7 @@ public class SerializableMatrixImpl implements Serializa public SerializableMatrixImpl(String name) { this.prefix = name; - int pageSize = MSysConfig.getIntValue(REPORT_SWAP_MAX_ROWS, DEFAULT_SWAP_MAX_ROWS); + int pageSize = MSysConfig.getIntValue(MSysConfig.REPORT_SWAP_MAX_ROWS, DEFAULT_SWAP_MAX_ROWS); if (pageSize <= 0) { m_pageSize = Integer.MAX_VALUE; } else { diff --git a/org.adempiere.base/src/org/compiere/report/FinReport.java b/org.adempiere.base/src/org/compiere/report/FinReport.java index 3971d1ed1d..6126746a10 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReport.java +++ b/org.adempiere.base/src/org/compiere/report/FinReport.java @@ -25,7 +25,7 @@ import java.util.logging.Level; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MReportCube; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.MPrintFormat; import org.compiere.print.MPrintFormatItem; import org.compiere.process.ProcessInfoParameter; @@ -46,7 +46,7 @@ import org.compiere.util.TimeUtil; * * @version $Id: FinReport.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ */ -public class FinReport extends SvrProcess implements SystemIDs +public class FinReport extends SvrProcess { /** Period Parameter */ private int p_C_Period_ID = 0; diff --git a/org.adempiere.base/src/org/compiere/report/FinStatement.java b/org.adempiere.base/src/org/compiere/report/FinStatement.java index 48a1c93958..5868f765f7 100644 --- a/org.adempiere.base/src/org/compiere/report/FinStatement.java +++ b/org.adempiere.base/src/org/compiere/report/FinStatement.java @@ -27,7 +27,7 @@ import java.util.logging.Level; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MElementValue; import org.compiere.model.MPeriod; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.MPrintFormat; import org.compiere.process.ProcessInfoParameter; import org.compiere.process.SvrProcess; @@ -53,7 +53,7 @@ import org.compiere.util.Msg; *
  • FR [2857076] User Element 1 and 2 completion - https://sourceforge.net/tracker/?func=detail&aid=2857076&group_id=176962&atid=879335 * */ -public class FinStatement extends SvrProcess implements SystemIDs +public class FinStatement extends SvrProcess { /** AcctSchame Parameter */ private int p_C_AcctSchema_ID = 0; diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 24a27f4b07..2b978ff7fc 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -1861,7 +1861,7 @@ public final class DB */ public static int getNextID (int AD_Client_ID, String TableName, String trxName) { - boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false); + boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false); boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS); if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys) diff --git a/org.adempiere.base/src/org/compiere/util/DisplayType.java b/org.adempiere.base/src/org/compiere/util/DisplayType.java index db8ad252f5..77e9e4ae2b 100644 --- a/org.adempiere.base/src/org/compiere/util/DisplayType.java +++ b/org.adempiere.base/src/org/compiere/util/DisplayType.java @@ -23,7 +23,7 @@ import java.text.SimpleDateFormat; import java.util.Locale; import java.util.logging.Level; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; /** * System Display Types. @@ -36,7 +36,7 @@ import org.compiere.model.SystemIDs; * @author Teo Sarca, SC ARHIPAC SERVICE SRL *
  • BF [ 1810632 ] PricePrecision error in InfoProduct (and similar) */ -public final class DisplayType implements SystemIDs +public final class DisplayType { /** Display Type 10 String */ public static final int String = REFERENCE_DATATYPE_STRING; diff --git a/org.adempiere.base/src/org/compiere/util/EMail.java b/org.adempiere.base/src/org/compiere/util/EMail.java index 1250df8183..5a5d399e68 100644 --- a/org.adempiere.base/src/org/compiere/util/EMail.java +++ b/org.adempiere.base/src/org/compiere/util/EMail.java @@ -133,7 +133,7 @@ public final class EMail implements Serializable { setSmtpHost(smtpHost); setFrom(from); - String bccAddressForAllMails = MSysConfig.getValue("MAIL_SEND_BCC_TO_ADDRESS", Env.getAD_Client_ID(Env.getCtx())); + String bccAddressForAllMails = MSysConfig.getValue(MSysConfig.MAIL_SEND_BCC_TO_ADDRESS, Env.getAD_Client_ID(Env.getCtx())); if (bccAddressForAllMails != null && bccAddressForAllMails.length() > 0) addBcc(bccAddressForAllMails); addTo(to); @@ -498,7 +498,7 @@ public final class EMail implements Serializable try { m_from = new InternetAddress (newFrom, true); - if (MSysConfig.getBooleanValue("MAIL_SEND_BCC_TO_FROM", false, Env.getAD_Client_ID(Env.getCtx()))); + if (MSysConfig.getBooleanValue(MSysConfig.MAIL_SEND_BCC_TO_FROM, false, Env.getAD_Client_ID(Env.getCtx()))); addBcc(newFrom); } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 97e7e4ae02..94587fc57e 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -262,7 +262,7 @@ public class Login // if not authenticated, use AD_User as backup } - boolean hash_password=MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password=MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); KeyNamePair[] retValue = null; ArrayList list = new ArrayList(); @@ -1297,8 +1297,8 @@ public class Login // if not authenticated, use AD_User as backup } - boolean hash_password = MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); - boolean email_login = MSysConfig.getBooleanValue("USE_EMAIL_FOR_LOGIN", false); + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); + boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); KeyNamePair[] retValue = null; ArrayList clientList = new ArrayList(); ArrayList clientsValidated = new ArrayList(); @@ -1419,7 +1419,7 @@ public class Login .append(" INNER JOIN AD_User_Roles ur ON (u.AD_User_ID=ur.AD_User_ID AND ur.IsActive='Y')") .append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID AND r.IsActive='Y') "); sql.append("WHERE u.Password IS NOT NULL AND ur.AD_Client_ID=? AND "); - boolean email_login = MSysConfig.getBooleanValue("USE_EMAIL_FOR_LOGIN", false); + boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); if (email_login) sql.append("u.EMail=?"); else diff --git a/org.adempiere.base/src/org/compiere/util/WebUser.java b/org.adempiere.base/src/org/compiere/util/WebUser.java index 20b69bf200..3d003af5e5 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUser.java +++ b/org.adempiere.base/src/org/compiere/util/WebUser.java @@ -677,7 +677,7 @@ public class WebUser boolean retValue = false; if(m_loggedIn) { - boolean hash_password=MSysConfig.getBooleanValue("USER_PASSWORD_HASH", false); + boolean hash_password=MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); if(!hash_password) { String sql = "SELECT * FROM AD_User " diff --git a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java index 32cef60564..5e66d7e36b 100644 --- a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java +++ b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java @@ -22,7 +22,7 @@ import java.util.logging.Level; import org.compiere.model.DocWorkflowMgr; import org.compiere.model.PO; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -36,7 +36,7 @@ import org.compiere.util.Evaluator; * @author Jorg Janke * @version $Id: DocWorkflowManager.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ */ -public class DocWorkflowManager implements DocWorkflowMgr, SystemIDs +public class DocWorkflowManager implements DocWorkflowMgr { /** * Get Document Workflow Manager diff --git a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java index ea4c2e01ac..0022be7be3 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java @@ -51,7 +51,7 @@ import org.compiere.model.MUser; import org.compiere.model.MUserRoles; import org.compiere.model.PO; import org.compiere.model.Query; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_AD_WF_Activity; import org.compiere.print.ReportEngine; import org.compiere.process.DocAction; @@ -73,7 +73,7 @@ import org.compiere.util.Util; * @author Jorg Janke * @version $Id: MWFActivity.java,v 1.4 2006/07/30 00:51:05 jjanke Exp $ */ -public class MWFActivity extends X_AD_WF_Activity implements Runnable, SystemIDs +public class MWFActivity extends X_AD_WF_Activity implements Runnable { /** * diff --git a/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java b/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java index c79c2a7b00..4ef65b594e 100644 --- a/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java +++ b/org.adempiere.base/src/org/eevolution/process/EnableNativeSequence.java @@ -29,7 +29,7 @@ import org.compiere.model.MSequence; import org.compiere.model.MSysConfig; import org.compiere.model.MTable; import org.compiere.model.Query; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_AD_Table; import org.compiere.process.ProcessInfo; import org.compiere.process.SvrProcess; @@ -43,7 +43,7 @@ import org.compiere.util.Env; * @author Victor Perez, e-Evolution, S.C. * @author Teo Sarca, teo.sarca@gmail.com */ -public class EnableNativeSequence extends SvrProcess implements SystemIDs +public class EnableNativeSequence extends SvrProcess { /** @@ -55,7 +55,7 @@ public class EnableNativeSequence extends SvrProcess implements SystemIDs protected String doIt() { - boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false); + boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false); if(SYSTEM_NATIVE_SEQUENCE) { throw new AdempiereException("Native Sequence is Actived"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/AbstractElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/AbstractElementHandler.java index 9c70c00f3e..dca8af00e7 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/AbstractElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/AbstractElementHandler.java @@ -16,6 +16,13 @@ *****************************************************************************/ package org.adempiere.pipo; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_BUTTON; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_LIST; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_MEMO; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_STRING; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TEXT; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_YES_NO; + import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -28,7 +35,6 @@ import javax.xml.transform.sax.TransformerHandler; import org.compiere.model.PO; import org.compiere.model.POInfo; -import org.compiere.model.SystemIDs; import org.compiere.model.X_AD_Package_Imp_Detail; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -37,7 +43,7 @@ import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; -public abstract class AbstractElementHandler implements ElementHandler, SystemIDs { +public abstract class AbstractElementHandler implements ElementHandler { protected CLogger log = CLogger.getCLogger("PackIn"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java index 300075db7f..541c6e5e9a 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java @@ -786,7 +786,7 @@ public class PackOut extends SvrProcess */ public void createTranslations (String parentTableName, int parentID, TransformerHandler packOutDocument) throws SAXException { - if (MSysConfig.getBooleanValue("2PACK_HANDLE_TRANSLATIONS", false)) { + if (MSysConfig.getBooleanValue(MSysConfig.TWOPACK_HANDLE_TRANSLATIONS, false)) { Env.setContext(getCtx(), CommonTranslationHandler.CONTEXT_KEY__PARENT_TABLE, parentTableName); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java index 8216e5de83..8e7af1ab4e 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java @@ -16,6 +16,26 @@ *****************************************************************************/ package org.adempiere.pipo; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_ACCOUNT; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_AMOUNT; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_BUTTON; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_COLOR; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_DATE; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_DATETIME; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_INTEGER; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_LIST; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_LOCATION; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_LOCATOR; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_MEMO; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_NUMBER; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_PRODUCTATTRIBUTE; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_QUANTITY; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_SEARCH; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLE; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLEDIR; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TEXT; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_YES_NO; + import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -37,7 +57,7 @@ import org.compiere.util.Env; * @author Robert Klein * */ -public class PackRoll extends SvrProcess implements SystemIDs { +public class PackRoll extends SvrProcess { /** Package from Record */ private int m_AD_Package_Imp_ID = 0; private String m_Processing = null; @@ -266,7 +286,7 @@ public class PackRoll extends SvrProcess implements SystemIDs { // treatment for EntityType // it's a Table reference but must // be treated as String - || (v_AD_Reference_ID == REFERENCE_DATATYPE_TABLE && columnName + || (v_AD_Reference_ID == SystemIDs.REFERENCE_DATATYPE_TABLE && columnName .equalsIgnoreCase("EntityType"))) if (rs2.getObject("ColValue") .toString().equals("null")) { @@ -302,7 +322,7 @@ public class PackRoll extends SvrProcess implements SystemIDs { } // Update columns that are Strings adjusting // for single quotes - else if (v_AD_Reference_ID == REFERENCE_DATATYPE_ID + else if (v_AD_Reference_ID == SystemIDs.REFERENCE_DATATYPE_ID || v_AD_Reference_ID == REFERENCE_DATATYPE_TABLE || v_AD_Reference_ID == REFERENCE_DATATYPE_TABLEDIR || v_AD_Reference_ID == REFERENCE_DATATYPE_LOCATION diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java index 3813b67b30..689fcc55a9 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java @@ -33,7 +33,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements public void startElement(Properties ctx, Element element) throws SAXException { - if(! MSysConfig.getBooleanValue("2PACK_HANDLE_TRANSLATIONS", false)){ + if(! MSysConfig.getBooleanValue(MSysConfig.TWOPACK_HANDLE_TRANSLATIONS, false)){ return;//translation import option is disabled } diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java index 2dd5174b12..52f3463994 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java @@ -16,6 +16,9 @@ *****************************************************************************/ package org.adempiere.pipo.handler; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_BUTTON; +import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_YES_NO; + import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; @@ -27,7 +30,6 @@ import javax.xml.transform.sax.TransformerHandler; import org.adempiere.pipo.AbstractElementHandler; import org.adempiere.pipo.Element; import org.adempiere.pipo.PackOut; -import org.compiere.model.SystemIDs; import org.compiere.model.X_AD_Menu; import org.compiere.util.DB; import org.compiere.util.Env; @@ -35,7 +37,7 @@ import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; -public class MenuElementHandler extends AbstractElementHandler implements SystemIDs { +public class MenuElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { diff --git a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java b/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java index fc5cb8a905..67869abd7f 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java @@ -106,7 +106,6 @@ import org.compiere.utils.DigestOfFile; public class ReportStarter implements ProcessCall, ClientProcess { private static final int DEFAULT_SWAP_MAX_PAGES = 100; - private static final String JASPER_SWAP_MAX_PAGES = "JASPER_REPORT_SWAP_MAX_PAGES"; /** Logger */ private static CLogger log = CLogger.getCLogger(ReportStarter.class); private static File REPORT_HOME = null; @@ -519,7 +518,7 @@ public class ReportStarter implements ProcessCall, ClientProcess Connection conn = null; JRSwapFileVirtualizer virtualizer = null; - int maxPages = MSysConfig.getIntValue(JASPER_SWAP_MAX_PAGES, DEFAULT_SWAP_MAX_PAGES); + int maxPages = MSysConfig.getIntValue(MSysConfig.JASPER_SWAP_MAX_PAGES, DEFAULT_SWAP_MAX_PAGES); try { conn = getConnection(); diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java index e466515aec..ce0b157241 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java @@ -165,7 +165,7 @@ public class AlertProcessor extends AdempiereServer try { String text = null; - if (MSysConfig.getBooleanValue("ALERT_SEND_ATTACHMENT_AS_XLS", true, Env.getAD_Client_ID(getCtx()))) + if (MSysConfig.getBooleanValue(MSysConfig.ALERT_SEND_ATTACHMENT_AS_XLS, true, Env.getAD_Client_ID(getCtx()))) text = getExcelReport(rule, sql, trxName, attachments); else text = getPlainTextReport(rule, sql, trxName, attachments); diff --git a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java index ea36cb03b5..88044fa0c1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java +++ b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java @@ -29,7 +29,7 @@ import java.util.logging.Level; import javax.swing.JComboBox; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MFactAcct; @@ -57,7 +57,7 @@ import org.compiere.util.ValueNamePair; *
  • BF [ 1748449 ] Info Account - Posting Type is not translated *
  • BF [ 1778373 ] AcctViewer: data is not sorted proper */ -class AcctViewerData implements SystemIDs +class AcctViewerData { /** * Constructor diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java b/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java index 7e02acff5d..8a96168aa7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java @@ -29,7 +29,7 @@ import javax.swing.JPopupMenu; import org.compiere.apps.form.ArchiveViewer; import org.compiere.apps.form.FormFrame; import org.compiere.model.MBPartner; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CMenuItem; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -44,7 +44,7 @@ import org.compiere.util.Msg; * @author Jorg Janke * @version $Id: AArchive.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ */ -public class AArchive implements ActionListener, SystemIDs +public class AArchive implements ActionListener { /** * Constructor diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java b/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java index f7dd8ee3f2..cde55fb876 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java @@ -51,7 +51,7 @@ import org.compiere.interfaces.Server; import org.compiere.model.MMenu; import org.compiere.model.MQuery; import org.compiere.model.MRole; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.process.DocumentEngine; import org.compiere.swing.CButton; import org.compiere.swing.CFrame; @@ -75,7 +75,7 @@ import org.compiere.util.Splash; * @see FR [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335 * */ -public final class AEnv implements SystemIDs +public final class AEnv { // Array of active Windows private static ArrayList s_windows = new ArrayList(20); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java b/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java index b02a0741e7..8255566d0e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java @@ -697,7 +697,7 @@ public final class ALogin extends CDialog roleCombo.setSelectedItem(iniValue); // If we have only one role, we can hide the combobox - metas-2009_0021_AP1_G94 - if (roleCombo.getItemCount() == 1 && ! MSysConfig.getBooleanValue("ALogin_ShowOneRole", true)) + if (roleCombo.getItemCount() == 1 && ! MSysConfig.getBooleanValue(MSysConfig.ALogin_ShowOneRole, true)) { roleCombo.setSelectedIndex(0); roleLabel.setVisible(false); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java b/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java index 3cce7f4d50..d778e761e0 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java @@ -64,7 +64,7 @@ import org.compiere.model.MSysConfig; import org.compiere.model.MSystem; import org.compiere.model.MTreeNode; import org.compiere.model.MUser; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CFrame; import org.compiere.swing.CPanel; @@ -93,7 +93,7 @@ import org.compiere.util.Splash; * */ public final class AMenu extends CFrame - implements ActionListener, PropertyChangeListener, ChangeListener, IEnvEventListener, SystemIDs + implements ActionListener, PropertyChangeListener, ChangeListener, IEnvEventListener { /** * generated serialVersionUID @@ -817,7 +817,7 @@ public final class AMenu extends CFrame public void run() { - int sleep = MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx())); + int sleep = MSysConfig.getIntValue(MSysConfig.MENU_INFOUPDATER_SLEEP_MS, 60000, Env.getAD_Client_ID(Env.getCtx())); while(stop == false) { updateInfo(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index 15dde179a1..4edaa405bd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -92,7 +92,7 @@ import org.compiere.model.MRole; import org.compiere.model.MToolBarButtonRestrict; import org.compiere.model.MUser; import org.compiere.model.MWindow; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_AD_ToolBarButton; import org.compiere.plaf.CompiereColor; import org.compiere.print.AReport; @@ -146,7 +146,7 @@ import org.compiere.util.Util; * @sponsor www.metas.de */ public final class APanel extends CPanel - implements DataStatusListener, ChangeListener, ActionListener, IProcessUI, SystemIDs + implements DataStatusListener, ChangeListener, ActionListener, IProcessUI { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java b/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java index db3ca66d50..efb98d00e0 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java @@ -41,7 +41,7 @@ import org.compiere.model.MQuery; import org.compiere.model.MRMA; import org.compiere.model.MRequest; import org.compiere.model.MUser; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CMenuItem; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -59,7 +59,7 @@ import org.compiere.util.Msg; * @author Teo Sarca, SC ARHIPAC SERVICE SRL *
  • BF [ 1904928 ] Request: Related Request field not filled */ -public class ARequest implements ActionListener, SystemIDs +public class ARequest implements ActionListener { /** * Constructor diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java index b61db3d085..284db3eeba 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java @@ -39,7 +39,7 @@ import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.DBException; import org.adempiere.util.Callback; import org.adempiere.util.IProcessUI; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.ReportCtl; import org.compiere.print.ReportEngine; import org.compiere.process.ProcessInfo; @@ -70,7 +70,7 @@ import org.compiere.util.Msg; *
  • BF [ 1963128 ] Running a process w/o trl should display an error */ public class ProcessDialog extends CFrame - implements ActionListener, IProcessUI, SystemIDs + implements ActionListener, IProcessUI { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java index 16501dcaec..92d20e02b5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java @@ -45,7 +45,7 @@ import org.compiere.grid.ed.VLookup; import org.compiere.minigrid.MiniTable; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.plaf.CompiereColor; import org.compiere.swing.CPanel; import org.compiere.swing.CTextField; @@ -56,7 +56,7 @@ import org.compiere.util.Trx; import org.compiere.util.TrxRunnable; public class VAllocation extends Allocation - implements FormPanel, ActionListener, TableModelListener, VetoableChangeListener, SystemIDs + implements FormPanel, ActionListener, TableModelListener, VetoableChangeListener { private CPanel panel = new CPanel(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java index b508b9c5fd..a164a29a9c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java @@ -42,7 +42,7 @@ import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MPaySelectionCheck; import org.compiere.model.MPaymentBatch; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.plaf.CompiereColor; import org.compiere.print.ReportCtl; import org.compiere.print.ReportEngine; @@ -66,7 +66,7 @@ import org.compiere.util.ValueNamePair; * Contributors: * Carlos Ruiz - GlobalQSS - FR 3132033 - Make payment export class configurable per bank */ -public class VPayPrint extends PayPrint implements FormPanel, ActionListener, VetoableChangeListener, SystemIDs +public class VPayPrint extends PayPrint implements FormPanel, ActionListener, VetoableChangeListener { private CPanel panel = new CPanel(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java index bddd2fd6ec..7489aa6479 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java @@ -48,7 +48,7 @@ import org.compiere.grid.ed.VCheckBox; import org.compiere.grid.ed.VComboBox; import org.compiere.grid.ed.VDate; import org.compiere.minigrid.MiniTable; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_C_PaySelection; import org.compiere.plaf.CompiereColor; import org.compiere.process.ProcessInfo; @@ -68,7 +68,7 @@ import org.compiere.util.ValueNamePair; * @author Jorg Janke * @version $Id: VPaySelect.java,v 1.2 2008/07/11 08:20:12 cruiz Exp $ */ -public class VPaySelect extends PaySelect implements FormPanel, ActionListener, TableModelListener, IProcessUI, SystemIDs +public class VPaySelect extends PaySelect implements FormPanel, ActionListener, TableModelListener, IProcessUI { /** @todo withholding */ private CPanel panel = new CPanel(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java index 5b05e62e46..45ea0a5a76 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java @@ -82,7 +82,7 @@ import org.compiere.model.MProduct; import org.compiere.model.MQuery; import org.compiere.model.MRole; import org.compiere.model.MUserQuery; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_AD_Column; import org.compiere.swing.CButton; import org.compiere.swing.CComboBox; @@ -113,7 +113,7 @@ import org.compiere.util.ValueNamePair; *
  • BF [ 2564070 ] Saving user queries can produce unnecessary db errors */ public final class Find extends CDialog - implements ActionListener, ChangeListener, DataStatusListener, SystemIDs + implements ActionListener, ChangeListener, DataStatusListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java index 7c002b8293..263eedaac8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java @@ -102,9 +102,7 @@ public abstract class Info extends CDialog */ private static final long serialVersionUID = -5606614040914295869L; - public static final String SYSCONFIG_INFO_DEFAULTSELECTED = "INFO_DEFAULTSELECTED"; - public static final String SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION = "INFO_DOUBLECLICKTOGGLESSELECTION"; - + /** * Factory Constructor @@ -329,9 +327,9 @@ public abstract class Info extends CDialog /** Enable more than one selection */ protected boolean p_multiSelection; /** Specify if the records should be checked(selected) by default (multi selection mode only) */ - private boolean p_isDefaultSelected = MSysConfig.getBooleanValue(SYSCONFIG_INFO_DEFAULTSELECTED, false, Env.getAD_Client_ID(Env.getCtx())); + private boolean p_isDefaultSelected = MSysConfig.getBooleanValue(MSysConfig.SYSCONFIG_INFO_DEFAULTSELECTED, false, Env.getAD_Client_ID(Env.getCtx())); /** True if double click on a row toggles if row is selected (multi selection mode only) */ - private boolean p_doubleClickTogglesSelection = MSysConfig.getBooleanValue(SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION, false, Env.getAD_Client_ID(Env.getCtx())); + private boolean p_doubleClickTogglesSelection = MSysConfig.getBooleanValue(MSysConfig.SYSCONFIG_INFO_DOUBLECLICKTOGGLESSELECTION, false, Env.getAD_Client_ID(Env.getCtx())); /** Initial WHERE Clause */ protected String p_whereClause = ""; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java index e402caffda..22bb7f1244 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java @@ -31,7 +31,7 @@ import org.compiere.grid.ed.VLookup; import org.compiere.minigrid.IDColumn; import org.compiere.model.Lookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CLabel; import org.compiere.util.DB; @@ -46,7 +46,7 @@ import org.compiere.util.Msg; * @author Jorg Janke * @version $Id: InfoAssignment.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ */ -public class InfoAssignment extends Info implements SystemIDs +public class InfoAssignment extends Info { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java index 187ee4c663..79564a2e9e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java @@ -94,7 +94,7 @@ public class WFActivity extends CPanel */ private static final long serialVersionUID = 3900449055030897013L; - private static final int MAX_ACTIVITIES_IN_LIST = MSysConfig.getIntValue("MAX_ACTIVITIES_IN_LIST", 200, Env.getAD_Client_ID(Env.getCtx())); + private static final int MAX_ACTIVITIES_IN_LIST = MSysConfig.getIntValue(MSysConfig.MAX_ACTIVITIES_IN_LIST, 200, Env.getAD_Client_ID(Env.getCtx())); /** * WF Activity diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java index b9c1f69976..c1aac1b4e6 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java @@ -35,7 +35,7 @@ import org.compiere.model.GridTab; import org.compiere.model.MDocType; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CPanel; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; @@ -43,7 +43,7 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; -public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionListener, VetoableChangeListener, SystemIDs +public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionListener, VetoableChangeListener { private static final long serialVersionUID = 1L; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java index d9177f020b..b7e2b70074 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java @@ -30,14 +30,14 @@ import org.compiere.grid.ed.VLookup; import org.compiere.model.GridTab; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CPanel; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg; -public class VCreateFromRMAUI extends CreateFromRMA implements VetoableChangeListener, SystemIDs +public class VCreateFromRMAUI extends CreateFromRMA implements VetoableChangeListener { private static final long serialVersionUID = 1L; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java index 0c30eb5484..c88e94abf3 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java @@ -52,7 +52,7 @@ import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MProduct; import org.compiere.model.Query; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CPanel; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; @@ -60,7 +60,7 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; -public class VCreateFromShipmentUI extends CreateFromShipment implements ActionListener, VetoableChangeListener, SystemIDs +public class VCreateFromShipmentUI extends CreateFromShipment implements ActionListener, VetoableChangeListener { private VCreateFromDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java index 527e3e2ea1..22ce405941 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java @@ -43,7 +43,7 @@ import org.compiere.model.MColumn; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MPayment; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CLabel; import org.compiere.swing.CPanel; @@ -53,7 +53,7 @@ import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg; -public class VCreateFromStatementUI extends CreateFromStatement implements ActionListener, SystemIDs +public class VCreateFromStatementUI extends CreateFromStatement implements ActionListener { private static final long serialVersionUID = 1L; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java index 01aef7f942..426c6fa4b1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java @@ -512,7 +512,7 @@ public class VPayment extends CDialog * Get Data from Grid */ m_AD_Client_ID = ((Integer)m_mTab.getValue("AD_Client_ID")).intValue(); - m_Cash_As_Payment = MSysConfig.getBooleanValue("CASH_AS_PAYMENT",true, m_AD_Client_ID); + m_Cash_As_Payment = MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT,true, m_AD_Client_ID); m_AD_Org_ID = ((Integer)m_mTab.getValue("AD_Org_ID")).intValue(); m_C_BPartner_ID = ((Integer)m_mTab.getValue("C_BPartner_ID")).intValue(); m_PaymentRule = (String)m_mTab.getValue("PaymentRule"); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java index d1e4d65e51..c7af9418c9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java @@ -35,7 +35,7 @@ import org.compiere.util.Env; public class CityAutoCompleter extends AutoCompleter { public static final CityVO ITEM_More = new CityVO(-1, "...", -1, ""); - private final int m_maxRows = MSysConfig.getIntValue("LOCATION_MAX_CITY_ROWS", 7); + private final int m_maxRows = MSysConfig.getIntValue(MSysConfig.LOCATION_MAX_CITY_ROWS, 7); private CityVO m_city = null; private final int m_windowNo; private ArrayList list = new ArrayList(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java index 0e35ed2235..c71702b0d0 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java @@ -61,7 +61,7 @@ import org.compiere.model.MAccountLookup; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MQuery; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CDialog; import org.compiere.swing.CPanel; @@ -77,7 +77,7 @@ import org.compiere.util.Msg; * @version $Id: VAccountDialog.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $ */ public final class VAccountDialog extends CDialog - implements ActionListener, DataStatusListener, VetoableChangeListener, SystemIDs + implements ActionListener, DataStatusListener, VetoableChangeListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java index 977d30c0b4..16a1055739 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java @@ -50,7 +50,7 @@ import org.compiere.model.MQuery; import org.compiere.model.MRole; import org.compiere.model.MTable; import org.compiere.model.MWarehouse; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CMenuItem; import org.compiere.util.CLogger; @@ -65,7 +65,7 @@ import org.compiere.util.Msg; * @version $Id: VLocator.java,v 1.5 2006/07/30 00:51:27 jjanke Exp $ */ public class VLocator extends JComponent - implements VEditor, ActionListener, SystemIDs + implements VEditor, ActionListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java index 889fd39524..9a574df617 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java @@ -58,7 +58,7 @@ import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MQuery; import org.compiere.model.MRole; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CMenuItem; import org.compiere.swing.CTextField; @@ -96,7 +96,7 @@ import org.compiere.util.ValueNamePair; * @sponsor www.metas.de */ public class VLookup extends JComponent - implements VEditor, ActionListener, FocusListener, SystemIDs + implements VEditor, ActionListener, FocusListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java index 1e9ce5ef9d..e57bd018dd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java @@ -43,7 +43,7 @@ import org.compiere.model.GridTab; import org.compiere.model.MAttributeSet; import org.compiere.model.MPAttributeLookup; import org.compiere.model.MProduct; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CMenuItem; import org.compiere.util.CLogger; @@ -62,7 +62,7 @@ import org.compiere.util.Msg; *
  • BF [ 2011222 ] ASI Dialog is reseting locator */ public class VPAttribute extends JComponent - implements VEditor, ActionListener, SystemIDs + implements VEditor, ActionListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java index 9f4fea048d..68a1e71409 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java @@ -54,7 +54,7 @@ import org.compiere.model.MLotCtl; import org.compiere.model.MQuery; import org.compiere.model.MRole; import org.compiere.model.MSerNoCtl; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_M_MovementLine; import org.compiere.swing.CButton; import org.compiere.swing.CCheckBox; @@ -80,7 +80,7 @@ import org.compiere.util.Msg; * @version $Id: VPAttributeDialog.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $ */ public class VPAttributeDialog extends CDialog - implements ActionListener, SystemIDs + implements ActionListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/PosPayment.java b/org.adempiere.ui.swing/src/org/compiere/pos/PosPayment.java index de88e18806..f4f06f4cfe 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/PosPayment.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/PosPayment.java @@ -53,7 +53,7 @@ import org.compiere.model.MPOS; import org.compiere.model.MPOSKey; import org.compiere.model.MPayment; import org.compiere.model.MPaymentValidate; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.swing.CButton; import org.compiere.swing.CComboBox; import org.compiere.swing.CDialog; @@ -65,7 +65,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; -public class PosPayment extends CDialog implements PosKeyListener, VetoableChangeListener, ActionListener, SystemIDs { +public class PosPayment extends CDialog implements PosKeyListener, VetoableChangeListener, ActionListener { /** * */ diff --git a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java index 413636567b..e4d0bb50fb 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java @@ -80,7 +80,7 @@ import org.compiere.model.MQuery; import org.compiere.model.MRole; import org.compiere.model.MUser; import org.compiere.model.PrintInfo; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_C_Invoice; import org.compiere.swing.CButton; import org.compiere.swing.CCheckBox; @@ -125,7 +125,7 @@ import org.compiere.util.ValueNamePair; * */ public class Viewer extends CFrame - implements ActionListener, ChangeListener, WindowStateListener, IReportEngineEventListener, SystemIDs + implements ActionListener, ChangeListener, WindowStateListener, IReportEngineEventListener { /** * diff --git a/org.adempiere.ui.swing/src/org/compiere/swing/CTextArea.java b/org.adempiere.ui.swing/src/org/compiere/swing/CTextArea.java index 84ba42a978..87ea04dbee 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/CTextArea.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/CTextArea.java @@ -160,7 +160,7 @@ public class CTextArea extends JScrollPane m_textArea.firePropertyChange("editable", !isEditable(), isEditable()); // IDEMPIERE-320 - boolean taBehaviour = MSysConfig.getBooleanValue("SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR", false, Env.getAD_Client_ID(Env.getCtx())); + boolean taBehaviour = MSysConfig.getBooleanValue(MSysConfig.SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR, false, Env.getAD_Client_ID(Env.getCtx())); if (taBehaviour) { InputMap im = m_textArea.getInputMap(); diff --git a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java index 95639d6f8c..7335475287 100755 --- a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java +++ b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java @@ -60,7 +60,7 @@ import org.compiere.model.MPInstance; import org.compiere.model.MPInstancePara; import org.compiere.model.MPrivateAccess; import org.compiere.model.MRMA; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.plaf.CompiereColor; import org.compiere.print.ReportCtl; import org.compiere.print.ReportEngine; @@ -86,7 +86,7 @@ import org.compiere.util.Trx; */ public class VInOutInvoiceGen extends CPanel implements FormPanel, ActionListener, VetoableChangeListener, - ChangeListener, TableModelListener, IProcessUI, SystemIDs + ChangeListener, TableModelListener, IProcessUI { /** * diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index a50ac7f6bd..6b395ec42d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -307,7 +307,7 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb private void createDesktop() { appDesktop = null; - String className = MSysConfig.getValue(IDesktop.CLASS_NAME_KEY); + String className = MSysConfig.getValue(MSysConfig.ZK_DESKTOP_CLASS); if ( className != null && className.trim().length() > 0) { try diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java index 52f9fd1f25..f64cd1bb46 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java @@ -9,7 +9,7 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.session.SessionManager; import org.compiere.model.MBPartner; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -28,7 +28,7 @@ import org.zkoss.zul.Menupopup; * @author Jorg Janke * @version $Id: AArchive.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ */ -public class WArchive implements EventListener, SystemIDs +public class WArchive implements EventListener { /** * Constructor diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java index dbb4db7f7b..84cfa27bf6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java @@ -35,7 +35,7 @@ import org.compiere.model.MQuery; import org.compiere.model.MRMA; import org.compiere.model.MRequest; import org.compiere.model.MUser; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -57,7 +57,7 @@ import org.zkoss.zul.Menupopup; * @author Teo Sarca, SC ARHIPAC SERVICE SRL *
  • BF [ 1904928 ] Request: Related Request field not filled */ -public class WRequest implements EventListener, SystemIDs +public class WRequest implements EventListener { /** * Constructor diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java index 759e931bd5..63412bdd9f 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java @@ -38,7 +38,7 @@ import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MFactAcct; import org.compiere.model.MLookupFactory; import org.compiere.model.MRefList; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.report.core.RColumn; import org.compiere.report.core.RModel; import org.compiere.util.CLogger; @@ -58,7 +58,7 @@ import org.compiere.util.ValueNamePair; * July 27, 2007 */ -public class WAcctViewerData implements SystemIDs +public class WAcctViewerData { /** Window */ public int WindowNo; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index d5e05a7893..b712524eee 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -27,7 +27,7 @@ import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.MultiFileDownloadDialog; import org.adempiere.webui.window.SimplePDFViewer; import org.compiere.Adempiere; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.ReportEngine; import org.compiere.process.ProcessInfo; import org.compiere.process.ProcessInfoUtil; @@ -84,7 +84,7 @@ import com.lowagie.text.pdf.PdfWriter; * @author arboleda - globalqss * - Implement ShowHelp option on processes and reports */ -public class ProcessDialog extends Window implements EventListener, IProcessUI, SystemIDs +public class ProcessDialog extends Window implements EventListener, IProcessUI { /** * generate serial version ID diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index 0d164ebe86..cbb12d540f 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -47,7 +47,7 @@ import org.adempiere.webui.window.FDialog; import org.compiere.apps.form.Allocation; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -70,7 +70,7 @@ import org.zkoss.zul.Space; * Contributor : Fabian Aguilar - OFBConsulting - Multiallocation */ public class WAllocation extends Allocation - implements IFormController, EventListener, WTableModelListener, ValueChangeListener, SystemIDs + implements IFormController, EventListener, WTableModelListener, ValueChangeListener { /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java index 06b9e63762..7a5830b188 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java @@ -37,7 +37,7 @@ import org.compiere.model.GridTab; import org.compiere.model.MDocType; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -49,7 +49,7 @@ import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.Space; -public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventListener, ValueChangeListener, SystemIDs +public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventListener, ValueChangeListener { private WCreateFromWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java index 48611aa18c..2ac705046f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java @@ -32,7 +32,7 @@ import org.compiere.grid.CreateFromRMA; import org.compiere.model.GridTab; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -40,7 +40,7 @@ import org.compiere.util.Msg; import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; -public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListener, SystemIDs +public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListener { private WCreateFromWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java index 5c01c1c000..d64eec1313 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java @@ -43,7 +43,7 @@ import org.compiere.model.MLocatorLookup; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MProduct; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -56,7 +56,7 @@ import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.Space; -public class WCreateFromShipmentUI extends CreateFromShipment implements EventListener, ValueChangeListener, SystemIDs +public class WCreateFromShipmentUI extends CreateFromShipment implements EventListener, ValueChangeListener { private WCreateFromWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java index f1fe152a1d..a1a67ac907 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java @@ -44,7 +44,7 @@ import org.compiere.model.MColumn; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MPayment; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -56,7 +56,7 @@ import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.Hbox; -public class WCreateFromStatementUI extends CreateFromStatement implements EventListener, SystemIDs +public class WCreateFromStatementUI extends CreateFromStatement implements EventListener { private WCreateFromWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java index 88c95a30e3..23e96df9dc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java @@ -50,7 +50,7 @@ import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MPaySelectionCheck; import org.compiere.model.MPaymentBatch; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.ReportEngine; import org.compiere.util.DB; import org.compiere.util.DisplayType; @@ -75,7 +75,7 @@ import org.zkoss.zul.Filedownload; * Contributors: * Carlos Ruiz - GlobalQSS - FR 3132033 - Make payment export class configurable per bank */ -public class WPayPrint extends PayPrint implements IFormController, EventListener, ValueChangeListener, SystemIDs +public class WPayPrint extends PayPrint implements IFormController, EventListener, ValueChangeListener { private CustomForm form = new CustomForm(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java index 42598a69b8..3bc1a30984 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java @@ -47,7 +47,7 @@ import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.window.FDialog; import org.compiere.apps.form.PaySelect; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_C_PaySelection; import org.compiere.process.ProcessInfo; import org.compiere.util.Env; @@ -76,7 +76,7 @@ import org.zkoss.zul.Space; * @version $Id: VPaySelect.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $ */ public class WPaySelect extends PaySelect - implements IFormController, EventListener, WTableModelListener, IProcessUI, SystemIDs + implements IFormController, EventListener, WTableModelListener, IProcessUI { /** @todo withholding */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java index 52cc4750fc..8b92c9485d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java @@ -564,7 +564,7 @@ public class WPayment extends Window * Get Data from Grid */ m_AD_Client_ID = ((Integer)m_mTab.getValue("AD_Client_ID")).intValue(); - m_Cash_As_Payment = MSysConfig.getBooleanValue("CASH_AS_PAYMENT",true, m_AD_Client_ID); + m_Cash_As_Payment = MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT,true, m_AD_Client_ID); m_AD_Org_ID = ((Integer)m_mTab.getValue("AD_Org_ID")).intValue(); m_C_BPartner_ID = ((Integer)m_mTab.getValue("C_BPartner_ID")).intValue(); m_PaymentRule = (String)m_mTab.getValue("PaymentRule"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index 0cf03579ae..ff7236c084 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -339,7 +339,7 @@ public class WWFActivity extends ADForm implements EventListener { long start = System.currentTimeMillis(); - int MAX_ACTIVITIES_IN_LIST = MSysConfig.getIntValue("MAX_ACTIVITIES_IN_LIST", 200, Env.getAD_Client_ID(Env.getCtx())); + int MAX_ACTIVITIES_IN_LIST = MSysConfig.getIntValue(MSysConfig.MAX_ACTIVITIES_IN_LIST, 200, Env.getAD_Client_ID(Env.getCtx())); model = new ListModelTable(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java index 32c081d8b0..faee0f4991 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java @@ -71,7 +71,7 @@ public class FolderBrowser extends Window implements EventListener public FolderBrowser(String rootPath, boolean browseForFolder) { if (Util.isEmpty(rootPath)) { - rootPath = MSysConfig.getValue("ZK_ROOT_FOLDER_BROWSER", Ini.getAdempiereHome()); + rootPath = MSysConfig.getValue(MSysConfig.ZK_ROOT_FOLDER_BROWSER, Ini.getAdempiereHome()); } root = new File(rootPath); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java index 59d2714a16..e491ab3170 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java @@ -105,10 +105,6 @@ public class GridPanel extends Borderlayout implements EventListener private Map columnWidthMap; - public static final String PAGE_SIZE_KEY = "ZK_PAGING_SIZE"; - - public static final String MODE_LESS_KEY = "ZK_GRID_EDIT_MODELESS"; - public GridPanel() { this(0); @@ -133,11 +129,11 @@ public class GridPanel extends Borderlayout implements EventListener } else { - pageSize = MSysConfig.getIntValue(PAGE_SIZE_KEY, 100); + pageSize = MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 100); } //default true for better UI experience - modeless = MSysConfig.getBooleanValue(MODE_LESS_KEY, true); + modeless = MSysConfig.getBooleanValue(MSysConfig.ZK_GRID_EDIT_MODELESS, true); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListPanel.java index c78d829d59..191991c774 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListPanel.java @@ -79,8 +79,6 @@ public class ListPanel extends Borderlayout implements EventListener private Map columnWidthMap; - public static final String PAGE_SIZE_KEY = "ZK_PAGING_SIZE"; - public ListPanel() { this(0); @@ -97,7 +95,7 @@ public class ListPanel extends Borderlayout implements EventListener this.appendChild(south); //default paging size - pageSize = MSysConfig.getIntValue(PAGE_SIZE_KEY, 100); + pageSize = MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 100); } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java index afeaba477c..d6a671e2e3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java @@ -27,7 +27,7 @@ import org.compiere.model.MMenu; import org.compiere.model.MQuery; import org.compiere.model.MTree; import org.compiere.model.MTreeNode; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -56,7 +56,7 @@ import org.zkoss.zul.Vbox; * @author Elaine * @date November 20, 2008 */ -public class DPFavourites extends DashboardPanel implements EventListener, SystemIDs { +public class DPFavourites extends DashboardPanel implements EventListener { private static final String ON_ADD_TAP_EVENT_LISTENER = "onAddTapEventListener"; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java index b1e32852ce..61441dc8b4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java @@ -182,7 +182,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener, PropertyChangeListener, ContextMenuListener, IZoomableEditor, SystemIDs +public class WLocatorEditor extends WEditor implements EventListener, PropertyChangeListener, ContextMenuListener, IZoomableEditor { private static final String[] LISTENER_EVENTS = {Events.ON_CLICK}; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java index f2d886c2a8..6dd5cc3d0d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java @@ -28,7 +28,7 @@ import org.compiere.model.GridTab; import org.compiere.model.Lookup; import org.compiere.model.MAttributeSet; import org.compiere.model.MProduct; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.zkoss.zk.ui.event.Event; @@ -40,7 +40,7 @@ import org.zkoss.zk.ui.event.Events; * @author Low Heng Sin * */ -public class WPAttributeEditor extends WEditor implements ContextMenuListener, SystemIDs +public class WPAttributeEditor extends WEditor implements ContextMenuListener { private static final String[] LISTENER_EVENTS = {Events.ON_CLICK, Events.ON_CHANGE, Events.ON_OK}; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java index 37152acf9a..736c6e6dec 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java @@ -40,7 +40,7 @@ import org.compiere.model.Lookup; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MRole; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.DisplayType; @@ -57,7 +57,7 @@ import org.zkoss.zk.ui.event.Events; * @author Ashley G Ramdass * */ -public class WSearchEditor extends WEditor implements ContextMenuListener, ValueChangeListener, IZoomableEditor, SystemIDs +public class WSearchEditor extends WEditor implements ContextMenuListener, ValueChangeListener, IZoomableEditor { private static final String[] LISTENER_EVENTS = {Events.ON_CLICK, Events.ON_CHANGE, Events.ON_OK}; private Lookup lookup; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java index ec4ddb8fcd..c088a8f916 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java @@ -73,7 +73,7 @@ import org.compiere.model.MProcess; import org.compiere.model.MQuery; import org.compiere.model.MRecentItem; import org.compiere.model.MRole; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.process.DocAction; import org.compiere.process.ProcessInfo; import org.compiere.process.ProcessInfoUtil; @@ -124,7 +124,7 @@ import org.zkoss.zul.Menupopup; * https://sourceforge.net/tracker/?func=detail&aid=2985892&group_id=176962&atid=955896 */ public abstract class AbstractADWindowPanel extends AbstractUIPart implements ToolbarListener, - EventListener, DataStatusListener, ActionListener, SystemIDs + EventListener, DataStatusListener, ActionListener { private static final CLogger logger; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java index 36fc04fb50..6a3f567bb8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java @@ -14,6 +14,8 @@ package org.adempiere.webui.panel; +import static org.compiere.model.SystemIDs.TREE_MENUPRIMARY; + import java.util.Collection; import java.util.Enumeration; import java.util.Properties; @@ -29,7 +31,6 @@ import org.compiere.model.MMenu; import org.compiere.model.MQuery; import org.compiere.model.MTree; import org.compiere.model.MTreeNode; -import org.compiere.model.SystemIDs; import org.compiere.util.DB; import org.compiere.util.Env; import org.zkoss.zk.ui.Component; @@ -53,7 +54,7 @@ import org.zkoss.zul.Treerow; * @author Elaine * @date July 31, 2012 */ -public abstract class AbstractMenuPanel extends Panel implements EventListener, SystemIDs { +public abstract class AbstractMenuPanel extends Panel implements EventListener { /** * diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java index ecda59c888..5c047439f1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java @@ -40,7 +40,7 @@ import org.compiere.minigrid.ColumnInfo; import org.compiere.minigrid.IDColumn; import org.compiere.model.MLookupFactory; import org.compiere.model.MQuery; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.DB; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -67,7 +67,7 @@ import org.zkoss.zul.Vbox; * @version InfoAssignment.java Adempiere Swing UI 3.4.1 */ -public class InfoAssignmentPanel extends InfoPanel implements EventListener, ValueChangeListener, SystemIDs +public class InfoAssignmentPanel extends InfoPanel implements EventListener, ValueChangeListener { /** * diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java index 1082059ad2..004caf3dd6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java @@ -112,7 +112,7 @@ public class LoginPanel extends Window implements EventListener private LoginWindow wndLogin; private Checkbox chkRememberMe; private Checkbox chkSelectRole; - boolean email_login = MSysConfig.getBooleanValue("USE_EMAIL_FOR_LOGIN", false); + boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); public LoginPanel(Properties ctx, LoginWindow loginWindow) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuPanel.java index 586b112f7b..f22f6d573e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuPanel.java @@ -32,7 +32,7 @@ import org.adempiere.webui.util.TreeUtils; import org.compiere.model.MTree; import org.compiere.model.MTreeNode; import org.compiere.model.MUser; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -61,7 +61,7 @@ import org.zkoss.zul.Treerow; * @date Feb 25, 2007 * @version $Revision: 0.10 $ */ -public class MenuPanel extends Panel implements EventListener, SystemIDs +public class MenuPanel extends Panel implements EventListener { private static final String ON_EXPAND_MENU_EVENT = "onExpandMenu"; /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java index 0a2e4f0937..8d758e292f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java @@ -115,7 +115,7 @@ public class RolePanel extends Window implements EventListener, Deferrable if (lstClient.getItemCount() > 1) { auf = new AuFocus(lstClient); } else { - if (MSysConfig.getBooleanValue("ALogin_ShowOneRole", true) || lstRole.getItemCount() > 1) { + if (MSysConfig.getBooleanValue(MSysConfig.ALogin_ShowOneRole, true) || lstRole.getItemCount() > 1) { auf = new AuFocus(lstRole); } else { auf = new AuFocus(lstOrganisation); @@ -364,7 +364,7 @@ public class RolePanel extends Window implements EventListener, Deferrable MRole.getDefault(m_ctx, true); // If we have only one role, we can hide the combobox - metas-2009_0021_AP1_G94 - if (m_clientKNPairs.length == 1 && lstRole.getItemCount() == 1 && ! MSysConfig.getBooleanValue("ALogin_ShowOneRole", true)) + if (m_clientKNPairs.length == 1 && lstRole.getItemCount() == 1 && ! MSysConfig.getBooleanValue(MSysConfig.ALogin_ShowOneRole, true)) { lstRole.setSelectedIndex(0); lblRole.setVisible(false); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java index 34d759e0ac..0bebbc0962 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java @@ -29,7 +29,7 @@ public final class ThemeManager { public static String getLargeLogo() { String theme = getTheme(); String def = ITheme.THEME_PATH_PREFIX+theme+ITheme.LOGIN_LOGO_IMAGE; - return MSysConfig.getValue("ZK_LOGO_LARGE", def); + return MSysConfig.getValue(MSysConfig.ZK_LOGO_LARGE, def); } /** @@ -38,9 +38,9 @@ public final class ThemeManager { public static String getSmallLogo() { String theme = getTheme(); String def = ITheme.THEME_PATH_PREFIX+theme+ITheme.HEADER_LOGO_IMAGE; - String url = MSysConfig.getValue("ZK_LOGO_SMALL", null); + String url = MSysConfig.getValue(MSysConfig.ZK_LOGO_SMALL, null); if (url == null) - url = MSysConfig.getValue("WEBUI_LOGOURL", def); + url = MSysConfig.getValue(MSysConfig.WEBUI_LOGOURL, def); return url; } @@ -69,7 +69,7 @@ public final class ThemeManager { * @return title text for the browser window */ public static String getBrowserTitle() { - return MSysConfig.getValue("ZK_BROWSER_TITLE", AdempiereWebUI.APP_NAME); + return MSysConfig.getValue(MSysConfig.ZK_BROWSER_TITLE, AdempiereWebUI.APP_NAME); } /** @@ -110,6 +110,6 @@ public final class ThemeManager { public static String getBrowserIcon() { String theme = getTheme(); String def = ITheme.THEME_PATH_PREFIX + theme + ITheme.BROWSER_ICON_IMAGE; - return MSysConfig.getValue("ZK_BROWSER_ICON", def); + return MSysConfig.getValue(MSysConfig.ZK_BROWSER_ICON, def); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index b673e949e5..6bf9a9d71c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -69,7 +69,7 @@ import org.compiere.model.MProduct; import org.compiere.model.MQuery; import org.compiere.model.MRole; import org.compiere.model.MUserQuery; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_AD_Column; import org.compiere.util.AdempiereSystemError; import org.compiere.util.CLogger; @@ -100,7 +100,7 @@ import org.zkoss.zul.Hbox; * @author Sendy Yagambrum * @date June 27, 2007 */ -public class FindWindow extends Window implements EventListener, ValueChangeListener, SystemIDs, DialogEvents +public class FindWindow extends Window implements EventListener, ValueChangeListener, DialogEvents { /** * diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 0e02002d30..fe994989dc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -49,7 +49,7 @@ import org.compiere.model.MAccountLookup; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MQuery; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -75,7 +75,7 @@ import org.zkoss.zul.Vbox; * @author Low Heng Sin */ public final class WAccountDialog extends Window - implements EventListener, DataStatusListener, ValueChangeListener, SystemIDs + implements EventListener, DataStatusListener, ValueChangeListener { private static final long serialVersionUID = 7999516267209766287L; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java index 6c3a4d2f57..d93173589b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java @@ -54,7 +54,7 @@ public class WAutoCompleterCity extends AutoComplete implements EventListener private ArrayList m_citiesShow = new ArrayList(); - private final int m_maxRows = MSysConfig.getIntValue("LOCATION_MAX_CITY_ROWS", 7); + private final int m_maxRows = MSysConfig.getIntValue(MSysConfig.LOCATION_MAX_CITY_ROWS, 7); public static final CityVO ITEM_More = new CityVO(-1, "...", -1, ""); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java index 4c4d627884..c464f498c6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java @@ -52,7 +52,7 @@ import org.compiere.model.MLotCtl; import org.compiere.model.MQuery; import org.compiere.model.MRole; import org.compiere.model.MSerNoCtl; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_M_MovementLine; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -80,7 +80,7 @@ import org.zkoss.zul.impl.InputElement; * ZK Port * @author Low Heng Sin */ -public class WPAttributeDialog extends Window implements EventListener, SystemIDs +public class WPAttributeDialog extends Window implements EventListener { /** * diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 9ecb92ed71..1a78b02ac4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -56,7 +56,7 @@ import org.compiere.model.MRole; import org.compiere.model.MSysConfig; import org.compiere.model.MTable; import org.compiere.model.MUser; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.ArchiveEngine; import org.compiere.print.MPrintFormat; import org.compiere.print.ReportEngine; @@ -111,7 +111,7 @@ import org.zkoss.zul.impl.XulElement; * * @author Low Heng Sin */ -public class ZkReportViewer extends Window implements EventListener, ITabOnCloseHandler, SystemIDs { +public class ZkReportViewer extends Window implements EventListener, ITabOnCloseHandler { /** * */ @@ -218,8 +218,8 @@ public class ZkReportViewer extends Window implements EventListener, ITab //set default type String type = m_reportEngine.getPrintFormat().isForm() // a42niem - provide explicit default and check on client/org specifics - ? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE","PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)) - : MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE","PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)); + ? MSysConfig.getValue(MSysConfig.ZK_REPORT_FORM_OUTPUT_TYPE,"PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)) + : MSysConfig.getValue(MSysConfig.ZK_REPORT_TABLE_OUTPUT_TYPE,"PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx)); if ("PDF".equals(type)) previewType.setSelectedIndex(0); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java b/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java index abca3dd2bb..036c4d55df 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java @@ -12,14 +12,14 @@ import org.compiere.minigrid.IMiniTable; import org.compiere.model.MFactReconciliation; import org.compiere.model.MRole; import org.compiere.model.Query; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; -public class FactReconcile implements SystemIDs { +public class FactReconcile { /** Logger */ public static CLogger log = CLogger.getCLogger(FactReconcile.class); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java index 727b27efb1..480b2c8d12 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java @@ -29,7 +29,7 @@ import org.compiere.model.MPInstance; import org.compiere.model.MPInstancePara; import org.compiere.model.MPrivateAccess; import org.compiere.model.MRMA; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.ReportEngine; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; @@ -43,7 +43,7 @@ import org.compiere.util.Trx; * Generate Shipment (manual) controller class * */ -public class InOutGen extends GenForm implements SystemIDs +public class InOutGen extends GenForm { /** Logger */ private static CLogger log = CLogger.getCLogger(InOutGen.class); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java index d7731f444d..f5504e043e 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java @@ -29,7 +29,7 @@ import org.compiere.model.MPInstance; import org.compiere.model.MPInstancePara; import org.compiere.model.MPrivateAccess; import org.compiere.model.MRMA; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.print.ReportEngine; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; @@ -43,7 +43,7 @@ import org.compiere.util.Trx; * Generate Invoice (manual) controller class * */ -public class InvoiceGen extends GenForm implements SystemIDs +public class InvoiceGen extends GenForm { /** Logger */ private static CLogger log = CLogger.getCLogger(InvoiceGen.class); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java b/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java index f803cb6e34..04038e824c 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java @@ -28,7 +28,7 @@ import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupInfo; import org.compiere.model.MPaySelectionCheck; import org.compiere.model.MPaymentBatch; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -36,7 +36,7 @@ import org.compiere.util.KeyNamePair; import org.compiere.util.Language; import org.compiere.util.ValueNamePair; -public class PayPrint implements SystemIDs { +public class PayPrint { /** Window No */ public int m_WindowNo = 0; diff --git a/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java b/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java index 2f234ea2d1..283173f8ac 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java @@ -31,7 +31,7 @@ import org.compiere.model.MLookupInfo; import org.compiere.model.MPaySelection; import org.compiere.model.MPaySelectionLine; import org.compiere.model.MRole; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.model.X_C_Order; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; @@ -45,7 +45,7 @@ import org.compiere.util.Trx; import org.compiere.util.ValueNamePair; -public class PaySelect implements SystemIDs +public class PaySelect { /** @todo withholding */ diff --git a/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java b/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java index 961f25a071..68ac076dce 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java @@ -24,13 +24,13 @@ import org.compiere.model.GridTab; import org.compiere.model.GridWindow; import org.compiere.model.GridWindowVO; import org.compiere.model.MQuery; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; -public class TrxMaterial implements SystemIDs { +public class TrxMaterial { /** Window No */ public int m_WindowNo = 0; diff --git a/org.adempiere.ui/src/org/compiere/print/ReportCtl.java b/org.adempiere.ui/src/org/compiere/print/ReportCtl.java index 8207ba1209..774fce026d 100644 --- a/org.adempiere.ui/src/org/compiere/print/ReportCtl.java +++ b/org.adempiere.ui/src/org/compiere/print/ReportCtl.java @@ -27,7 +27,7 @@ import org.compiere.model.MProcess; import org.compiere.model.MQuery; import org.compiere.model.MTable; import org.compiere.model.PrintInfo; -import org.compiere.model.SystemIDs; +import static org.compiere.model.SystemIDs.*; import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; import org.compiere.util.Env; @@ -41,7 +41,7 @@ import org.compiere.util.Env; * @author Teo Sarca, SC ARHIPAC SERVICE SRL *
  • FR [ 1866739 ] ReportCtl: use printformat from the transient/serializable */ -public class ReportCtl implements SystemIDs +public class ReportCtl { /** * @deprecated Please use {@link ServerReportCtl#PARAM_PRINTER_NAME} diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java index df186ba804..cc4aad2d1b 100644 --- a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java @@ -86,7 +86,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { found_next_fuction = sqlStatement.toUpperCase().indexOf("NEXTID("); if(found_next_fuction > 0) { - boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false); + boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false); boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS); if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)