IDEMPIERE-236 - Centralization of hardcoded IDs / centralize also the MSysConfig keys - Thanks to David Peñuela
This commit is contained in:
parent
2f6dedf643
commit
9fcf487478
|
@ -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");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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<Fact> facts = new ArrayList<Fact>();
|
||||
facts.add(fact);
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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(".")) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -2222,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()+"^");
|
||||
|
|
|
@ -52,10 +52,10 @@ public class MLocation extends X_C_Location implements Comparator<Object>
|
|||
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
|
||||
|
|
|
@ -1325,10 +1325,10 @@ 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
|
||||
|
@ -1785,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;
|
||||
|
|
|
@ -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@"));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -38,9 +38,6 @@ public class SerializableMatrixImpl<T extends Serializable> 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<T extends Serializable> 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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<KeyNamePair> list = new ArrayList<KeyNamePair>();
|
||||
|
||||
|
@ -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<KeyNamePair> clientList = new ArrayList<KeyNamePair>();
|
||||
ArrayList<Integer> clientsValidated = new ArrayList<Integer>();
|
||||
|
@ -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
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -55,7 +55,7 @@ public class EnableNativeSequence extends SvrProcess
|
|||
|
||||
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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 = "";
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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<CityVO> list = new ArrayList<CityVO>();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -303,7 +303,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, 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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -105,10 +105,6 @@ public class GridPanel extends Borderlayout implements EventListener<Event>
|
|||
|
||||
private Map<Integer, String> 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<Event>
|
|||
}
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -79,8 +79,6 @@ public class ListPanel extends Borderlayout implements EventListener
|
|||
|
||||
private Map<Integer, String> 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -182,7 +182,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
|
|||
bxRecentItems.removeChild(comp);
|
||||
}
|
||||
|
||||
int maxri = MSysConfig.getIntValue("RecentItems_MaxShown", 10, Env.getAD_Client_ID(Env.getCtx()));
|
||||
int maxri = MSysConfig.getIntValue(MSysConfig.RecentItems_MaxShown, 10, Env.getAD_Client_ID(Env.getCtx()));
|
||||
if (maxri <= 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ public class DashboardRunnable implements Runnable, Serializable
|
|||
|
||||
private static final CLogger logger = CLogger.getCLogger(DashboardRunnable.class);
|
||||
|
||||
private final static String ZK_DASHBOARD_REFRESH_INTERVAL = "ZK_DASHBOARD_REFRESH_INTERVAL";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param desktop zk desktop interface
|
||||
|
@ -75,7 +73,7 @@ public class DashboardRunnable implements Runnable, Serializable
|
|||
public void run()
|
||||
{
|
||||
// default Update every one minutes
|
||||
int interval = MSysConfig.getIntValue(ZK_DASHBOARD_REFRESH_INTERVAL, 60000);
|
||||
int interval = MSysConfig.getIntValue(MSysConfig.ZK_DASHBOARD_REFRESH_INTERVAL, 60000);
|
||||
int cumulativeFailure = 0;
|
||||
while(!stop) {
|
||||
try {
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.zkoss.zk.ui.Page;
|
|||
public interface IDesktop extends UIPart {
|
||||
|
||||
public static final String WINDOWNO_ATTRIBUTE = "desktop.windowno";
|
||||
public static final String CLASS_NAME_KEY = "ZK_DESKTOP_CLASS";
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class WAutoCompleterCity extends AutoComplete implements EventListener
|
|||
|
||||
private ArrayList<CityVO> m_citiesShow = new ArrayList<CityVO>();
|
||||
|
||||
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, "");
|
||||
|
||||
|
|
|
@ -218,8 +218,8 @@ public class ZkReportViewer extends Window implements EventListener<Event>, 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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue