diff --git a/org.adempiere.base-feature/model.generator.launch b/org.adempiere.base-feature/model.generator.launch index c95a37a99c..ce24686eec 100644 --- a/org.adempiere.base-feature/model.generator.launch +++ b/org.adempiere.base-feature/model.generator.launch @@ -394,9 +394,6 @@ - - - diff --git a/org.adempiere.base-feature/packinfolder.app.launch b/org.adempiere.base-feature/packinfolder.app.launch index ca907cacac..384e6146d2 100644 --- a/org.adempiere.base-feature/packinfolder.app.launch +++ b/org.adempiere.base-feature/packinfolder.app.launch @@ -394,9 +394,6 @@ - - - diff --git a/org.adempiere.base-feature/sign.database.build.launch b/org.adempiere.base-feature/sign.database.build.launch index 6971021d42..7a9ffc17dc 100644 --- a/org.adempiere.base-feature/sign.database.build.launch +++ b/org.adempiere.base-feature/sign.database.build.launch @@ -394,9 +394,6 @@ - - - diff --git a/org.adempiere.base-feature/synchronize-terminology.app.launch b/org.adempiere.base-feature/synchronize-terminology.app.launch index ac69cdc620..77c8a63e7a 100644 --- a/org.adempiere.base-feature/synchronize-terminology.app.launch +++ b/org.adempiere.base-feature/synchronize-terminology.app.launch @@ -394,9 +394,6 @@ - - - diff --git a/org.adempiere.base-feature/translation.app.launch b/org.adempiere.base-feature/translation.app.launch index f132adff2d..c9fcc7d2d9 100644 --- a/org.adempiere.base-feature/translation.app.launch +++ b/org.adempiere.base-feature/translation.app.launch @@ -394,9 +394,6 @@ - - - diff --git a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java index efe4fd2e88..b759684173 100644 --- a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java +++ b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java @@ -20,7 +20,6 @@ import java.io.File; import java.util.logging.Level; import org.compiere.model.MClient; -import org.compiere.model.MStore; import org.compiere.util.Env; import org.compiere.util.Ini; @@ -71,15 +70,6 @@ public class EMailTest extends SvrProcess else addLog(0, null, null, "Not Found Directory: " + client.getDocumentDir()); } - - MStore[] wstores = MStore.getOfClient(client); - for (int i = 0; i < wstores.length; i++) - { - MStore store = wstores[i]; - String test = store.testEMail(); - msglog = new StringBuilder().append(store.getName()).append(": ").append(test); - addLog(0, null, null, msglog.toString()); - } return clientTest; } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/SendMailText.java b/org.adempiere.base.process/src/org/compiere/process/SendMailText.java index a5d8688831..b277c51782 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SendMailText.java +++ b/org.adempiere.base.process/src/org/compiere/process/SendMailText.java @@ -25,7 +25,6 @@ import java.util.logging.Level; import org.compiere.model.MClient; import org.compiere.model.MInterestArea; import org.compiere.model.MMailText; -import org.compiere.model.MStore; import org.compiere.model.MUser; import org.compiere.model.MUserMail; import org.compiere.util.DB; @@ -144,18 +143,6 @@ public class SendMailText extends SvrProcess .append(": ").append(m_ia.getName()) .append("\n").append(Msg.getMsg(getCtx(), "UnsubscribeInfo")) .append("\n"); - MStore[] wstores = MStore.getOfClient(m_client); - int index = 0; - for (int i = 0; i < wstores.length; i++) - { - if (wstores[i].isDefault()) - { - index = i; - break; - } - } - if (wstores.length > 0) - unsubscribe.append(wstores[index].getWebContext(true)); } // diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_UserMail.java b/org.adempiere.base/src/org/compiere/model/I_AD_UserMail.java index 7d6a32a588..51a9f3b50f 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_UserMail.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserMail.java @@ -268,6 +268,4 @@ public interface I_AD_UserMail * Web Store Mail Message Template */ public int getW_MailMsg_ID(); - - public org.compiere.model.I_W_MailMsg getW_MailMsg() throws RuntimeException; } diff --git a/org.adempiere.base/src/org/compiere/model/I_W_Advertisement.java b/org.adempiere.base/src/org/compiere/model/I_W_Advertisement.java deleted file mode 100644 index 7f9f96f5da..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_Advertisement.java +++ /dev/null @@ -1,382 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_Advertisement - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_Advertisement -{ - - /** TableName=W_Advertisement */ - public static final String Table_Name = "W_Advertisement"; - - /** AD_Table_ID=579 */ - public static final int Table_ID = 579; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name AdText */ - public static final String COLUMNNAME_AdText = "AdText"; - - /** Set Advertisement Text. - * Text of the Advertisement - */ - public void setAdText (String AdText); - - /** Get Advertisement Text. - * Text of the Advertisement - */ - public String getAdText(); - - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - public org.compiere.model.I_AD_User getAD_User() throws RuntimeException; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException; - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name Help */ - public static final String COLUMNNAME_Help = "Help"; - - /** Set Comment/Help. - * Comment or Hint - */ - public void setHelp (String Help); - - /** Get Comment/Help. - * Comment or Hint - */ - public String getHelp(); - - /** Column name ImageURL */ - public static final String COLUMNNAME_ImageURL = "ImageURL"; - - /** Set Image URL. - * URL of image - */ - public void setImageURL (String ImageURL); - - /** Get Image URL. - * URL of image - */ - public String getImageURL(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name IsSelfService */ - public static final String COLUMNNAME_IsSelfService = "IsSelfService"; - - /** Set Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService); - - /** Get Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name PublishStatus */ - public static final String COLUMNNAME_PublishStatus = "PublishStatus"; - - /** Set Publication Status. - * Status of Publication - */ - public void setPublishStatus (String PublishStatus); - - /** Get Publication Status. - * Status of Publication - */ - public String getPublishStatus(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name ValidFrom */ - public static final String COLUMNNAME_ValidFrom = "ValidFrom"; - - /** Set Valid from. - * Valid from including this date (first day) - */ - public void setValidFrom (Timestamp ValidFrom); - - /** Get Valid from. - * Valid from including this date (first day) - */ - public Timestamp getValidFrom(); - - /** Column name ValidTo */ - public static final String COLUMNNAME_ValidTo = "ValidTo"; - - /** Set Valid to. - * Valid to including this date (last day) - */ - public void setValidTo (Timestamp ValidTo); - - /** Get Valid to. - * Valid to including this date (last day) - */ - public Timestamp getValidTo(); - - /** Column name Version */ - public static final String COLUMNNAME_Version = "Version"; - - /** Set Version. - * Version of the table definition - */ - public void setVersion (int Version); - - /** Get Version. - * Version of the table definition - */ - public int getVersion(); - - /** Column name W_Advertisement_ID */ - public static final String COLUMNNAME_W_Advertisement_ID = "W_Advertisement_ID"; - - /** Set Advertisement. - * Web Advertisement - */ - public void setW_Advertisement_ID (int W_Advertisement_ID); - - /** Get Advertisement. - * Web Advertisement - */ - public int getW_Advertisement_ID(); - - /** Column name W_Advertisement_UU */ - public static final String COLUMNNAME_W_Advertisement_UU = "W_Advertisement_UU"; - - /** Set W_Advertisement_UU */ - public void setW_Advertisement_UU (String W_Advertisement_UU); - - /** Get W_Advertisement_UU */ - public String getW_Advertisement_UU(); - - /** Column name W_ClickCount_ID */ - public static final String COLUMNNAME_W_ClickCount_ID = "W_ClickCount_ID"; - - /** Set Click Count. - * Web Click Management - */ - public void setW_ClickCount_ID (int W_ClickCount_ID); - - /** Get Click Count. - * Web Click Management - */ - public int getW_ClickCount_ID(); - - public org.compiere.model.I_W_ClickCount getW_ClickCount() throws RuntimeException; - - /** Column name W_CounterCount_ID */ - public static final String COLUMNNAME_W_CounterCount_ID = "W_CounterCount_ID"; - - /** Set Counter Count. - * Web Counter Count Management - */ - public void setW_CounterCount_ID (int W_CounterCount_ID); - - /** Get Counter Count. - * Web Counter Count Management - */ - public int getW_CounterCount_ID(); - - public org.compiere.model.I_W_CounterCount getW_CounterCount() throws RuntimeException; - - /** Column name WebParam1 */ - public static final String COLUMNNAME_WebParam1 = "WebParam1"; - - /** Set Web Parameter 1. - * Web Site Parameter 1 (default: header image) - */ - public void setWebParam1 (String WebParam1); - - /** Get Web Parameter 1. - * Web Site Parameter 1 (default: header image) - */ - public String getWebParam1(); - - /** Column name WebParam2 */ - public static final String COLUMNNAME_WebParam2 = "WebParam2"; - - /** Set Web Parameter 2. - * Web Site Parameter 2 (default index page) - */ - public void setWebParam2 (String WebParam2); - - /** Get Web Parameter 2. - * Web Site Parameter 2 (default index page) - */ - public String getWebParam2(); - - /** Column name WebParam3 */ - public static final String COLUMNNAME_WebParam3 = "WebParam3"; - - /** Set Web Parameter 3. - * Web Site Parameter 3 (default left - menu) - */ - public void setWebParam3 (String WebParam3); - - /** Get Web Parameter 3. - * Web Site Parameter 3 (default left - menu) - */ - public String getWebParam3(); - - /** Column name WebParam4 */ - public static final String COLUMNNAME_WebParam4 = "WebParam4"; - - /** Set Web Parameter 4. - * Web Site Parameter 4 (default footer left) - */ - public void setWebParam4 (String WebParam4); - - /** Get Web Parameter 4. - * Web Site Parameter 4 (default footer left) - */ - public String getWebParam4(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_Basket.java b/org.adempiere.base/src/org/compiere/model/I_W_Basket.java deleted file mode 100644 index a308579320..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_Basket.java +++ /dev/null @@ -1,198 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_Basket - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_Basket -{ - - /** TableName=W_Basket */ - public static final String Table_Name = "W_Basket"; - - /** AD_Table_ID=402 */ - public static final int Table_ID = 402; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 4 - System - */ - BigDecimal accessLevel = BigDecimal.valueOf(4); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - public org.compiere.model.I_AD_User getAD_User() throws RuntimeException; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException; - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name EMail */ - public static final String COLUMNNAME_EMail = "EMail"; - - /** Set EMail Address. - * Electronic Mail Address - */ - public void setEMail (String EMail); - - /** Get EMail Address. - * Electronic Mail Address - */ - public String getEMail(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; - - /** Set Price List. - * Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID); - - /** Get Price List. - * Unique identifier of a Price List - */ - public int getM_PriceList_ID(); - - public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException; - - /** Column name Session_ID */ - public static final String COLUMNNAME_Session_ID = "Session_ID"; - - /** Set Session ID */ - public void setSession_ID (int Session_ID); - - /** Get Session ID */ - public int getSession_ID(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name W_Basket_ID */ - public static final String COLUMNNAME_W_Basket_ID = "W_Basket_ID"; - - /** Set Basket. - * Web Basket - */ - public void setW_Basket_ID (int W_Basket_ID); - - /** Get Basket. - * Web Basket - */ - public int getW_Basket_ID(); - - /** Column name W_Basket_UU */ - public static final String COLUMNNAME_W_Basket_UU = "W_Basket_UU"; - - /** Set W_Basket_UU */ - public void setW_Basket_UU (String W_Basket_UU); - - /** Get W_Basket_UU */ - public String getW_Basket_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_BasketLine.java b/org.adempiere.base/src/org/compiere/model/I_W_BasketLine.java deleted file mode 100644 index 91b4420171..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_BasketLine.java +++ /dev/null @@ -1,222 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_BasketLine - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_BasketLine -{ - - /** TableName=W_BasketLine */ - public static final String Table_Name = "W_BasketLine"; - - /** AD_Table_ID=549 */ - public static final int Table_ID = 549; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 4 - System - */ - BigDecimal accessLevel = BigDecimal.valueOf(4); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name Line */ - public static final String COLUMNNAME_Line = "Line"; - - /** Set Line No. - * Unique line for this document - */ - public void setLine (int Line); - - /** Get Line No. - * Unique line for this document - */ - public int getLine(); - - /** Column name M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - - /** Set Product. - * Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID); - - /** Get Product. - * Product, Service, Item - */ - public int getM_Product_ID(); - - public org.compiere.model.I_M_Product getM_Product() throws RuntimeException; - - /** Column name Price */ - public static final String COLUMNNAME_Price = "Price"; - - /** Set Price. - * Price - */ - public void setPrice (BigDecimal Price); - - /** Get Price. - * Price - */ - public BigDecimal getPrice(); - - /** Column name Product */ - public static final String COLUMNNAME_Product = "Product"; - - /** Set Product */ - public void setProduct (String Product); - - /** Get Product */ - public String getProduct(); - - /** Column name Qty */ - public static final String COLUMNNAME_Qty = "Qty"; - - /** Set Quantity. - * Quantity - */ - public void setQty (BigDecimal Qty); - - /** Get Quantity. - * Quantity - */ - public BigDecimal getQty(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name W_Basket_ID */ - public static final String COLUMNNAME_W_Basket_ID = "W_Basket_ID"; - - /** Set Basket. - * Web Basket - */ - public void setW_Basket_ID (int W_Basket_ID); - - /** Get Basket. - * Web Basket - */ - public int getW_Basket_ID(); - - public org.compiere.model.I_W_Basket getW_Basket() throws RuntimeException; - - /** Column name W_BasketLine_ID */ - public static final String COLUMNNAME_W_BasketLine_ID = "W_BasketLine_ID"; - - /** Set Basket Line. - * Web Basket Line - */ - public void setW_BasketLine_ID (int W_BasketLine_ID); - - /** Get Basket Line. - * Web Basket Line - */ - public int getW_BasketLine_ID(); - - /** Column name W_BasketLine_UU */ - public static final String COLUMNNAME_W_BasketLine_UU = "W_BasketLine_UU"; - - /** Set W_BasketLine_UU */ - public void setW_BasketLine_UU (String W_BasketLine_UU); - - /** Get W_BasketLine_UU */ - public String getW_BasketLine_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_Click.java b/org.adempiere.base/src/org/compiere/model/I_W_Click.java deleted file mode 100644 index c0f7c9b86b..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_Click.java +++ /dev/null @@ -1,263 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_Click - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_Click -{ - - /** TableName=W_Click */ - public static final String Table_Name = "W_Click"; - - /** AD_Table_ID=550 */ - public static final int Table_ID = 550; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AcceptLanguage */ - public static final String COLUMNNAME_AcceptLanguage = "AcceptLanguage"; - - /** Set Accept Language. - * Language accepted based on browser information - */ - public void setAcceptLanguage (String AcceptLanguage); - - /** Get Accept Language. - * Language accepted based on browser information - */ - public String getAcceptLanguage(); - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name EMail */ - public static final String COLUMNNAME_EMail = "EMail"; - - /** Set EMail Address. - * Electronic Mail Address - */ - public void setEMail (String EMail); - - /** Get EMail Address. - * Electronic Mail Address - */ - public String getEMail(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Referrer */ - public static final String COLUMNNAME_Referrer = "Referrer"; - - /** Set Referrer. - * Referring web address - */ - public void setReferrer (String Referrer); - - /** Get Referrer. - * Referring web address - */ - public String getReferrer(); - - /** Column name Remote_Addr */ - public static final String COLUMNNAME_Remote_Addr = "Remote_Addr"; - - /** Set Remote Addr. - * Remote Address - */ - public void setRemote_Addr (String Remote_Addr); - - /** Get Remote Addr. - * Remote Address - */ - public String getRemote_Addr(); - - /** Column name Remote_Host */ - public static final String COLUMNNAME_Remote_Host = "Remote_Host"; - - /** Set Remote Host. - * Remote host Info - */ - public void setRemote_Host (String Remote_Host); - - /** Get Remote Host. - * Remote host Info - */ - public String getRemote_Host(); - - /** Column name TargetURL */ - public static final String COLUMNNAME_TargetURL = "TargetURL"; - - /** Set Target URL. - * URL for the Target - */ - public void setTargetURL (String TargetURL); - - /** Get Target URL. - * URL for the Target - */ - public String getTargetURL(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name UserAgent */ - public static final String COLUMNNAME_UserAgent = "UserAgent"; - - /** Set User Agent. - * Browser Used - */ - public void setUserAgent (String UserAgent); - - /** Get User Agent. - * Browser Used - */ - public String getUserAgent(); - - /** Column name W_ClickCount_ID */ - public static final String COLUMNNAME_W_ClickCount_ID = "W_ClickCount_ID"; - - /** Set Click Count. - * Web Click Management - */ - public void setW_ClickCount_ID (int W_ClickCount_ID); - - /** Get Click Count. - * Web Click Management - */ - public int getW_ClickCount_ID(); - - public org.compiere.model.I_W_ClickCount getW_ClickCount() throws RuntimeException; - - /** Column name W_Click_ID */ - public static final String COLUMNNAME_W_Click_ID = "W_Click_ID"; - - /** Set Web Click. - * Individual Web Click - */ - public void setW_Click_ID (int W_Click_ID); - - /** Get Web Click. - * Individual Web Click - */ - public int getW_Click_ID(); - - /** Column name W_Click_UU */ - public static final String COLUMNNAME_W_Click_UU = "W_Click_UU"; - - /** Set W_Click_UU */ - public void setW_Click_UU (String W_Click_UU); - - /** Get W_Click_UU */ - public String getW_Click_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_ClickCount.java b/org.adempiere.base/src/org/compiere/model/I_W_ClickCount.java deleted file mode 100644 index 40f23f3510..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_ClickCount.java +++ /dev/null @@ -1,198 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_ClickCount - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_ClickCount -{ - - /** TableName=W_ClickCount */ - public static final String Table_Name = "W_ClickCount"; - - /** AD_Table_ID=553 */ - public static final int Table_ID = 553; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException; - - /** Column name Counter */ - public static final String COLUMNNAME_Counter = "Counter"; - - /** Set Counter. - * Count Value - */ - public void setCounter (int Counter); - - /** Get Counter. - * Count Value - */ - public int getCounter(); - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name TargetURL */ - public static final String COLUMNNAME_TargetURL = "TargetURL"; - - /** Set Target URL. - * URL for the Target - */ - public void setTargetURL (String TargetURL); - - /** Get Target URL. - * URL for the Target - */ - public String getTargetURL(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name W_ClickCount_ID */ - public static final String COLUMNNAME_W_ClickCount_ID = "W_ClickCount_ID"; - - /** Set Click Count. - * Web Click Management - */ - public void setW_ClickCount_ID (int W_ClickCount_ID); - - /** Get Click Count. - * Web Click Management - */ - public int getW_ClickCount_ID(); - - /** Column name W_ClickCount_UU */ - public static final String COLUMNNAME_W_ClickCount_UU = "W_ClickCount_UU"; - - /** Set W_ClickCount_UU */ - public void setW_ClickCount_UU (String W_ClickCount_UU); - - /** Get W_ClickCount_UU */ - public String getW_ClickCount_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_Counter.java b/org.adempiere.base/src/org/compiere/model/I_W_Counter.java deleted file mode 100644 index 52ccb801ee..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_Counter.java +++ /dev/null @@ -1,259 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_Counter - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_Counter -{ - - /** TableName=W_Counter */ - public static final String Table_Name = "W_Counter"; - - /** AD_Table_ID=403 */ - public static final int Table_ID = 403; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AcceptLanguage */ - public static final String COLUMNNAME_AcceptLanguage = "AcceptLanguage"; - - /** Set Accept Language. - * Language accepted based on browser information - */ - public void setAcceptLanguage (String AcceptLanguage); - - /** Get Accept Language. - * Language accepted based on browser information - */ - public String getAcceptLanguage(); - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name EMail */ - public static final String COLUMNNAME_EMail = "EMail"; - - /** Set EMail Address. - * Electronic Mail Address - */ - public void setEMail (String EMail); - - /** Get EMail Address. - * Electronic Mail Address - */ - public String getEMail(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name PageURL */ - public static final String COLUMNNAME_PageURL = "PageURL"; - - /** Set Page URL */ - public void setPageURL (String PageURL); - - /** Get Page URL */ - public String getPageURL(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Referrer */ - public static final String COLUMNNAME_Referrer = "Referrer"; - - /** Set Referrer. - * Referring web address - */ - public void setReferrer (String Referrer); - - /** Get Referrer. - * Referring web address - */ - public String getReferrer(); - - /** Column name Remote_Addr */ - public static final String COLUMNNAME_Remote_Addr = "Remote_Addr"; - - /** Set Remote Addr. - * Remote Address - */ - public void setRemote_Addr (String Remote_Addr); - - /** Get Remote Addr. - * Remote Address - */ - public String getRemote_Addr(); - - /** Column name Remote_Host */ - public static final String COLUMNNAME_Remote_Host = "Remote_Host"; - - /** Set Remote Host. - * Remote host Info - */ - public void setRemote_Host (String Remote_Host); - - /** Get Remote Host. - * Remote host Info - */ - public String getRemote_Host(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name UserAgent */ - public static final String COLUMNNAME_UserAgent = "UserAgent"; - - /** Set User Agent. - * Browser Used - */ - public void setUserAgent (String UserAgent); - - /** Get User Agent. - * Browser Used - */ - public String getUserAgent(); - - /** Column name W_CounterCount_ID */ - public static final String COLUMNNAME_W_CounterCount_ID = "W_CounterCount_ID"; - - /** Set Counter Count. - * Web Counter Count Management - */ - public void setW_CounterCount_ID (int W_CounterCount_ID); - - /** Get Counter Count. - * Web Counter Count Management - */ - public int getW_CounterCount_ID(); - - public org.compiere.model.I_W_CounterCount getW_CounterCount() throws RuntimeException; - - /** Column name W_Counter_ID */ - public static final String COLUMNNAME_W_Counter_ID = "W_Counter_ID"; - - /** Set Web Counter. - * Individual Count hit - */ - public void setW_Counter_ID (int W_Counter_ID); - - /** Get Web Counter. - * Individual Count hit - */ - public int getW_Counter_ID(); - - /** Column name W_Counter_UU */ - public static final String COLUMNNAME_W_Counter_UU = "W_Counter_UU"; - - /** Set W_Counter_UU */ - public void setW_Counter_UU (String W_Counter_UU); - - /** Get W_Counter_UU */ - public String getW_Counter_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_CounterCount.java b/org.adempiere.base/src/org/compiere/model/I_W_CounterCount.java deleted file mode 100644 index 6121821983..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_CounterCount.java +++ /dev/null @@ -1,194 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_CounterCount - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_CounterCount -{ - - /** TableName=W_CounterCount */ - public static final String Table_Name = "W_CounterCount"; - - /** AD_Table_ID=552 */ - public static final int Table_ID = 552; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException; - - /** Column name Counter */ - public static final String COLUMNNAME_Counter = "Counter"; - - /** Set Counter. - * Count Value - */ - public void setCounter (int Counter); - - /** Get Counter. - * Count Value - */ - public int getCounter(); - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name PageURL */ - public static final String COLUMNNAME_PageURL = "PageURL"; - - /** Set Page URL */ - public void setPageURL (String PageURL); - - /** Get Page URL */ - public String getPageURL(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name W_CounterCount_ID */ - public static final String COLUMNNAME_W_CounterCount_ID = "W_CounterCount_ID"; - - /** Set Counter Count. - * Web Counter Count Management - */ - public void setW_CounterCount_ID (int W_CounterCount_ID); - - /** Get Counter Count. - * Web Counter Count Management - */ - public int getW_CounterCount_ID(); - - /** Column name W_CounterCount_UU */ - public static final String COLUMNNAME_W_CounterCount_UU = "W_CounterCount_UU"; - - /** Set W_CounterCount_UU */ - public void setW_CounterCount_UU (String W_CounterCount_UU); - - /** Get W_CounterCount_UU */ - public String getW_CounterCount_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_MailMsg.java b/org.adempiere.base/src/org/compiere/model/I_W_MailMsg.java deleted file mode 100644 index fc434f9841..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_MailMsg.java +++ /dev/null @@ -1,237 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_MailMsg - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_MailMsg -{ - - /** TableName=W_MailMsg */ - public static final String Table_Name = "W_MailMsg"; - - /** AD_Table_ID=780 */ - public static final int Table_ID = 780; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 2 - Client - */ - BigDecimal accessLevel = BigDecimal.valueOf(2); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name MailMsgType */ - public static final String COLUMNNAME_MailMsgType = "MailMsgType"; - - /** Set Message Type. - * Mail Message Type - */ - public void setMailMsgType (String MailMsgType); - - /** Get Message Type. - * Mail Message Type - */ - public String getMailMsgType(); - - /** Column name Message */ - public static final String COLUMNNAME_Message = "Message"; - - /** Set Message. - * EMail Message - */ - public void setMessage (String Message); - - /** Get Message. - * EMail Message - */ - public String getMessage(); - - /** Column name Message2 */ - public static final String COLUMNNAME_Message2 = "Message2"; - - /** Set Message 2. - * Optional second part of the EMail Message - */ - public void setMessage2 (String Message2); - - /** Get Message 2. - * Optional second part of the EMail Message - */ - public String getMessage2(); - - /** Column name Message3 */ - public static final String COLUMNNAME_Message3 = "Message3"; - - /** Set Message 3. - * Optional third part of the EMail Message - */ - public void setMessage3 (String Message3); - - /** Get Message 3. - * Optional third part of the EMail Message - */ - public String getMessage3(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name Subject */ - public static final String COLUMNNAME_Subject = "Subject"; - - /** Set Subject. - * Email Message Subject - */ - public void setSubject (String Subject); - - /** Get Subject. - * Email Message Subject - */ - public String getSubject(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name W_MailMsg_ID */ - public static final String COLUMNNAME_W_MailMsg_ID = "W_MailMsg_ID"; - - /** Set Mail Message. - * Web Store Mail Message Template - */ - public void setW_MailMsg_ID (int W_MailMsg_ID); - - /** Get Mail Message. - * Web Store Mail Message Template - */ - public int getW_MailMsg_ID(); - - /** Column name W_MailMsg_UU */ - public static final String COLUMNNAME_W_MailMsg_UU = "W_MailMsg_UU"; - - /** Set W_MailMsg_UU */ - public void setW_MailMsg_UU (String W_MailMsg_UU); - - /** Get W_MailMsg_UU */ - public String getW_MailMsg_UU(); - - /** Column name W_Store_ID */ - public static final String COLUMNNAME_W_Store_ID = "W_Store_ID"; - - /** Set Web Store. - * A Web Store of the Client - */ - public void setW_Store_ID (int W_Store_ID); - - /** Get Web Store. - * A Web Store of the Client - */ - public int getW_Store_ID(); - - public org.compiere.model.I_W_Store getW_Store() throws RuntimeException; -} diff --git a/org.adempiere.base/src/org/compiere/model/I_W_Store.java b/org.adempiere.base/src/org/compiere/model/I_W_Store.java deleted file mode 100644 index 95c8f3f368..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_W_Store.java +++ /dev/null @@ -1,581 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for W_Store - * @author iDempiere (generated) - * @version Release 7.1 - */ -public interface I_W_Store -{ - - /** TableName=W_Store */ - public static final String Table_Name = "W_Store"; - - /** AD_Table_ID=778 */ - public static final int Table_ID = 778; - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 2 - Client - */ - BigDecimal accessLevel = BigDecimal.valueOf(2); - - /** Load Meta Data */ - - /** Column name AD_Client_ID */ - public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; - - /** Get Client. - * Client/Tenant for this installation. - */ - public int getAD_Client_ID(); - - /** Column name AD_Org_ID */ - public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; - - /** Set Organization. - * Organizational entity within client - */ - public void setAD_Org_ID (int AD_Org_ID); - - /** Get Organization. - * Organizational entity within client - */ - public int getAD_Org_ID(); - - /** Column name C_PaymentTerm_ID */ - public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID"; - - /** Set Payment Term. - * The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID); - - /** Get Payment Term. - * The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID(); - - public org.compiere.model.I_C_PaymentTerm getC_PaymentTerm() throws RuntimeException; - - /** Column name Created */ - public static final String COLUMNNAME_Created = "Created"; - - /** Get Created. - * Date this record was created - */ - public Timestamp getCreated(); - - /** Column name CreatedBy */ - public static final String COLUMNNAME_CreatedBy = "CreatedBy"; - - /** Get Created By. - * User who created this records - */ - public int getCreatedBy(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name EMailFooter */ - public static final String COLUMNNAME_EMailFooter = "EMailFooter"; - - /** Set EMail Footer. - * Footer added to EMails - */ - public void setEMailFooter (String EMailFooter); - - /** Get EMail Footer. - * Footer added to EMails - */ - public String getEMailFooter(); - - /** Column name EMailHeader */ - public static final String COLUMNNAME_EMailHeader = "EMailHeader"; - - /** Set EMail Header. - * Header added to EMails - */ - public void setEMailHeader (String EMailHeader); - - /** Get EMail Header. - * Header added to EMails - */ - public String getEMailHeader(); - - /** Column name Help */ - public static final String COLUMNNAME_Help = "Help"; - - /** Set Comment/Help. - * Comment or Hint - */ - public void setHelp (String Help); - - /** Get Comment/Help. - * Comment or Hint - */ - public String getHelp(); - - /** Column name IsActive */ - public static final String COLUMNNAME_IsActive = "IsActive"; - - /** Set Active. - * The record is active in the system - */ - public void setIsActive (boolean IsActive); - - /** Get Active. - * The record is active in the system - */ - public boolean isActive(); - - /** Column name IsDefault */ - public static final String COLUMNNAME_IsDefault = "IsDefault"; - - /** Set Default. - * Default value - */ - public void setIsDefault (boolean IsDefault); - - /** Get Default. - * Default value - */ - public boolean isDefault(); - - /** Column name IsMenuAssets */ - public static final String COLUMNNAME_IsMenuAssets = "IsMenuAssets"; - - /** Set Menu Assets. - * Show Menu Assets - */ - public void setIsMenuAssets (boolean IsMenuAssets); - - /** Get Menu Assets. - * Show Menu Assets - */ - public boolean isMenuAssets(); - - /** Column name IsMenuContact */ - public static final String COLUMNNAME_IsMenuContact = "IsMenuContact"; - - /** Set Menu Contact. - * Show Menu Contact - */ - public void setIsMenuContact (boolean IsMenuContact); - - /** Get Menu Contact. - * Show Menu Contact - */ - public boolean isMenuContact(); - - /** Column name IsMenuInterests */ - public static final String COLUMNNAME_IsMenuInterests = "IsMenuInterests"; - - /** Set Menu Interests. - * Show Menu Interests - */ - public void setIsMenuInterests (boolean IsMenuInterests); - - /** Get Menu Interests. - * Show Menu Interests - */ - public boolean isMenuInterests(); - - /** Column name IsMenuInvoices */ - public static final String COLUMNNAME_IsMenuInvoices = "IsMenuInvoices"; - - /** Set Menu Invoices. - * Show Menu Invoices - */ - public void setIsMenuInvoices (boolean IsMenuInvoices); - - /** Get Menu Invoices. - * Show Menu Invoices - */ - public boolean isMenuInvoices(); - - /** Column name IsMenuOrders */ - public static final String COLUMNNAME_IsMenuOrders = "IsMenuOrders"; - - /** Set Menu Orders. - * Show Menu Orders - */ - public void setIsMenuOrders (boolean IsMenuOrders); - - /** Get Menu Orders. - * Show Menu Orders - */ - public boolean isMenuOrders(); - - /** Column name IsMenuPayments */ - public static final String COLUMNNAME_IsMenuPayments = "IsMenuPayments"; - - /** Set Menu Payments. - * Show Menu Payments - */ - public void setIsMenuPayments (boolean IsMenuPayments); - - /** Get Menu Payments. - * Show Menu Payments - */ - public boolean isMenuPayments(); - - /** Column name IsMenuRegistrations */ - public static final String COLUMNNAME_IsMenuRegistrations = "IsMenuRegistrations"; - - /** Set Menu Registrations. - * Show Menu Registrations - */ - public void setIsMenuRegistrations (boolean IsMenuRegistrations); - - /** Get Menu Registrations. - * Show Menu Registrations - */ - public boolean isMenuRegistrations(); - - /** Column name IsMenuRequests */ - public static final String COLUMNNAME_IsMenuRequests = "IsMenuRequests"; - - /** Set Menu Requests. - * Show Menu Requests - */ - public void setIsMenuRequests (boolean IsMenuRequests); - - /** Get Menu Requests. - * Show Menu Requests - */ - public boolean isMenuRequests(); - - /** Column name IsMenuRfQs */ - public static final String COLUMNNAME_IsMenuRfQs = "IsMenuRfQs"; - - /** Set Menu RfQs. - * Show Menu RfQs - */ - public void setIsMenuRfQs (boolean IsMenuRfQs); - - /** Get Menu RfQs. - * Show Menu RfQs - */ - public boolean isMenuRfQs(); - - /** Column name IsMenuShipments */ - public static final String COLUMNNAME_IsMenuShipments = "IsMenuShipments"; - - /** Set Menu Shipments. - * Show Menu Shipments - */ - public void setIsMenuShipments (boolean IsMenuShipments); - - /** Get Menu Shipments. - * Show Menu Shipments - */ - public boolean isMenuShipments(); - - /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; - - /** Set Price List. - * Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID); - - /** Get Price List. - * Unique identifier of a Price List - */ - public int getM_PriceList_ID(); - - public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException; - - /** Column name M_Warehouse_ID */ - public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; - - /** Set Warehouse. - * Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID); - - /** Get Warehouse. - * Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID(); - - public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException; - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; - - /** Set Sales Representative. - * Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID); - - /** Get Sales Representative. - * Sales Representative or Company Agent - */ - public int getSalesRep_ID(); - - public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException; - - /** Column name Stylesheet */ - public static final String COLUMNNAME_Stylesheet = "Stylesheet"; - - /** Set Stylesheet. - * CSS (Stylesheet) used - */ - public void setStylesheet (String Stylesheet); - - /** Get Stylesheet. - * CSS (Stylesheet) used - */ - public String getStylesheet(); - - /** Column name Updated */ - public static final String COLUMNNAME_Updated = "Updated"; - - /** Get Updated. - * Date this record was updated - */ - public Timestamp getUpdated(); - - /** Column name UpdatedBy */ - public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; - - /** Get Updated By. - * User who updated this records - */ - public int getUpdatedBy(); - - /** Column name URL */ - public static final String COLUMNNAME_URL = "URL"; - - /** Set URL. - * Full URL address - e.g. http://www.idempiere.org - */ - public void setURL (String URL); - - /** Get URL. - * Full URL address - e.g. http://www.idempiere.org - */ - public String getURL(); - - /** Column name WebContext */ - public static final String COLUMNNAME_WebContext = "WebContext"; - - /** Set Web Context. - * Web Server Context - e.g. /wstore - */ - public void setWebContext (String WebContext); - - /** Get Web Context. - * Web Server Context - e.g. /wstore - */ - public String getWebContext(); - - /** Column name WebInfo */ - public static final String COLUMNNAME_WebInfo = "WebInfo"; - - /** Set Web Store Info. - * Web Store Header Information - */ - public void setWebInfo (String WebInfo); - - /** Get Web Store Info. - * Web Store Header Information - */ - public String getWebInfo(); - - /** Column name WebOrderEMail */ - public static final String COLUMNNAME_WebOrderEMail = "WebOrderEMail"; - - /** Set Web Order EMail. - * EMail address to receive notifications when web orders were processed - */ - public void setWebOrderEMail (String WebOrderEMail); - - /** Get Web Order EMail. - * EMail address to receive notifications when web orders were processed - */ - public String getWebOrderEMail(); - - /** Column name WebParam1 */ - public static final String COLUMNNAME_WebParam1 = "WebParam1"; - - /** Set Web Parameter 1. - * Web Site Parameter 1 (default: header image) - */ - public void setWebParam1 (String WebParam1); - - /** Get Web Parameter 1. - * Web Site Parameter 1 (default: header image) - */ - public String getWebParam1(); - - /** Column name WebParam2 */ - public static final String COLUMNNAME_WebParam2 = "WebParam2"; - - /** Set Web Parameter 2. - * Web Site Parameter 2 (default index page) - */ - public void setWebParam2 (String WebParam2); - - /** Get Web Parameter 2. - * Web Site Parameter 2 (default index page) - */ - public String getWebParam2(); - - /** Column name WebParam3 */ - public static final String COLUMNNAME_WebParam3 = "WebParam3"; - - /** Set Web Parameter 3. - * Web Site Parameter 3 (default left - menu) - */ - public void setWebParam3 (String WebParam3); - - /** Get Web Parameter 3. - * Web Site Parameter 3 (default left - menu) - */ - public String getWebParam3(); - - /** Column name WebParam4 */ - public static final String COLUMNNAME_WebParam4 = "WebParam4"; - - /** Set Web Parameter 4. - * Web Site Parameter 4 (default footer left) - */ - public void setWebParam4 (String WebParam4); - - /** Get Web Parameter 4. - * Web Site Parameter 4 (default footer left) - */ - public String getWebParam4(); - - /** Column name WebParam5 */ - public static final String COLUMNNAME_WebParam5 = "WebParam5"; - - /** Set Web Parameter 5. - * Web Site Parameter 5 (default footer center) - */ - public void setWebParam5 (String WebParam5); - - /** Get Web Parameter 5. - * Web Site Parameter 5 (default footer center) - */ - public String getWebParam5(); - - /** Column name WebParam6 */ - public static final String COLUMNNAME_WebParam6 = "WebParam6"; - - /** Set Web Parameter 6. - * Web Site Parameter 6 (default footer right) - */ - public void setWebParam6 (String WebParam6); - - /** Get Web Parameter 6. - * Web Site Parameter 6 (default footer right) - */ - public String getWebParam6(); - - /** Column name WStoreEMail */ - public static final String COLUMNNAME_WStoreEMail = "WStoreEMail"; - - /** Set Web Store EMail. - * EMail address used as the sender (From) - */ - public void setWStoreEMail (String WStoreEMail); - - /** Get Web Store EMail. - * EMail address used as the sender (From) - */ - public String getWStoreEMail(); - - /** Column name W_Store_ID */ - public static final String COLUMNNAME_W_Store_ID = "W_Store_ID"; - - /** Set Web Store. - * A Web Store of the Client - */ - public void setW_Store_ID (int W_Store_ID); - - /** Get Web Store. - * A Web Store of the Client - */ - public int getW_Store_ID(); - - /** Column name WStoreUser */ - public static final String COLUMNNAME_WStoreUser = "WStoreUser"; - - /** Set WebStore User. - * User ID of the Web Store EMail address - */ - public void setWStoreUser (String WStoreUser); - - /** Get WebStore User. - * User ID of the Web Store EMail address - */ - public String getWStoreUser(); - - /** Column name WStoreUserPW */ - public static final String COLUMNNAME_WStoreUserPW = "WStoreUserPW"; - - /** Set WebStore Password. - * Password of the Web Store EMail address - */ - public void setWStoreUserPW (String WStoreUserPW); - - /** Get WebStore Password. - * Password of the Web Store EMail address - */ - public String getWStoreUserPW(); - - /** Column name W_Store_UU */ - public static final String COLUMNNAME_W_Store_UU = "W_Store_UU"; - - /** Set W_Store_UU */ - public void setW_Store_UU (String W_Store_UU); - - /** Get W_Store_UU */ - public String getW_Store_UU(); -} diff --git a/org.adempiere.base/src/org/compiere/model/MAdvertisement.java b/org.adempiere.base/src/org/compiere/model/MAdvertisement.java deleted file mode 100644 index 88055bf23e..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MAdvertisement.java +++ /dev/null @@ -1,163 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; - -import org.compiere.util.DB; -import org.compiere.util.ValueNamePair; - -/** - * Advertisement Model - * - * @author Jorg Janke - * @version $Id: MAdvertisement.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ - */ -public class MAdvertisement extends X_W_Advertisement -{ - /** - * - */ - private static final long serialVersionUID = 8129122675267734690L; - - - /** - * Default Constructor - * @param ctx context - * @param W_Advertisement_ID id - * @param trxName transaction - */ - public MAdvertisement (Properties ctx, int W_Advertisement_ID, String trxName) - { - super (ctx, W_Advertisement_ID, trxName); - /** if (W_Advertisement_ID == 0) - { - setC_BPartner_ID (0); - setIsSelfService (false); - setName (null); - setW_Advertisement_ID (0); - } - **/ - } // MAdvertisement - - /** - * Load Constructor - * @param ctx context - * @param rs result set - * @param trxName transaction - */ - public MAdvertisement (Properties ctx, ResultSet rs, String trxName) - { - super(ctx, rs, trxName); - } // MAdvertisement - - /** Click Count */ - private MClickCount m_clickCount = null; - /** Counter Count */ - private MCounterCount m_counterCount = null; - /** Sales Rep */ - private int m_SalesRep_ID = 0; - - - /************************************************************************** - * Get ClickCount - * @return Click Count - */ - public MClickCount getMClickCount() - { - if (getW_ClickCount_ID() == 0) - return null; - if (m_clickCount == null) - m_clickCount = new MClickCount (getCtx(), getW_ClickCount_ID(), get_TrxName()); - return m_clickCount; - } // MClickCount - - /** - * Get Click Target URL (from ClickCount) - * @return URL - */ - public String getClickTargetURL() - { - getMClickCount(); - if (m_clickCount == null) - return "-"; - return m_clickCount.getTargetURL(); - } // getClickTargetURL - - /** - * Set Click Target URL (in ClickCount) - * @param TargetURL url - */ - public void setClickTargetURL(String TargetURL) - { - getMClickCount(); - if (m_clickCount == null) - m_clickCount = new MClickCount(this); - if (m_clickCount != null) - { - m_clickCount.setTargetURL(TargetURL); - m_clickCount.saveEx(get_TrxName()); - } - } // getClickTargetURL - - - /** - * Get Weekly Count - * @return weekly count - */ - public ValueNamePair[] getClickCountWeek () - { - getMClickCount(); - if (m_clickCount == null) - return new ValueNamePair[0]; - return m_clickCount.getCountWeek(); - } // getClickCountWeek - - - /** - * Get CounterCount - * @return Counter Count - */ - public MCounterCount getMCounterCount() - { - if (getW_CounterCount_ID() == 0) - return null; - if (m_counterCount == null) - m_counterCount = new MCounterCount (getCtx(), getW_CounterCount_ID(), get_TrxName()); - return m_counterCount; - } // MCounterCount - - /** - * Get Sales Rep ID. - * (AD_User_ID of oldest BP user) - * @return Sales Rep ID - */ - public int getSalesRep_ID() - { - if (m_SalesRep_ID == 0) - { - m_SalesRep_ID = getAD_User_ID(); - if (m_SalesRep_ID == 0) - m_SalesRep_ID = DB.getSQLValue(null, - "SELECT AD_User_ID FROM AD_User " - + "WHERE C_BPartner_ID=? AND IsActive='Y' ORDER BY AD_User_ID", getC_BPartner_ID()); - } - return m_SalesRep_ID; - } // getSalesRep_ID - -} // MAdvertisement diff --git a/org.adempiere.base/src/org/compiere/model/MClick.java b/org.adempiere.base/src/org/compiere/model/MClick.java deleted file mode 100644 index f31f43326d..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MClick.java +++ /dev/null @@ -1,268 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Properties; -import java.util.logging.Level; - -import org.compiere.Adempiere; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.Env; - -/** - * Actual Click - * - * @author Jorg Janke - * @version $Id: MClick.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ - */ -public class MClick extends X_W_Click -{ - /** - * - */ - private static final long serialVersionUID = 850591754099789308L; - - - /** - * Get Unprocessed Clicks - * @param ctx context - * @return array of unprocessed clicks - */ - public static MClick[] getUnprocessed(Properties ctx) - { - ArrayList list = new ArrayList (); - String sql = "SELECT * FROM W_Click WHERE AD_Client_ID=? AND Processed = 'N'"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, Env.getAD_Client_ID(ctx)); - rs = pstmt.executeQuery (); - while (rs.next ()) - { - list.add (new MClick (ctx, rs, null)); - } - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - // - MClick[] retValue = new MClick[list.size ()]; - list.toArray (retValue); - return retValue; - } // getUnprocessed - - /** Logger */ - private static CLogger s_log = CLogger.getCLogger (MClick.class); - - - /************************************************************************** - * Actual Click - * @param ctx context - * @param W_Click_ID ID - * @param trxName transaction - */ - public MClick (Properties ctx, int W_Click_ID, String trxName) - { - super (ctx, W_Click_ID, trxName); - if (W_Click_ID == 0) - setProcessed (false); - } // MClick - - /** - * Actual Click - * @param ctx context - * @param TargetURL url - * @param trxName transaction - */ - public MClick (Properties ctx, String TargetURL, String trxName) - { - this (ctx, 0, trxName); - setTargetURL(TargetURL); - } // MClick - - /** - * Load Constructor - * @param ctx context - * @param rs result set - * @param trxName transaction - */ - public MClick (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } // MClick - - /** - * Set Target URL. Reset Click Count - * @param TargetURL - */ - public void setTargetURL(String TargetURL) - { - super.setTargetURL(TargetURL); - super.setW_ClickCount_ID(0); - } // setTargetURL - - /** - * Find Click Count. - */ - public void setW_ClickCount_ID () - { - // clean up url - String url = getTargetURL(); - if (url == null || url.length() == 0) - return; - String exactURL = url; - // remove everything before first / . - if (url.startsWith("http://")) - url = url.substring(7); - int dot = url.indexOf('.'); - int slash = url.indexOf('/'); - while (dot > slash && slash != -1) - { - url = url.substring(slash+1); - dot = url.indexOf('.'); - slash = url.indexOf('/'); - } - // remove everything after / - if (slash != -1) - url = url.substring(0, slash); - if (log.isLoggable(Level.FINE)) log.fine(exactURL + " -> " + url); - int W_ClickCount_ID = search (url, exactURL); - // try minumum - if (W_ClickCount_ID == 0) - { - int lastDot = url.lastIndexOf('.'); - int firstDot = url.indexOf('.'); - while (lastDot != firstDot) - { - url = url.substring(firstDot+1); - lastDot = url.lastIndexOf('.'); - firstDot = url.indexOf('.'); - } - if (log.isLoggable(Level.FINE)) log.fine(exactURL + " -> " + url); - W_ClickCount_ID = search (url, exactURL); - } - // Not found - if (W_ClickCount_ID == 0) - { - log.warning ("Not found: " + url - + " (" + exactURL + ") Referrer=" + getReferrer()); - return; - } - // OK - setProcessed(true); - super.setW_ClickCount_ID (W_ClickCount_ID); - } // setW_ClickCount_ID - - /** - * Search for Click Count - * @param url url - * @param exactURL original url - * @return W_ClickCount_ID - */ - private int search (String url, String exactURL) - { - String sql = "SELECT W_ClickCount_ID, TargetURL FROM W_ClickCount WHERE TargetURL LIKE ?"; - int W_ClickCount_ID = 0; - int exactW_ClickCount_ID = 0; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - StringBuilder msgstr = new StringBuilder("%").append(url).append("%"); - pstmt.setString(1, msgstr.toString()); - rs = pstmt.executeQuery(); - while (rs.next()) - { - W_ClickCount_ID = rs.getInt(1); - if (exactURL.equals(rs.getString(2))) - { - exactW_ClickCount_ID = W_ClickCount_ID; - break; - } - } - } - catch (SQLException ex) - { - log.log(Level.SEVERE, sql, ex); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - // Set Click Count - if (exactW_ClickCount_ID != 0) - W_ClickCount_ID = exactW_ClickCount_ID; - return W_ClickCount_ID; - } // search - - /** - * Before Save - * @param newRecord new - * @return true - */ - protected boolean beforeSave (boolean newRecord) - { - if (getW_ClickCount_ID() == 0) - setW_ClickCount_ID(); - return true; - } // beforeSave - - /************************************************************************** - * Test - * @param args ignored - */ - public static void main (String[] args) - { - Adempiere.startup(true); - Env.setContext(Env.getCtx(), "#AD_Client_ID", 1000000); - MClick[] clicks = getUnprocessed(Env.getCtx()); - int counter = 0; - for (int i = 0; i < clicks.length; i++) - { - MClick click = clicks[i]; - if (click.getW_ClickCount_ID() == 0) - { - click.setW_ClickCount_ID(); - if (click.getW_ClickCount_ID() != 0) - { - click.saveEx(); - counter++; - } - } - } - - System.out.println("#" + counter); - } // main - -} // MClick diff --git a/org.adempiere.base/src/org/compiere/model/MClickCount.java b/org.adempiere.base/src/org/compiere/model/MClickCount.java deleted file mode 100644 index 7f2981c421..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MClickCount.java +++ /dev/null @@ -1,183 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.text.DecimalFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Properties; -import java.util.logging.Level; - -import org.compiere.util.DB; -import org.compiere.util.DisplayType; -import org.compiere.util.ValueNamePair; - -/** - * Click Count (header) - * - * @author Jorg Janke - * @version $Id: MClickCount.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $ - */ -public class MClickCount extends X_W_ClickCount -{ - /** - * - */ - private static final long serialVersionUID = -5233509415147834823L; - - - /** - * Standard Constructor - * @param ctx context - * @param W_ClickCount_ID id - * @param trxName transaction - */ - public MClickCount (Properties ctx, int W_ClickCount_ID, String trxName) - { - super (ctx, W_ClickCount_ID, trxName); - if (W_ClickCount_ID == 0) - { - // setName (null); - // setTargetURL (null); - } - } // MClickCount - - /** - * Load Constructor - * @param ctx context - * @param rs result set - * @param trxName transaction - */ - public MClickCount (Properties ctx, ResultSet rs, String trxName) - { - super(ctx, rs, trxName); - } // MClickCount - - /** - * Parent Constructor - * @param ad parent - */ - public MClickCount (MAdvertisement ad) - { - this (ad.getCtx(), 0, ad.get_TrxName()); - setName(ad.getName()); - setTargetURL("#"); - setC_BPartner_ID(ad.getC_BPartner_ID()); - } // MClickCount - - private SimpleDateFormat m_dateFormat = DisplayType.getDateFormat(DisplayType.Date); - private DecimalFormat m_intFormat = DisplayType.getNumberFormat(DisplayType.Integer); - - - /************************************************************************** - * Get Clicks - * @return clicks - */ - public MClick[] getMClicks() - { - ArrayList list = new ArrayList(); - /** @todo Clicks */ - // - MClick[] retValue = new MClick[list.size()]; - list.toArray(retValue); - return retValue; - } // getMClicks - - /** - * Get Count for date format - * @param DateFormat valid TRUNC date format - * @return count - */ - protected ValueNamePair[] getCount (String DateFormat) - { - ArrayList list = new ArrayList(); - StringBuilder sql = new StringBuilder("SELECT TRUNC(Created, '").append(DateFormat).append("'), Count(*) ") - .append("FROM W_Click ") - .append("WHERE W_ClickCount_ID=? ") - .append("GROUP BY TRUNC(Created, '").append(DateFormat).append("')"); - // - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql.toString(), null); - pstmt.setInt(1, getW_ClickCount_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - { - String value = m_dateFormat.format(rs.getTimestamp(1)); - String name = m_intFormat.format(rs.getInt(2)); - ValueNamePair pp = new ValueNamePair (value, name); - list.add(pp); - } - } - catch (SQLException ex) - { - log.log(Level.SEVERE, sql.toString(), ex); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - // - ValueNamePair[] retValue = new ValueNamePair[list.size()]; - list.toArray(retValue); - return retValue; - } // getCount - - /** - * Get Monthly Count - * @return monthly count - */ - public ValueNamePair[] getCountQuarter () - { - return getCount("Q"); - } // getCountQuarter - - /** - * Get Monthly Count - * @return monthly count - */ - public ValueNamePair[] getCountMonth () - { - return getCount("MM"); - } // getCountMonth - - /** - * Get Weekly Count - * @return weekly count - */ - public ValueNamePair[] getCountWeek () - { - return getCount("DY"); - } // getCountWeek - - /** - * Get Daily Count - * @return dailt count - */ - public ValueNamePair[] getCountDay () - { - return getCount("J"); - } // getCountDay - -} // MClickCount diff --git a/org.adempiere.base/src/org/compiere/model/MCounterCount.java b/org.adempiere.base/src/org/compiere/model/MCounterCount.java deleted file mode 100644 index 0f92ec908d..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MCounterCount.java +++ /dev/null @@ -1,63 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; - -/** - * Web Counter (header) - * - * @author Jorg Janke - * @version $Id: MCounterCount.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ - */ -public class MCounterCount extends X_W_CounterCount -{ - /** - * - */ - private static final long serialVersionUID = -5348749341548369844L; - - /** - * Standard Constructor - * @param ctx context - * @param W_CounterCount_ID id - * @param trxName transaction - */ - public MCounterCount (Properties ctx, int W_CounterCount_ID, String trxName) - { - super (ctx, W_CounterCount_ID, trxName); - if (W_CounterCount_ID == 0) - { - setCounter (0); - // setName (null); - // setPageURL (null); - } - } // MCounterCount - - /** - * Load Constructor - * @param ctx context - * @param rs result set - * @param trxName transaction - */ - public MCounterCount (Properties ctx, ResultSet rs, String trxName) - { - super(ctx, rs, trxName); - } // MCounterCount - -} // MCounterCount diff --git a/org.adempiere.base/src/org/compiere/model/MMailMsg.java b/org.adempiere.base/src/org/compiere/model/MMailMsg.java deleted file mode 100644 index f6367b8c06..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MMailMsg.java +++ /dev/null @@ -1,88 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; - -/** - * Wab Store Mail Message Model - * @author Jorg Janke - * @version $Id: MMailMsg.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $ - */ -public class MMailMsg extends X_W_MailMsg -{ - /** - * - */ - private static final long serialVersionUID = 6181691633960939054L; - - /************************************************************************** - * Standard Constructor - * @param ctx context - * @param W_MailMsg_ID id - * @param trxName trx - */ - public MMailMsg (Properties ctx, int W_MailMsg_ID, String trxName) - { - super (ctx, W_MailMsg_ID, trxName); - if (W_MailMsg_ID == 0) - { - // setW_Store_ID (0); - // setMailMsgType (null); - // setName (null); - // setSubject (null); - // setMessage (null); - } - } // MMailMsg - - /** - * Load Constructor - * @param ctx context - * @param rs result set - * @param trxName trx - */ - public MMailMsg (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } // MMailMsg - - /** - * Full Constructor - * @param parent store - * @param MailMsgType msg type - * @param Name name - * @param Subject subject - * @param Message message - * @param Message2 message - * @param Message3 message - */ - public MMailMsg (MStore parent, String MailMsgType, - String Name, String Subject, String Message, String Message2, String Message3) - { - this (parent.getCtx(), 0, parent.get_TrxName()); - setClientOrg(parent); - setW_Store_ID(parent.getW_Store_ID()); - setMailMsgType (MailMsgType); - setName (Name); - setSubject (Subject); - setMessage (Message); - setMessage2 (Message2); - setMessage3 (Message3); - } // MMailMsg - -} // MMailMsg diff --git a/org.adempiere.base/src/org/compiere/model/MStore.java b/org.adempiere.base/src/org/compiere/model/MStore.java deleted file mode 100644 index e0e0587d17..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MStore.java +++ /dev/null @@ -1,614 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.Properties; -import java.util.logging.Level; - -import org.compiere.util.CCache; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.EMail; -import org.compiere.util.Env; -import org.compiere.util.Msg; - -/** - * Web Store - * @author Jorg Janke - * @version $Id: MStore.java,v 1.4 2006/07/30 00:51:05 jjanke Exp $ - */ -public class MStore extends X_W_Store -{ - /** - * - */ - private static final long serialVersionUID = -5836212836465405633L; - - - /** - * Get WStore from Cache - * @param ctx context - * @param W_Store_ID id - * @return WStore - */ - public static MStore get (Properties ctx, int W_Store_ID) - { - Integer key = Integer.valueOf(W_Store_ID); - MStore retValue = (MStore) s_cache.get (key); - if (retValue != null) - return retValue; - retValue = new MStore (ctx, W_Store_ID, null); - if (retValue.get_ID () != 0) - s_cache.put (key, retValue); - return retValue; - } // get - - /** - * Get WStore from Cache - * @param ctx context - * @param contextPath web server context path - * @return WStore - */ - public static MStore get (Properties ctx, String contextPath) - { - MStore wstore = null; - Iterator it = s_cache.values().iterator(); - while (it.hasNext()) - { - wstore = (MStore)it.next(); - if (wstore.getWebContext().equals(contextPath)) - return wstore; - } - - // Search by context - PreparedStatement pstmt = null; - ResultSet rs = null; - String sql = "SELECT * FROM W_Store WHERE WebContext=?"; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setString(1, contextPath); - rs = pstmt.executeQuery (); - if (rs.next ()) - wstore = new MStore (ctx, rs, null); - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - // Try client - if (wstore == null) - { - sql = "SELECT * FROM W_Store WHERE AD_Client_ID=? AND IsActive='Y' ORDER BY W_Store_ID"; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, Env.getAD_Client_ID(ctx)); - rs = pstmt.executeQuery (); - if (rs.next ()) - { - wstore = new MStore (ctx, rs, null); - s_log.warning("Context " + contextPath - + " Not found - Found via AD_Client_ID=" + Env.getAD_Client_ID(ctx)); - } - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - } - // Nothing - if (wstore == null) - return null; - - // Save - Integer key = Integer.valueOf(wstore.getW_Store_ID()); - s_cache.put (key, wstore); - return wstore; - } // get - - /** - * Get active Web Stores of Clieny - * @param client client - * @return array of web stores - */ - public static MStore[] getOfClient (MClient client) - { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM W_Store WHERE AD_Client_ID=? AND IsActive='Y'"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, client.get_TrxName()); - pstmt.setInt (1, client.getAD_Client_ID()); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MStore (client.getCtx(), rs, client.get_TrxName())); - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - // - MStore[] retValue = new MStore[list.size ()]; - list.toArray (retValue); - return retValue; - } // getOfClient - - /** - * Get Active Web Stores - * @return cached web stores - */ - public static MStore[] getActive() - { - s_log.fine(""); - try - { - Collection cc = s_cache.values(); - Object[] oo = cc.toArray(); - for (int i = 0; i < oo.length; i++) - if (s_log.isLoggable(Level.INFO)) s_log.info(i + ": " + oo[i]); - MStore[] retValue = new MStore[oo.length]; - for (int i = 0; i < oo.length; i++) - retValue[i] = (MStore)oo[i]; - return retValue; - } - catch (Exception e) - { - s_log.severe(e.toString()); - } - return new MStore[]{}; - } // getActive - - /** Cache */ - private static CCache s_cache - = new CCache(Table_Name, 2); - /** Logger */ - private static CLogger s_log = CLogger.getCLogger (MStore.class); - - - /************************************************************************** - * Standard Constructor - * @param ctx context - * @param W_Store_ID id - * @param trxName trx - */ - public MStore (Properties ctx, int W_Store_ID, String trxName) - { - super (ctx, W_Store_ID, trxName); - if (W_Store_ID == 0) - { - setIsDefault (false); - setIsMenuAssets (true); // Y - setIsMenuContact (true); // Y - setIsMenuInterests (true); // Y - setIsMenuInvoices (true); // Y - setIsMenuOrders (true); // Y - setIsMenuPayments (true); // Y - setIsMenuRegistrations (true); // Y - setIsMenuRequests (true); // Y - setIsMenuRfQs (true); // Y - setIsMenuShipments (true); // Y - - // setC_PaymentTerm_ID (0); - // setM_PriceList_ID (0); - // setM_Warehouse_ID (0); - // setName (null); - // setSalesRep_ID (0); - // setURL (null); - // setWebContext (null); - } - } // MWStore - - /** - * Load Constructor - * @param ctx context - * @param rs result set - * @param trxName trx - */ - public MStore (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } // MWStore - - /** The Messages */ - private MMailMsg[] m_msgs = null; - - /** - * Get Web Context - * @param full if true fully qualified - * @return web context - */ - public String getWebContext(boolean full) - { - if (!full) - return super.getURL(); - String url = super.getURL(); - if (url == null || url.length() == 0) - url = "http://localhost"; - if (url.endsWith("/")) - url += url.substring(0, url.length()-1); - return url + getWebContext(); // starts with / - } // getWebContext - - /** - * String Representation - * @return info - */ - public String toString () - { - StringBuilder sb = new StringBuilder ("WStore["); - sb.append(getWebContext(true)) - .append ("]"); - return sb.toString (); - } // toString - - - /** - * Before Save - * @param newRecord new - * @return true if can be saved - */ - protected boolean beforeSave (boolean newRecord) - { - // Context to start with / - if (!getWebContext().startsWith("/")) - setWebContext("/" + getWebContext()); - - // Org to Warehouse - if (newRecord || is_ValueChanged("M_Warehouse_ID") || getAD_Org_ID() == 0) - { - MWarehouse wh = new MWarehouse (getCtx(), getM_Warehouse_ID(), get_TrxName()); - setAD_Org_ID(wh.getAD_Org_ID()); - } - - String url = getURL(); - if (url == null) - url = ""; - boolean urlOK = url.startsWith("http://") || url.startsWith("https://"); - if (!urlOK) // || url.indexOf("localhost") != -1) - { - log.saveError("FillMandatory", Msg.getElement(getCtx(), "URL") - + " - e.g. http://www.idempiere.org"); - return false; - } - - return true; - } // beforeSave - - - /************ - * Create EMail from Request User - * @param to recipient - * @param subject sunject - * @param message nessage - * @return EMail - */ - public EMail createEMail (String to, - String subject, String message) - { - if (to == null || to.length() == 0) - { - log.warning("No To"); - return null; - } - // - MClient client = MClient.get(getCtx(), getAD_Client_ID()); - String from = getWStoreEMail(); - if (from == null || from.length() == 0) - from = client.getRequestEMail(); - EMail email = new EMail (client, - from, to, - subject, message); - // Authorizetion - if (client.isSmtpAuthorization()) - { - if (getWStoreEMail() != null && getWStoreUser() != null && getWStoreUserPW() != null) - email.createAuthenticator (getWStoreUser(), getWStoreUserPW()); - else - email.createAuthenticator (client.getRequestUser(), client.getRequestUserPW()); - } - // Bcc - email.addBcc(from); - // - return email; - } // createEMail - - /** - * Send EMail from WebStore User - * @param to recipient email address - * @param subject subject - * @param message message - add header & footer - * @return true if sent - */ - public boolean sendEMail (String to, - String subject, String message) - { - if (message == null || message.length() == 0) - { - log.warning("No Message"); - return false; - } - StringBuilder msgText = new StringBuilder(); - if (getEMailHeader() != null) - msgText.append(getEMailHeader()); - msgText.append(message); - if (getEMailFooter() != null) - msgText.append(getEMailFooter()); - // - EMail email = createEMail(to, subject, msgText.toString()); - if (email == null) - return false; - - try - { - String msg = email.send(); - if (EMail.SENT_OK.equals (msg)) - { - if (log.isLoggable(Level.INFO)) log.info("Sent EMail " + subject + " to " + to); - return true; - } - else - { - log.warning("Could NOT Send Email: " + subject - + " to " + to + ": " + msg - + " (" + getName() + ")"); - return false; - } - } - catch (Exception ex) - { - log.severe(getName() + " - " + ex.getLocalizedMessage()); - return false; - } - } // sendEMail - - /** - * Test WebStore EMail - * @return OK or error - */ - public String testEMail() - { - if (getWStoreEMail() == null || getWStoreEMail().length() == 0) - return "No Web Store EMail for " + getName(); - // - EMail email = createEMail (getWStoreEMail(), - "iDempiere WebStore EMail Test", - "iDempiere WebStore EMail Test: " + toString()); - if (email == null) - return "Could not create Web Store EMail: " + getName(); - try - { - String msg = email.send(); - if (EMail.SENT_OK.equals (msg)) - { - if (log.isLoggable(Level.INFO)) log.info("Sent Test EMail to " + getWStoreEMail()); - return "OK"; - } - else - { - log.warning("Could NOT send Test Email to " - + getWStoreEMail() + ": " + msg); - return msg; - } - } - catch (Exception ex) - { - log.severe(getName() + " - " + ex.getLocalizedMessage()); - return ex.getLocalizedMessage(); - } - } // testEMail - - /** - * Get Messages - * @param reload reload data - * @return array of messages - */ - public MMailMsg[] getMailMsgs (boolean reload) - { - if (m_msgs != null && !reload) - return m_msgs; - ArrayList list = new ArrayList(); - // - String sql = "SELECT * FROM W_MailMsg WHERE W_Store_ID=? ORDER BY MailMsgType"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, get_TrxName()); - pstmt.setInt (1, getW_Store_ID()); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MMailMsg (getCtx(), rs, get_TrxName())); - } - catch (Exception e) - { - log.log (Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } - // - m_msgs = new MMailMsg[list.size ()]; - list.toArray (m_msgs); - return m_msgs; - } // getMailMsgs - - /** - * Get Mail Msg and if not found create it - * @param MailMsgType mail message type - * @return message - */ - public MMailMsg getMailMsg (String MailMsgType) - { - if (m_msgs == null) - getMailMsgs(false); - - // existing msg - for (int i = 0; i < m_msgs.length; i++) - { - if (m_msgs[i].getMailMsgType().equals(MailMsgType)) - return m_msgs[i]; - } - - // create missing - if (createMessages() == 0) - { - log.severe("Not created/found: " + MailMsgType); - return null; - } - getMailMsgs(true); - // try again - for (int i = 0; i < m_msgs.length; i++) - { - if (m_msgs[i].getMailMsgType().equals(MailMsgType)) - return m_msgs[i]; - } - - // nothing found - log.severe("Not found: " + MailMsgType); - return null; - } // getMailMsg - - - /************************************************************************** - * Create (missing) Messages - * @return number of messages created - */ - public int createMessages() - { - String[][] initMsgs = new String[][] - { - new String[]{MMailMsg.MAILMSGTYPE_UserVerification, - "EMail Verification", - "EMail Verification ", - "Dear ", - "\nYou requested the Verification Code: ", - "\nPlease enter the verification code to get access."}, - new String[]{MMailMsg.MAILMSGTYPE_UserPassword, - "Password Request", - "Password Request ", - "Dear ", - "\nWe received a 'Send Password' request from: ", - "\nYour password is: "}, - new String[]{MMailMsg.MAILMSGTYPE_Subscribe, - "Subscription New", - "New Subscription ", - "Dear ", - "\nYou requested to be added to the list: ", - "\nThanks for your interest."}, - new String[]{MMailMsg.MAILMSGTYPE_UnSubscribe, - "Subscription Removed", - "Remove Subscription ", - "Dear ", - "\nYou requested to be removed from the list: ", - "\nSorry to see you go. This is effictive immediately."}, - new String[]{MMailMsg.MAILMSGTYPE_OrderAcknowledgement, - "Order Acknowledgement", - "iDempiere Web - Order ", - "Dear ", - "\nThank you for your purchase: ", - "\nYou can view your Orders, Invoices, Payments in the Web Store." - + "\nFrom there, you also download your Assets (Documentation, etc.)"}, - new String[]{MMailMsg.MAILMSGTYPE_PaymentAcknowledgement, - "Payment Success", - "iDempiere Web - Payment ", - "Dear ", - "\nThank you for your payment of ", - "\nYou can view your Orders, Invoices, Payments in the Web Store." - + "\nFrom there you also download your Assets (Documentation, etc.)"}, - new String[]{MMailMsg.MAILMSGTYPE_PaymentError, - "Payment Error", - "iDempiere Web - Declined Payment ", - "Dear ", - "\nUnfortunately your payment was declined: ", - "\nPlease check and try again. You can pay later by going to 'My Orders' or 'My Invoices' - or by directly creating a payment in 'My Payments'"}, - new String[]{MMailMsg.MAILMSGTYPE_Request, - "Request", - "Request ", - "Dear ", - "\nThank you for your request: " + MRequest.SEPARATOR, - MRequest.SEPARATOR + "\nPlease check back for updates."}, - - new String[]{MMailMsg.MAILMSGTYPE_UserAccount, - "Welcome Message", - "Welcome", - "Welcome to our Web Store", - "This is the Validation Code to access information:", - ""}, - }; - - if (m_msgs == null) - getMailMsgs(false); - if (m_msgs.length == initMsgs.length) // may create a problem if user defined own ones - unlikely - return 0; // nothing to do - - int counter = 0; - for (int i = 0; i < initMsgs.length; i++) - { - boolean found = false; - for (int m = 0; m < m_msgs.length; m++) - { - if (initMsgs[i][0].equals(m_msgs[m].getMailMsgType())) - { - found = true; - break; - } - } // for all existing msgs - if (found) - continue; - MMailMsg msg = new MMailMsg(this, initMsgs[i][0], initMsgs[i][1], - initMsgs[i][2], initMsgs[i][3], initMsgs[i][4], initMsgs[i][5]); - if (msg.save()) - counter++; - else - log.severe("Not created MailMsgType=" + initMsgs[i][0]); - } // for all initMsgs - - if (log.isLoggable(Level.INFO)) log.info("#" + counter); - m_msgs = null; // reset - return counter; - } // createMessages - -} // MWStore diff --git a/org.adempiere.base/src/org/compiere/model/MUserMail.java b/org.adempiere.base/src/org/compiere/model/MUserMail.java index 6b52180bad..639a19c433 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserMail.java +++ b/org.adempiere.base/src/org/compiere/model/MUserMail.java @@ -81,29 +81,6 @@ public class MUserMail extends X_AD_UserMail } } // MUserMail - /** - * Parent Constructor - * @param parent Mail message - * @param AD_User_ID recipient user - * @param mail email - */ - public MUserMail (MMailMsg parent, int AD_User_ID, EMail mail) - { - this (parent.getCtx(), 0, parent.get_TrxName()); - setClientOrg(parent); - setAD_User_ID(AD_User_ID); - setW_MailMsg_ID(parent.getW_MailMsg_ID()); - setSenderAndRecipient(mail); - // - if (mail.isSentOK()) - setMessageID(mail.getMessageID()); - else - { - setMessageID(mail.getSentMsg()); - setIsDelivered(ISDELIVERED_No); - } - } // MUserMail - /** * New User Mail (no trx) * @param po persistent object diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_UserMail.java b/org.adempiere.base/src/org/compiere/model/X_AD_UserMail.java index 6f51736565..9efca3f84b 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_UserMail.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserMail.java @@ -317,11 +317,6 @@ public class X_AD_UserMail extends PO implements I_AD_UserMail, I_Persistent return (String)get_Value(COLUMNNAME_Subject); } - public org.compiere.model.I_W_MailMsg getW_MailMsg() throws RuntimeException - { - return (org.compiere.model.I_W_MailMsg)MTable.get(getCtx(), org.compiere.model.I_W_MailMsg.Table_Name) - .getPO(getW_MailMsg_ID(), get_TrxName()); } - /** Set Mail Message. @param W_MailMsg_ID Web Store Mail Message Template diff --git a/org.adempiere.base/src/org/compiere/model/X_W_Advertisement.java b/org.adempiere.base/src/org/compiere/model/X_W_Advertisement.java deleted file mode 100644 index e2464e3d2e..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_Advertisement.java +++ /dev/null @@ -1,518 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_Advertisement - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_Advertisement extends PO implements I_W_Advertisement, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_Advertisement (Properties ctx, int W_Advertisement_ID, String trxName) - { - super (ctx, W_Advertisement_ID, trxName); - /** if (W_Advertisement_ID == 0) - { - setAD_User_ID (0); -// -1 - setC_BPartner_ID (0); - setIsSelfService (true); -// Y - setName (null); - setPublishStatus (null); -// U - setW_Advertisement_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_Advertisement (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 3 - Client - Org - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_Advertisement[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Advertisement Text. - @param AdText - Text of the Advertisement - */ - public void setAdText (String AdText) - { - set_Value (COLUMNNAME_AdText, AdText); - } - - /** Get Advertisement Text. - @return Text of the Advertisement - */ - public String getAdText () - { - return (String)get_Value(COLUMNNAME_AdText); - } - - public org.compiere.model.I_AD_User getAD_User() throws RuntimeException - { - return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name) - .getPO(getAD_User_ID(), get_TrxName()); } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException - { - return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name) - .getPO(getC_BPartner_ID(), get_TrxName()); } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** Get Business Partner . - @return Identifies a Business Partner - */ - public int getC_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Comment/Help. - @param Help - Comment or Hint - */ - public void setHelp (String Help) - { - set_Value (COLUMNNAME_Help, Help); - } - - /** Get Comment/Help. - @return Comment or Hint - */ - public String getHelp () - { - return (String)get_Value(COLUMNNAME_Help); - } - - /** Set Image URL. - @param ImageURL - URL of image - */ - public void setImageURL (String ImageURL) - { - set_Value (COLUMNNAME_ImageURL, ImageURL); - } - - /** Get Image URL. - @return URL of image - */ - public String getImageURL () - { - return (String)get_Value(COLUMNNAME_ImageURL); - } - - /** Set Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Process Now. - @param Processing Process Now */ - public void setProcessing (boolean Processing) - { - set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); - } - - /** Get Process Now. - @return Process Now */ - public boolean isProcessing () - { - Object oo = get_Value(COLUMNNAME_Processing); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** PublishStatus AD_Reference_ID=310 */ - public static final int PUBLISHSTATUS_AD_Reference_ID=310; - /** Released = R */ - public static final String PUBLISHSTATUS_Released = "R"; - /** Test = T */ - public static final String PUBLISHSTATUS_Test = "T"; - /** Under Revision = U */ - public static final String PUBLISHSTATUS_UnderRevision = "U"; - /** Void = V */ - public static final String PUBLISHSTATUS_Void = "V"; - /** Set Publication Status. - @param PublishStatus - Status of Publication - */ - public void setPublishStatus (String PublishStatus) - { - - set_Value (COLUMNNAME_PublishStatus, PublishStatus); - } - - /** Get Publication Status. - @return Status of Publication - */ - public String getPublishStatus () - { - return (String)get_Value(COLUMNNAME_PublishStatus); - } - - /** Set Valid from. - @param ValidFrom - Valid from including this date (first day) - */ - public void setValidFrom (Timestamp ValidFrom) - { - set_Value (COLUMNNAME_ValidFrom, ValidFrom); - } - - /** Get Valid from. - @return Valid from including this date (first day) - */ - public Timestamp getValidFrom () - { - return (Timestamp)get_Value(COLUMNNAME_ValidFrom); - } - - /** Set Valid to. - @param ValidTo - Valid to including this date (last day) - */ - public void setValidTo (Timestamp ValidTo) - { - set_Value (COLUMNNAME_ValidTo, ValidTo); - } - - /** Get Valid to. - @return Valid to including this date (last day) - */ - public Timestamp getValidTo () - { - return (Timestamp)get_Value(COLUMNNAME_ValidTo); - } - - /** Set Version. - @param Version - Version of the table definition - */ - public void setVersion (int Version) - { - set_Value (COLUMNNAME_Version, Integer.valueOf(Version)); - } - - /** Get Version. - @return Version of the table definition - */ - public int getVersion () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Version); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Advertisement. - @param W_Advertisement_ID - Web Advertisement - */ - public void setW_Advertisement_ID (int W_Advertisement_ID) - { - if (W_Advertisement_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_Advertisement_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_Advertisement_ID, Integer.valueOf(W_Advertisement_ID)); - } - - /** Get Advertisement. - @return Web Advertisement - */ - public int getW_Advertisement_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Advertisement_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_Advertisement_UU. - @param W_Advertisement_UU W_Advertisement_UU */ - public void setW_Advertisement_UU (String W_Advertisement_UU) - { - set_Value (COLUMNNAME_W_Advertisement_UU, W_Advertisement_UU); - } - - /** Get W_Advertisement_UU. - @return W_Advertisement_UU */ - public String getW_Advertisement_UU () - { - return (String)get_Value(COLUMNNAME_W_Advertisement_UU); - } - - public org.compiere.model.I_W_ClickCount getW_ClickCount() throws RuntimeException - { - return (org.compiere.model.I_W_ClickCount)MTable.get(getCtx(), org.compiere.model.I_W_ClickCount.Table_Name) - .getPO(getW_ClickCount_ID(), get_TrxName()); } - - /** Set Click Count. - @param W_ClickCount_ID - Web Click Management - */ - public void setW_ClickCount_ID (int W_ClickCount_ID) - { - if (W_ClickCount_ID < 1) - set_Value (COLUMNNAME_W_ClickCount_ID, null); - else - set_Value (COLUMNNAME_W_ClickCount_ID, Integer.valueOf(W_ClickCount_ID)); - } - - /** Get Click Count. - @return Web Click Management - */ - public int getW_ClickCount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_ClickCount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public org.compiere.model.I_W_CounterCount getW_CounterCount() throws RuntimeException - { - return (org.compiere.model.I_W_CounterCount)MTable.get(getCtx(), org.compiere.model.I_W_CounterCount.Table_Name) - .getPO(getW_CounterCount_ID(), get_TrxName()); } - - /** Set Counter Count. - @param W_CounterCount_ID - Web Counter Count Management - */ - public void setW_CounterCount_ID (int W_CounterCount_ID) - { - if (W_CounterCount_ID < 1) - set_Value (COLUMNNAME_W_CounterCount_ID, null); - else - set_Value (COLUMNNAME_W_CounterCount_ID, Integer.valueOf(W_CounterCount_ID)); - } - - /** Get Counter Count. - @return Web Counter Count Management - */ - public int getW_CounterCount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_CounterCount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Web Parameter 1. - @param WebParam1 - Web Site Parameter 1 (default: header image) - */ - public void setWebParam1 (String WebParam1) - { - set_Value (COLUMNNAME_WebParam1, WebParam1); - } - - /** Get Web Parameter 1. - @return Web Site Parameter 1 (default: header image) - */ - public String getWebParam1 () - { - return (String)get_Value(COLUMNNAME_WebParam1); - } - - /** Set Web Parameter 2. - @param WebParam2 - Web Site Parameter 2 (default index page) - */ - public void setWebParam2 (String WebParam2) - { - set_Value (COLUMNNAME_WebParam2, WebParam2); - } - - /** Get Web Parameter 2. - @return Web Site Parameter 2 (default index page) - */ - public String getWebParam2 () - { - return (String)get_Value(COLUMNNAME_WebParam2); - } - - /** Set Web Parameter 3. - @param WebParam3 - Web Site Parameter 3 (default left - menu) - */ - public void setWebParam3 (String WebParam3) - { - set_Value (COLUMNNAME_WebParam3, WebParam3); - } - - /** Get Web Parameter 3. - @return Web Site Parameter 3 (default left - menu) - */ - public String getWebParam3 () - { - return (String)get_Value(COLUMNNAME_WebParam3); - } - - /** Set Web Parameter 4. - @param WebParam4 - Web Site Parameter 4 (default footer left) - */ - public void setWebParam4 (String WebParam4) - { - set_Value (COLUMNNAME_WebParam4, WebParam4); - } - - /** Get Web Parameter 4. - @return Web Site Parameter 4 (default footer left) - */ - public String getWebParam4 () - { - return (String)get_Value(COLUMNNAME_WebParam4); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_Basket.java b/org.adempiere.base/src/org/compiere/model/X_W_Basket.java deleted file mode 100644 index 5ade1b5a4b..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_Basket.java +++ /dev/null @@ -1,240 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_Basket - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_Basket extends PO implements I_W_Basket, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_Basket (Properties ctx, int W_Basket_ID, String trxName) - { - super (ctx, W_Basket_ID, trxName); - /** if (W_Basket_ID == 0) - { - setAD_User_ID (0); - setSession_ID (0); - setW_Basket_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_Basket (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 4 - System - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_Basket[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public org.compiere.model.I_AD_User getAD_User() throws RuntimeException - { - return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name) - .getPO(getAD_User_ID(), get_TrxName()); } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException - { - return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name) - .getPO(getC_BPartner_ID(), get_TrxName()); } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** Get Business Partner . - @return Identifies a Business Partner - */ - public int getC_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set EMail Address. - @param EMail - Electronic Mail Address - */ - public void setEMail (String EMail) - { - set_Value (COLUMNNAME_EMail, EMail); - } - - /** Get EMail Address. - @return Electronic Mail Address - */ - public String getEMail () - { - return (String)get_Value(COLUMNNAME_EMail); - } - - public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException - { - return (org.compiere.model.I_M_PriceList)MTable.get(getCtx(), org.compiere.model.I_M_PriceList.Table_Name) - .getPO(getM_PriceList_ID(), get_TrxName()); } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID < 1) - set_Value (COLUMNNAME_M_PriceList_ID, null); - else - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** Get Price List. - @return Unique identifier of a Price List - */ - public int getM_PriceList_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Session ID. - @param Session_ID Session ID */ - public void setSession_ID (int Session_ID) - { - if (Session_ID < 1) - set_Value (COLUMNNAME_Session_ID, null); - else - set_Value (COLUMNNAME_Session_ID, Integer.valueOf(Session_ID)); - } - - /** Get Session ID. - @return Session ID */ - public int getSession_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Session_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getSession_ID())); - } - - /** Set Basket. - @param W_Basket_ID - Web Basket - */ - public void setW_Basket_ID (int W_Basket_ID) - { - if (W_Basket_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_Basket_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_Basket_ID, Integer.valueOf(W_Basket_ID)); - } - - /** Get Basket. - @return Web Basket - */ - public int getW_Basket_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Basket_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_Basket_UU. - @param W_Basket_UU W_Basket_UU */ - public void setW_Basket_UU (String W_Basket_UU) - { - set_Value (COLUMNNAME_W_Basket_UU, W_Basket_UU); - } - - /** Get W_Basket_UU. - @return W_Basket_UU */ - public String getW_Basket_UU () - { - return (String)get_Value(COLUMNNAME_W_Basket_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_BasketLine.java b/org.adempiere.base/src/org/compiere/model/X_W_BasketLine.java deleted file mode 100644 index 61829f3271..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_BasketLine.java +++ /dev/null @@ -1,272 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_BasketLine - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_BasketLine extends PO implements I_W_BasketLine, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_BasketLine (Properties ctx, int W_BasketLine_ID, String trxName) - { - super (ctx, W_BasketLine_ID, trxName); - /** if (W_BasketLine_ID == 0) - { - setDescription (null); - setLine (0); - setPrice (Env.ZERO); - setProduct (null); - setQty (Env.ZERO); - setW_Basket_ID (0); - setW_BasketLine_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_BasketLine (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 4 - System - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_BasketLine[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Line No. - @param Line - Unique line for this document - */ - public void setLine (int Line) - { - set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); - } - - /** Get Line No. - @return Unique line for this document - */ - public int getLine () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Line); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getLine())); - } - - public org.compiere.model.I_M_Product getM_Product() throws RuntimeException - { - return (org.compiere.model.I_M_Product)MTable.get(getCtx(), org.compiere.model.I_M_Product.Table_Name) - .getPO(getM_Product_ID(), get_TrxName()); } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - set_Value (COLUMNNAME_M_Product_ID, null); - else - set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Price. - @param Price - Price - */ - public void setPrice (BigDecimal Price) - { - set_Value (COLUMNNAME_Price, Price); - } - - /** Get Price. - @return Price - */ - public BigDecimal getPrice () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Price); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Product. - @param Product Product */ - public void setProduct (String Product) - { - set_Value (COLUMNNAME_Product, Product); - } - - /** Get Product. - @return Product */ - public String getProduct () - { - return (String)get_Value(COLUMNNAME_Product); - } - - /** Set Quantity. - @param Qty - Quantity - */ - public void setQty (BigDecimal Qty) - { - set_Value (COLUMNNAME_Qty, Qty); - } - - /** Get Quantity. - @return Quantity - */ - public BigDecimal getQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); - if (bd == null) - return Env.ZERO; - return bd; - } - - public org.compiere.model.I_W_Basket getW_Basket() throws RuntimeException - { - return (org.compiere.model.I_W_Basket)MTable.get(getCtx(), org.compiere.model.I_W_Basket.Table_Name) - .getPO(getW_Basket_ID(), get_TrxName()); } - - /** Set Basket. - @param W_Basket_ID - Web Basket - */ - public void setW_Basket_ID (int W_Basket_ID) - { - if (W_Basket_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_Basket_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_Basket_ID, Integer.valueOf(W_Basket_ID)); - } - - /** Get Basket. - @return Web Basket - */ - public int getW_Basket_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Basket_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Basket Line. - @param W_BasketLine_ID - Web Basket Line - */ - public void setW_BasketLine_ID (int W_BasketLine_ID) - { - if (W_BasketLine_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_BasketLine_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_BasketLine_ID, Integer.valueOf(W_BasketLine_ID)); - } - - /** Get Basket Line. - @return Web Basket Line - */ - public int getW_BasketLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_BasketLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_BasketLine_UU. - @param W_BasketLine_UU W_BasketLine_UU */ - public void setW_BasketLine_UU (String W_BasketLine_UU) - { - set_Value (COLUMNNAME_W_BasketLine_UU, W_BasketLine_UU); - } - - /** Get W_BasketLine_UU. - @return W_BasketLine_UU */ - public String getW_BasketLine_UU () - { - return (String)get_Value(COLUMNNAME_W_BasketLine_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_Click.java b/org.adempiere.base/src/org/compiere/model/X_W_Click.java deleted file mode 100644 index d329643e0a..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_Click.java +++ /dev/null @@ -1,312 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_Click - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_Click extends PO implements I_W_Click, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_Click (Properties ctx, int W_Click_ID, String trxName) - { - super (ctx, W_Click_ID, trxName); - /** if (W_Click_ID == 0) - { - setProcessed (false); - setW_Click_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_Click (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 3 - Client - Org - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_Click[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Accept Language. - @param AcceptLanguage - Language accepted based on browser information - */ - public void setAcceptLanguage (String AcceptLanguage) - { - set_Value (COLUMNNAME_AcceptLanguage, AcceptLanguage); - } - - /** Get Accept Language. - @return Language accepted based on browser information - */ - public String getAcceptLanguage () - { - return (String)get_Value(COLUMNNAME_AcceptLanguage); - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set EMail Address. - @param EMail - Electronic Mail Address - */ - public void setEMail (String EMail) - { - set_Value (COLUMNNAME_EMail, EMail); - } - - /** Get EMail Address. - @return Electronic Mail Address - */ - public String getEMail () - { - return (String)get_Value(COLUMNNAME_EMail); - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Referrer. - @param Referrer - Referring web address - */ - public void setReferrer (String Referrer) - { - set_Value (COLUMNNAME_Referrer, Referrer); - } - - /** Get Referrer. - @return Referring web address - */ - public String getReferrer () - { - return (String)get_Value(COLUMNNAME_Referrer); - } - - /** Set Remote Addr. - @param Remote_Addr - Remote Address - */ - public void setRemote_Addr (String Remote_Addr) - { - set_Value (COLUMNNAME_Remote_Addr, Remote_Addr); - } - - /** Get Remote Addr. - @return Remote Address - */ - public String getRemote_Addr () - { - return (String)get_Value(COLUMNNAME_Remote_Addr); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getRemote_Addr()); - } - - /** Set Remote Host. - @param Remote_Host - Remote host Info - */ - public void setRemote_Host (String Remote_Host) - { - set_Value (COLUMNNAME_Remote_Host, Remote_Host); - } - - /** Get Remote Host. - @return Remote host Info - */ - public String getRemote_Host () - { - return (String)get_Value(COLUMNNAME_Remote_Host); - } - - /** Set Target URL. - @param TargetURL - URL for the Target - */ - public void setTargetURL (String TargetURL) - { - set_Value (COLUMNNAME_TargetURL, TargetURL); - } - - /** Get Target URL. - @return URL for the Target - */ - public String getTargetURL () - { - return (String)get_Value(COLUMNNAME_TargetURL); - } - - /** Set User Agent. - @param UserAgent - Browser Used - */ - public void setUserAgent (String UserAgent) - { - set_Value (COLUMNNAME_UserAgent, UserAgent); - } - - /** Get User Agent. - @return Browser Used - */ - public String getUserAgent () - { - return (String)get_Value(COLUMNNAME_UserAgent); - } - - public org.compiere.model.I_W_ClickCount getW_ClickCount() throws RuntimeException - { - return (org.compiere.model.I_W_ClickCount)MTable.get(getCtx(), org.compiere.model.I_W_ClickCount.Table_Name) - .getPO(getW_ClickCount_ID(), get_TrxName()); } - - /** Set Click Count. - @param W_ClickCount_ID - Web Click Management - */ - public void setW_ClickCount_ID (int W_ClickCount_ID) - { - if (W_ClickCount_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, Integer.valueOf(W_ClickCount_ID)); - } - - /** Get Click Count. - @return Web Click Management - */ - public int getW_ClickCount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_ClickCount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Web Click. - @param W_Click_ID - Individual Web Click - */ - public void setW_Click_ID (int W_Click_ID) - { - if (W_Click_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_Click_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_Click_ID, Integer.valueOf(W_Click_ID)); - } - - /** Get Web Click. - @return Individual Web Click - */ - public int getW_Click_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Click_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_Click_UU. - @param W_Click_UU W_Click_UU */ - public void setW_Click_UU (String W_Click_UU) - { - set_Value (COLUMNNAME_W_Click_UU, W_Click_UU); - } - - /** Get W_Click_UU. - @return W_Click_UU */ - public String getW_Click_UU () - { - return (String)get_Value(COLUMNNAME_W_Click_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_ClickCount.java b/org.adempiere.base/src/org/compiere/model/X_W_ClickCount.java deleted file mode 100644 index 04b0a88696..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_ClickCount.java +++ /dev/null @@ -1,217 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_ClickCount - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_ClickCount extends PO implements I_W_ClickCount, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_ClickCount (Properties ctx, int W_ClickCount_ID, String trxName) - { - super (ctx, W_ClickCount_ID, trxName); - /** if (W_ClickCount_ID == 0) - { - setName (null); - setTargetURL (null); - setW_ClickCount_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_ClickCount (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 3 - Client - Org - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_ClickCount[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException - { - return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name) - .getPO(getC_BPartner_ID(), get_TrxName()); } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** Get Business Partner . - @return Identifies a Business Partner - */ - public int getC_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Counter. - @param Counter - Count Value - */ - public void setCounter (int Counter) - { - throw new IllegalArgumentException ("Counter is virtual column"); } - - /** Get Counter. - @return Count Value - */ - public int getCounter () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Counter); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Target URL. - @param TargetURL - URL for the Target - */ - public void setTargetURL (String TargetURL) - { - set_Value (COLUMNNAME_TargetURL, TargetURL); - } - - /** Get Target URL. - @return URL for the Target - */ - public String getTargetURL () - { - return (String)get_Value(COLUMNNAME_TargetURL); - } - - /** Set Click Count. - @param W_ClickCount_ID - Web Click Management - */ - public void setW_ClickCount_ID (int W_ClickCount_ID) - { - if (W_ClickCount_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, Integer.valueOf(W_ClickCount_ID)); - } - - /** Get Click Count. - @return Web Click Management - */ - public int getW_ClickCount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_ClickCount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_ClickCount_UU. - @param W_ClickCount_UU W_ClickCount_UU */ - public void setW_ClickCount_UU (String W_ClickCount_UU) - { - set_Value (COLUMNNAME_W_ClickCount_UU, W_ClickCount_UU); - } - - /** Get W_ClickCount_UU. - @return W_ClickCount_UU */ - public String getW_ClickCount_UU () - { - return (String)get_Value(COLUMNNAME_W_ClickCount_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_Counter.java b/org.adempiere.base/src/org/compiere/model/X_W_Counter.java deleted file mode 100644 index 1946dbbeaa..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_Counter.java +++ /dev/null @@ -1,312 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_Counter - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_Counter extends PO implements I_W_Counter, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_Counter (Properties ctx, int W_Counter_ID, String trxName) - { - super (ctx, W_Counter_ID, trxName); - /** if (W_Counter_ID == 0) - { - setPageURL (null); - setProcessed (false); - setRemote_Addr (null); - setRemote_Host (null); - setW_Counter_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_Counter (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 3 - Client - Org - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_Counter[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Accept Language. - @param AcceptLanguage - Language accepted based on browser information - */ - public void setAcceptLanguage (String AcceptLanguage) - { - set_Value (COLUMNNAME_AcceptLanguage, AcceptLanguage); - } - - /** Get Accept Language. - @return Language accepted based on browser information - */ - public String getAcceptLanguage () - { - return (String)get_Value(COLUMNNAME_AcceptLanguage); - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set EMail Address. - @param EMail - Electronic Mail Address - */ - public void setEMail (String EMail) - { - set_Value (COLUMNNAME_EMail, EMail); - } - - /** Get EMail Address. - @return Electronic Mail Address - */ - public String getEMail () - { - return (String)get_Value(COLUMNNAME_EMail); - } - - /** Set Page URL. - @param PageURL Page URL */ - public void setPageURL (String PageURL) - { - set_Value (COLUMNNAME_PageURL, PageURL); - } - - /** Get Page URL. - @return Page URL */ - public String getPageURL () - { - return (String)get_Value(COLUMNNAME_PageURL); - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Referrer. - @param Referrer - Referring web address - */ - public void setReferrer (String Referrer) - { - set_Value (COLUMNNAME_Referrer, Referrer); - } - - /** Get Referrer. - @return Referring web address - */ - public String getReferrer () - { - return (String)get_Value(COLUMNNAME_Referrer); - } - - /** Set Remote Addr. - @param Remote_Addr - Remote Address - */ - public void setRemote_Addr (String Remote_Addr) - { - set_Value (COLUMNNAME_Remote_Addr, Remote_Addr); - } - - /** Get Remote Addr. - @return Remote Address - */ - public String getRemote_Addr () - { - return (String)get_Value(COLUMNNAME_Remote_Addr); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getRemote_Addr()); - } - - /** Set Remote Host. - @param Remote_Host - Remote host Info - */ - public void setRemote_Host (String Remote_Host) - { - set_Value (COLUMNNAME_Remote_Host, Remote_Host); - } - - /** Get Remote Host. - @return Remote host Info - */ - public String getRemote_Host () - { - return (String)get_Value(COLUMNNAME_Remote_Host); - } - - /** Set User Agent. - @param UserAgent - Browser Used - */ - public void setUserAgent (String UserAgent) - { - set_Value (COLUMNNAME_UserAgent, UserAgent); - } - - /** Get User Agent. - @return Browser Used - */ - public String getUserAgent () - { - return (String)get_Value(COLUMNNAME_UserAgent); - } - - public org.compiere.model.I_W_CounterCount getW_CounterCount() throws RuntimeException - { - return (org.compiere.model.I_W_CounterCount)MTable.get(getCtx(), org.compiere.model.I_W_CounterCount.Table_Name) - .getPO(getW_CounterCount_ID(), get_TrxName()); } - - /** Set Counter Count. - @param W_CounterCount_ID - Web Counter Count Management - */ - public void setW_CounterCount_ID (int W_CounterCount_ID) - { - if (W_CounterCount_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_CounterCount_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_CounterCount_ID, Integer.valueOf(W_CounterCount_ID)); - } - - /** Get Counter Count. - @return Web Counter Count Management - */ - public int getW_CounterCount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_CounterCount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Web Counter. - @param W_Counter_ID - Individual Count hit - */ - public void setW_Counter_ID (int W_Counter_ID) - { - if (W_Counter_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_Counter_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_Counter_ID, Integer.valueOf(W_Counter_ID)); - } - - /** Get Web Counter. - @return Individual Count hit - */ - public int getW_Counter_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Counter_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_Counter_UU. - @param W_Counter_UU W_Counter_UU */ - public void setW_Counter_UU (String W_Counter_UU) - { - set_Value (COLUMNNAME_W_Counter_UU, W_Counter_UU); - } - - /** Get W_Counter_UU. - @return W_Counter_UU */ - public String getW_Counter_UU () - { - return (String)get_Value(COLUMNNAME_W_Counter_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_CounterCount.java b/org.adempiere.base/src/org/compiere/model/X_W_CounterCount.java deleted file mode 100644 index 8787963a3c..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_CounterCount.java +++ /dev/null @@ -1,214 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_CounterCount - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_CounterCount extends PO implements I_W_CounterCount, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_CounterCount (Properties ctx, int W_CounterCount_ID, String trxName) - { - super (ctx, W_CounterCount_ID, trxName); - /** if (W_CounterCount_ID == 0) - { - setName (null); - setPageURL (null); - setW_CounterCount_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_CounterCount (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 3 - Client - Org - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_CounterCount[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException - { - return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name) - .getPO(getC_BPartner_ID(), get_TrxName()); } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** Get Business Partner . - @return Identifies a Business Partner - */ - public int getC_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Counter. - @param Counter - Count Value - */ - public void setCounter (int Counter) - { - throw new IllegalArgumentException ("Counter is virtual column"); } - - /** Get Counter. - @return Count Value - */ - public int getCounter () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Counter); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Page URL. - @param PageURL Page URL */ - public void setPageURL (String PageURL) - { - set_Value (COLUMNNAME_PageURL, PageURL); - } - - /** Get Page URL. - @return Page URL */ - public String getPageURL () - { - return (String)get_Value(COLUMNNAME_PageURL); - } - - /** Set Counter Count. - @param W_CounterCount_ID - Web Counter Count Management - */ - public void setW_CounterCount_ID (int W_CounterCount_ID) - { - if (W_CounterCount_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_CounterCount_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_CounterCount_ID, Integer.valueOf(W_CounterCount_ID)); - } - - /** Get Counter Count. - @return Web Counter Count Management - */ - public int getW_CounterCount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_CounterCount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_CounterCount_UU. - @param W_CounterCount_UU W_CounterCount_UU */ - public void setW_CounterCount_UU (String W_CounterCount_UU) - { - set_Value (COLUMNNAME_W_CounterCount_UU, W_CounterCount_UU); - } - - /** Get W_CounterCount_UU. - @return W_CounterCount_UU */ - public String getW_CounterCount_UU () - { - return (String)get_Value(COLUMNNAME_W_CounterCount_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_MailMsg.java b/org.adempiere.base/src/org/compiere/model/X_W_MailMsg.java deleted file mode 100644 index 0e712bfdd9..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_MailMsg.java +++ /dev/null @@ -1,290 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_MailMsg - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_MailMsg extends PO implements I_W_MailMsg, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_MailMsg (Properties ctx, int W_MailMsg_ID, String trxName) - { - super (ctx, W_MailMsg_ID, trxName); - /** if (W_MailMsg_ID == 0) - { - setMailMsgType (null); - setMessage (null); - setName (null); - setSubject (null); - setW_MailMsg_ID (0); - setW_Store_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_MailMsg (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_MailMsg[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** MailMsgType AD_Reference_ID=342 */ - public static final int MAILMSGTYPE_AD_Reference_ID=342; - /** Order Acknowledgement = OA */ - public static final String MAILMSGTYPE_OrderAcknowledgement = "OA"; - /** Payment Acknowledgement = PA */ - public static final String MAILMSGTYPE_PaymentAcknowledgement = "PA"; - /** Payment Error = PE */ - public static final String MAILMSGTYPE_PaymentError = "PE"; - /** User Verification = UV */ - public static final String MAILMSGTYPE_UserVerification = "UV"; - /** User Password = UP */ - public static final String MAILMSGTYPE_UserPassword = "UP"; - /** Subscribe = LS */ - public static final String MAILMSGTYPE_Subscribe = "LS"; - /** UnSubscribe = LU */ - public static final String MAILMSGTYPE_UnSubscribe = "LU"; - /** User Account = UA */ - public static final String MAILMSGTYPE_UserAccount = "UA"; - /** Request = WR */ - public static final String MAILMSGTYPE_Request = "WR"; - /** Set Message Type. - @param MailMsgType - Mail Message Type - */ - public void setMailMsgType (String MailMsgType) - { - - set_Value (COLUMNNAME_MailMsgType, MailMsgType); - } - - /** Get Message Type. - @return Mail Message Type - */ - public String getMailMsgType () - { - return (String)get_Value(COLUMNNAME_MailMsgType); - } - - /** Set Message. - @param Message - EMail Message - */ - public void setMessage (String Message) - { - set_Value (COLUMNNAME_Message, Message); - } - - /** Get Message. - @return EMail Message - */ - public String getMessage () - { - return (String)get_Value(COLUMNNAME_Message); - } - - /** Set Message 2. - @param Message2 - Optional second part of the EMail Message - */ - public void setMessage2 (String Message2) - { - set_Value (COLUMNNAME_Message2, Message2); - } - - /** Get Message 2. - @return Optional second part of the EMail Message - */ - public String getMessage2 () - { - return (String)get_Value(COLUMNNAME_Message2); - } - - /** Set Message 3. - @param Message3 - Optional third part of the EMail Message - */ - public void setMessage3 (String Message3) - { - set_Value (COLUMNNAME_Message3, Message3); - } - - /** Get Message 3. - @return Optional third part of the EMail Message - */ - public String getMessage3 () - { - return (String)get_Value(COLUMNNAME_Message3); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Subject. - @param Subject - Email Message Subject - */ - public void setSubject (String Subject) - { - set_Value (COLUMNNAME_Subject, Subject); - } - - /** Get Subject. - @return Email Message Subject - */ - public String getSubject () - { - return (String)get_Value(COLUMNNAME_Subject); - } - - /** Set Mail Message. - @param W_MailMsg_ID - Web Store Mail Message Template - */ - public void setW_MailMsg_ID (int W_MailMsg_ID) - { - if (W_MailMsg_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_MailMsg_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_MailMsg_ID, Integer.valueOf(W_MailMsg_ID)); - } - - /** Get Mail Message. - @return Web Store Mail Message Template - */ - public int getW_MailMsg_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_MailMsg_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set W_MailMsg_UU. - @param W_MailMsg_UU W_MailMsg_UU */ - public void setW_MailMsg_UU (String W_MailMsg_UU) - { - set_Value (COLUMNNAME_W_MailMsg_UU, W_MailMsg_UU); - } - - /** Get W_MailMsg_UU. - @return W_MailMsg_UU */ - public String getW_MailMsg_UU () - { - return (String)get_Value(COLUMNNAME_W_MailMsg_UU); - } - - public org.compiere.model.I_W_Store getW_Store() throws RuntimeException - { - return (org.compiere.model.I_W_Store)MTable.get(getCtx(), org.compiere.model.I_W_Store.Table_Name) - .getPO(getW_Store_ID(), get_TrxName()); } - - /** Set Web Store. - @param W_Store_ID - A Web Store of the Client - */ - public void setW_Store_ID (int W_Store_ID) - { - if (W_Store_ID < 1) - set_Value (COLUMNNAME_W_Store_ID, null); - else - set_Value (COLUMNNAME_W_Store_ID, Integer.valueOf(W_Store_ID)); - } - - /** Get Web Store. - @return A Web Store of the Client - */ - public int getW_Store_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Store_ID); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_W_Store.java b/org.adempiere.base/src/org/compiere/model/X_W_Store.java deleted file mode 100644 index 16170f5248..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_W_Store.java +++ /dev/null @@ -1,844 +0,0 @@ -/****************************************************************************** - * Product: iDempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for W_Store - * @author iDempiere (generated) - * @version Release 7.1 - $Id$ */ -public class X_W_Store extends PO implements I_W_Store, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20191121L; - - /** Standard Constructor */ - public X_W_Store (Properties ctx, int W_Store_ID, String trxName) - { - super (ctx, W_Store_ID, trxName); - /** if (W_Store_ID == 0) - { - setC_PaymentTerm_ID (0); - setIsDefault (false); - setIsMenuAssets (true); -// Y - setIsMenuContact (true); -// Y - setIsMenuInterests (true); -// Y - setIsMenuInvoices (true); -// Y - setIsMenuOrders (true); -// Y - setIsMenuPayments (true); -// Y - setIsMenuRegistrations (true); -// Y - setIsMenuRequests (true); -// Y - setIsMenuRfQs (true); -// Y - setIsMenuShipments (true); -// Y - setM_PriceList_ID (0); - setM_Warehouse_ID (0); - setName (null); - setSalesRep_ID (0); - setURL (null); - setWebContext (null); - setW_Store_ID (0); - } */ - } - - /** Load Constructor */ - public X_W_Store (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_W_Store[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public org.compiere.model.I_C_PaymentTerm getC_PaymentTerm() throws RuntimeException - { - return (org.compiere.model.I_C_PaymentTerm)MTable.get(getCtx(), org.compiere.model.I_C_PaymentTerm.Table_Name) - .getPO(getC_PaymentTerm_ID(), get_TrxName()); } - - /** Set Payment Term. - @param C_PaymentTerm_ID - The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) - { - if (C_PaymentTerm_ID < 1) - set_Value (COLUMNNAME_C_PaymentTerm_ID, null); - else - set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID)); - } - - /** Get Payment Term. - @return The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set EMail Footer. - @param EMailFooter - Footer added to EMails - */ - public void setEMailFooter (String EMailFooter) - { - set_Value (COLUMNNAME_EMailFooter, EMailFooter); - } - - /** Get EMail Footer. - @return Footer added to EMails - */ - public String getEMailFooter () - { - return (String)get_Value(COLUMNNAME_EMailFooter); - } - - /** Set EMail Header. - @param EMailHeader - Header added to EMails - */ - public void setEMailHeader (String EMailHeader) - { - set_Value (COLUMNNAME_EMailHeader, EMailHeader); - } - - /** Get EMail Header. - @return Header added to EMails - */ - public String getEMailHeader () - { - return (String)get_Value(COLUMNNAME_EMailHeader); - } - - /** Set Comment/Help. - @param Help - Comment or Hint - */ - public void setHelp (String Help) - { - set_Value (COLUMNNAME_Help, Help); - } - - /** Get Comment/Help. - @return Comment or Hint - */ - public String getHelp () - { - return (String)get_Value(COLUMNNAME_Help); - } - - /** Set Default. - @param IsDefault - Default value - */ - public void setIsDefault (boolean IsDefault) - { - set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); - } - - /** Get Default. - @return Default value - */ - public boolean isDefault () - { - Object oo = get_Value(COLUMNNAME_IsDefault); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Assets. - @param IsMenuAssets - Show Menu Assets - */ - public void setIsMenuAssets (boolean IsMenuAssets) - { - set_Value (COLUMNNAME_IsMenuAssets, Boolean.valueOf(IsMenuAssets)); - } - - /** Get Menu Assets. - @return Show Menu Assets - */ - public boolean isMenuAssets () - { - Object oo = get_Value(COLUMNNAME_IsMenuAssets); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Contact. - @param IsMenuContact - Show Menu Contact - */ - public void setIsMenuContact (boolean IsMenuContact) - { - set_Value (COLUMNNAME_IsMenuContact, Boolean.valueOf(IsMenuContact)); - } - - /** Get Menu Contact. - @return Show Menu Contact - */ - public boolean isMenuContact () - { - Object oo = get_Value(COLUMNNAME_IsMenuContact); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Interests. - @param IsMenuInterests - Show Menu Interests - */ - public void setIsMenuInterests (boolean IsMenuInterests) - { - set_Value (COLUMNNAME_IsMenuInterests, Boolean.valueOf(IsMenuInterests)); - } - - /** Get Menu Interests. - @return Show Menu Interests - */ - public boolean isMenuInterests () - { - Object oo = get_Value(COLUMNNAME_IsMenuInterests); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Invoices. - @param IsMenuInvoices - Show Menu Invoices - */ - public void setIsMenuInvoices (boolean IsMenuInvoices) - { - set_Value (COLUMNNAME_IsMenuInvoices, Boolean.valueOf(IsMenuInvoices)); - } - - /** Get Menu Invoices. - @return Show Menu Invoices - */ - public boolean isMenuInvoices () - { - Object oo = get_Value(COLUMNNAME_IsMenuInvoices); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Orders. - @param IsMenuOrders - Show Menu Orders - */ - public void setIsMenuOrders (boolean IsMenuOrders) - { - set_Value (COLUMNNAME_IsMenuOrders, Boolean.valueOf(IsMenuOrders)); - } - - /** Get Menu Orders. - @return Show Menu Orders - */ - public boolean isMenuOrders () - { - Object oo = get_Value(COLUMNNAME_IsMenuOrders); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Payments. - @param IsMenuPayments - Show Menu Payments - */ - public void setIsMenuPayments (boolean IsMenuPayments) - { - set_Value (COLUMNNAME_IsMenuPayments, Boolean.valueOf(IsMenuPayments)); - } - - /** Get Menu Payments. - @return Show Menu Payments - */ - public boolean isMenuPayments () - { - Object oo = get_Value(COLUMNNAME_IsMenuPayments); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Registrations. - @param IsMenuRegistrations - Show Menu Registrations - */ - public void setIsMenuRegistrations (boolean IsMenuRegistrations) - { - set_Value (COLUMNNAME_IsMenuRegistrations, Boolean.valueOf(IsMenuRegistrations)); - } - - /** Get Menu Registrations. - @return Show Menu Registrations - */ - public boolean isMenuRegistrations () - { - Object oo = get_Value(COLUMNNAME_IsMenuRegistrations); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Requests. - @param IsMenuRequests - Show Menu Requests - */ - public void setIsMenuRequests (boolean IsMenuRequests) - { - set_Value (COLUMNNAME_IsMenuRequests, Boolean.valueOf(IsMenuRequests)); - } - - /** Get Menu Requests. - @return Show Menu Requests - */ - public boolean isMenuRequests () - { - Object oo = get_Value(COLUMNNAME_IsMenuRequests); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu RfQs. - @param IsMenuRfQs - Show Menu RfQs - */ - public void setIsMenuRfQs (boolean IsMenuRfQs) - { - set_Value (COLUMNNAME_IsMenuRfQs, Boolean.valueOf(IsMenuRfQs)); - } - - /** Get Menu RfQs. - @return Show Menu RfQs - */ - public boolean isMenuRfQs () - { - Object oo = get_Value(COLUMNNAME_IsMenuRfQs); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Menu Shipments. - @param IsMenuShipments - Show Menu Shipments - */ - public void setIsMenuShipments (boolean IsMenuShipments) - { - set_Value (COLUMNNAME_IsMenuShipments, Boolean.valueOf(IsMenuShipments)); - } - - /** Get Menu Shipments. - @return Show Menu Shipments - */ - public boolean isMenuShipments () - { - Object oo = get_Value(COLUMNNAME_IsMenuShipments); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException - { - return (org.compiere.model.I_M_PriceList)MTable.get(getCtx(), org.compiere.model.I_M_PriceList.Table_Name) - .getPO(getM_PriceList_ID(), get_TrxName()); } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID < 1) - set_Value (COLUMNNAME_M_PriceList_ID, null); - else - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** Get Price List. - @return Unique identifier of a Price List - */ - public int getM_PriceList_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException - { - return (org.compiere.model.I_M_Warehouse)MTable.get(getCtx(), org.compiere.model.I_M_Warehouse.Table_Name) - .getPO(getM_Warehouse_ID(), get_TrxName()); } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - set_Value (COLUMNNAME_M_Warehouse_ID, null); - else - set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** Get Warehouse. - @return Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException - { - return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name) - .getPO(getSalesRep_ID(), get_TrxName()); } - - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - set_Value (COLUMNNAME_SalesRep_ID, null); - else - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); - } - - /** Get Sales Representative. - @return Sales Representative or Company Agent - */ - public int getSalesRep_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Stylesheet. - @param Stylesheet - CSS (Stylesheet) used - */ - public void setStylesheet (String Stylesheet) - { - set_Value (COLUMNNAME_Stylesheet, Stylesheet); - } - - /** Get Stylesheet. - @return CSS (Stylesheet) used - */ - public String getStylesheet () - { - return (String)get_Value(COLUMNNAME_Stylesheet); - } - - /** Set URL. - @param URL - Full URL address - e.g. http://www.idempiere.org - */ - public void setURL (String URL) - { - set_Value (COLUMNNAME_URL, URL); - } - - /** Get URL. - @return Full URL address - e.g. http://www.idempiere.org - */ - public String getURL () - { - return (String)get_Value(COLUMNNAME_URL); - } - - /** Set Web Context. - @param WebContext - Web Server Context - e.g. /wstore - */ - public void setWebContext (String WebContext) - { - set_Value (COLUMNNAME_WebContext, WebContext); - } - - /** Get Web Context. - @return Web Server Context - e.g. /wstore - */ - public String getWebContext () - { - return (String)get_Value(COLUMNNAME_WebContext); - } - - /** Set Web Store Info. - @param WebInfo - Web Store Header Information - */ - public void setWebInfo (String WebInfo) - { - set_Value (COLUMNNAME_WebInfo, WebInfo); - } - - /** Get Web Store Info. - @return Web Store Header Information - */ - public String getWebInfo () - { - return (String)get_Value(COLUMNNAME_WebInfo); - } - - /** Set Web Order EMail. - @param WebOrderEMail - EMail address to receive notifications when web orders were processed - */ - public void setWebOrderEMail (String WebOrderEMail) - { - set_Value (COLUMNNAME_WebOrderEMail, WebOrderEMail); - } - - /** Get Web Order EMail. - @return EMail address to receive notifications when web orders were processed - */ - public String getWebOrderEMail () - { - return (String)get_Value(COLUMNNAME_WebOrderEMail); - } - - /** Set Web Parameter 1. - @param WebParam1 - Web Site Parameter 1 (default: header image) - */ - public void setWebParam1 (String WebParam1) - { - set_Value (COLUMNNAME_WebParam1, WebParam1); - } - - /** Get Web Parameter 1. - @return Web Site Parameter 1 (default: header image) - */ - public String getWebParam1 () - { - return (String)get_Value(COLUMNNAME_WebParam1); - } - - /** Set Web Parameter 2. - @param WebParam2 - Web Site Parameter 2 (default index page) - */ - public void setWebParam2 (String WebParam2) - { - set_Value (COLUMNNAME_WebParam2, WebParam2); - } - - /** Get Web Parameter 2. - @return Web Site Parameter 2 (default index page) - */ - public String getWebParam2 () - { - return (String)get_Value(COLUMNNAME_WebParam2); - } - - /** Set Web Parameter 3. - @param WebParam3 - Web Site Parameter 3 (default left - menu) - */ - public void setWebParam3 (String WebParam3) - { - set_Value (COLUMNNAME_WebParam3, WebParam3); - } - - /** Get Web Parameter 3. - @return Web Site Parameter 3 (default left - menu) - */ - public String getWebParam3 () - { - return (String)get_Value(COLUMNNAME_WebParam3); - } - - /** Set Web Parameter 4. - @param WebParam4 - Web Site Parameter 4 (default footer left) - */ - public void setWebParam4 (String WebParam4) - { - set_Value (COLUMNNAME_WebParam4, WebParam4); - } - - /** Get Web Parameter 4. - @return Web Site Parameter 4 (default footer left) - */ - public String getWebParam4 () - { - return (String)get_Value(COLUMNNAME_WebParam4); - } - - /** Set Web Parameter 5. - @param WebParam5 - Web Site Parameter 5 (default footer center) - */ - public void setWebParam5 (String WebParam5) - { - set_Value (COLUMNNAME_WebParam5, WebParam5); - } - - /** Get Web Parameter 5. - @return Web Site Parameter 5 (default footer center) - */ - public String getWebParam5 () - { - return (String)get_Value(COLUMNNAME_WebParam5); - } - - /** Set Web Parameter 6. - @param WebParam6 - Web Site Parameter 6 (default footer right) - */ - public void setWebParam6 (String WebParam6) - { - set_Value (COLUMNNAME_WebParam6, WebParam6); - } - - /** Get Web Parameter 6. - @return Web Site Parameter 6 (default footer right) - */ - public String getWebParam6 () - { - return (String)get_Value(COLUMNNAME_WebParam6); - } - - /** Set Web Store EMail. - @param WStoreEMail - EMail address used as the sender (From) - */ - public void setWStoreEMail (String WStoreEMail) - { - set_Value (COLUMNNAME_WStoreEMail, WStoreEMail); - } - - /** Get Web Store EMail. - @return EMail address used as the sender (From) - */ - public String getWStoreEMail () - { - return (String)get_Value(COLUMNNAME_WStoreEMail); - } - - /** Set Web Store. - @param W_Store_ID - A Web Store of the Client - */ - public void setW_Store_ID (int W_Store_ID) - { - if (W_Store_ID < 1) - set_ValueNoCheck (COLUMNNAME_W_Store_ID, null); - else - set_ValueNoCheck (COLUMNNAME_W_Store_ID, Integer.valueOf(W_Store_ID)); - } - - /** Get Web Store. - @return A Web Store of the Client - */ - public int getW_Store_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_W_Store_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set WebStore User. - @param WStoreUser - User ID of the Web Store EMail address - */ - public void setWStoreUser (String WStoreUser) - { - set_Value (COLUMNNAME_WStoreUser, WStoreUser); - } - - /** Get WebStore User. - @return User ID of the Web Store EMail address - */ - public String getWStoreUser () - { - return (String)get_Value(COLUMNNAME_WStoreUser); - } - - /** Set WebStore Password. - @param WStoreUserPW - Password of the Web Store EMail address - */ - public void setWStoreUserPW (String WStoreUserPW) - { - set_Value (COLUMNNAME_WStoreUserPW, WStoreUserPW); - } - - /** Get WebStore Password. - @return Password of the Web Store EMail address - */ - public String getWStoreUserPW () - { - return (String)get_Value(COLUMNNAME_WStoreUserPW); - } - - /** Set W_Store_UU. - @param W_Store_UU W_Store_UU */ - public void setW_Store_UU (String W_Store_UU) - { - set_Value (COLUMNNAME_W_Store_UU, W_Store_UU); - } - - /** Get W_Store_UU. - @return W_Store_UU */ - public String getW_Store_UU () - { - return (String)get_Value(COLUMNNAME_W_Store_UU); - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/util/WebInfo.java b/org.adempiere.base/src/org/compiere/util/WebInfo.java deleted file mode 100644 index 65b563e37f..0000000000 --- a/org.adempiere.base/src/org/compiere/util/WebInfo.java +++ /dev/null @@ -1,1252 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.util; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Properties; -import java.util.logging.Level; - -import org.compiere.model.MAdvertisement; -import org.compiere.model.MAsset; -import org.compiere.model.MBPartner; -import org.compiere.model.MCommissionRun; -import org.compiere.model.MDocType; -import org.compiere.model.MInOut; -import org.compiere.model.MInterestArea; -import org.compiere.model.MInvoice; -import org.compiere.model.MNote; -import org.compiere.model.MOrder; -import org.compiere.model.MPayment; -import org.compiere.model.MRegistration; -import org.compiere.model.MRequest; -import org.compiere.model.MRequestType; -import org.compiere.model.MRfQ; -import org.compiere.model.MRfQResponse; -import org.compiere.model.MTimeExpense; -import org.compiere.model.X_AD_UserBPAccess; -import org.compiere.wf.MWFActivity; - - -/** - * Information Storage. - * Container for JSP Information, added in InfoLinkTag - * - * @author Jorg Janke - * @version $Id$ - */ -public class WebInfo -{ - /** - * Get general Info - * @return info - */ - public static WebInfo getGeneral() - { - if (m_general == null) - m_general = new WebInfo (new Properties(), null); - return m_general; - } // getGeneral - - /** General Info */ - private volatile static WebInfo m_general = null; - - /** - * Constructor - * @param ctx context - * @param wu BPartner - */ - public WebInfo (Properties ctx, WebUser wu) - { - m_ctx = ctx; - m_wu = wu; - } // Info - - - /** JSP Name */ - static public final String NAME = "info"; - - /** Logging */ - private static CLogger log = CLogger.getCLogger(WebInfo.class); - /** Context */ - private Properties m_ctx = null; - /** Business Partner */ - private WebUser m_wu = null; - /** Info Message */ - private String m_infoMessage = null; - /** Info ID */ - private int m_id = 0; - - /** - * String Representation - * @return info - */ - public String toString() - { - StringBuilder sb = new StringBuilder("WebInfo["); - sb.append(getC_BPartner_ID()); - sb.append("]"); - return sb.toString(); - } // toString - - /** - * Get Info Message & reset - * @return info message - */ - public String getMessage() - { - String retValue = m_infoMessage; - m_infoMessage = null; - return retValue; - } // getMessage - - /** - * Get Info Message - do not reset - * @return info message - */ - public String getInfo() - { - return m_infoMessage; - } // getInfo - - /** - * Set Info Message - * @param msg info message - */ - public void setMessage (String msg) - { - m_infoMessage = msg; - } // setMessage - - /** - * Get Info Message - * @return info id - */ - public int getId() - { - return m_id; - } // getId - - /** - * Set Info Message - * @param id info id - */ - public void setId (String id) - { - try - { - setId (Integer.parseInt (id)); - } - catch (NumberFormatException ex) - { - log.log(Level.SEVERE, "ID=" + id + " - " + ex.toString()); - m_id = 0; - } - } // setId - - /** - * Set Info Message - * @param id info id - */ - public void setId (int id) - { - if (log.isLoggable(Level.INFO)) log.info("ID=" + id); - m_id = id; - } // setId - - /** - * Get Client - * @return AD_Client_ID - */ - public int getAD_Client_ID() - { - if (m_wu == null) - return -1; - return m_wu.getAD_Client_ID(); - } // getC_BPartner_ID - - /** - * Get BPartner - * @return C_BPartner_ID - */ - public int getC_BPartner_ID() - { - if (m_wu == null) - return -1; - return m_wu.getC_BPartner_ID(); - } // getC_BPartner_ID - - /** - * Get BPartner Contact/User - * @return AD_User_ID - */ - public int getAD_User_ID() - { - if (m_wu == null) - return -1; - return m_wu.getAD_User_ID(); - } // getAD_User_ID - - /** - * Get BPartner Contact/User - * @return AD_User_ID - */ - public int getUser_ID() - { - return getAD_User_ID(); - } // getAD_User_ID - - /** - * Get WebUser - * @return WebUser - */ - public WebUser getWebUser() - { - return m_wu; - } - - /************************************************************************** - * Get Orders - * @return invoices of BP - */ - public ArrayList getOrders() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_BusinessDocuments, - new Object[] {MDocType.DOCBASETYPE_PurchaseOrder, MDocType.DOCBASETYPE_SalesOrder})) - { - log.info("No Access"); - return list; - } - - String sql = "SELECT * FROM C_Order WHERE Bill_BPartner_ID=?" - + " AND DocStatus NOT IN ('DR','IN') " - + "ORDER BY DocumentNo DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MOrder (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getOrders - - /** - * Get Order. - * Needs to have ID set first - * @return invoice of BP with ID - */ - public MOrder getOrder() - { - m_infoMessage = null; - MOrder retValue = null; - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_BusinessDocuments, - new Object[] {MDocType.DOCBASETYPE_PurchaseOrder, MDocType.DOCBASETYPE_SalesOrder})) - { - log.info("No Access"); - return null; - } - String sql = "SELECT * FROM C_Order WHERE Bill_BPartner_ID=? AND C_Order_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - pstmt.setInt(2, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MOrder (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "C_Order_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("C_Order_ID=" + m_id + " - " + retValue); - return retValue; - } // getOrder - - - /** - * Get Shipments - * @return shipments of BP - */ - public ArrayList getShipments() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_BusinessDocuments, - new Object[] {MDocType.DOCBASETYPE_MaterialReceipt, MDocType.DOCBASETYPE_MaterialDelivery})) - { - log.info("No Access"); - return list; - } - - String sql = "SELECT * FROM M_InOut WHERE C_BPartner_ID=?" - + " AND DocStatus NOT IN ('DR','IN') " - + " ORDER BY DocumentNo DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MInOut (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getShipments - - /** - * Get Own Requests - * @return Array of Own Requests - */ - public ArrayList getRequestsOwn () - { - return getRequests(true); - } // getRequestsOwn - - /** - * Get Own Requests - * @return Array of Assigned Requests - */ - public ArrayList getRequestsAssigned () - { - return getRequests(false); - } // getRequestsAssigned - - /** - * Get Requests - * @param own if true its own requests otherwise or - * @return Array of Requests - */ - public ArrayList getRequests (boolean own) - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = null; - if (own) // All Requests - sql = "SELECT * FROM R_Request r " - + "WHERE r.C_BPartner_ID=?" // #1 - + " AND (r.AD_User_ID=?" // #2 - + " OR EXISTS (SELECT * FROM AD_User u " - + "WHERE u.AD_User_ID=? AND r.C_BPartner_ID=u.C_BPartner_ID AND IsFullBPAccess='Y')" // #3 - + " OR EXISTS (SELECT * FROM AD_User u INNER JOIN AD_UserBPAccess a ON (u.AD_User_ID=a.AD_User_ID) " - + "WHERE u.AD_User_ID=? AND r.C_BPartner_ID=u.C_BPartner_ID" // #4 - + " AND a.BPAccessType='R' AND (a.R_RequestType_ID IS NULL OR a.R_RequestType_ID=r.R_RequestType_ID)) ) " - + "ORDER BY r.DocumentNo DESC"; - else // Open Requests of Sales Rep - sql = "SELECT * FROM R_Request " - + "WHERE SalesRep_ID IN (SELECT AD_User_ID FROM AD_User WHERE C_BPartner_ID=?)" - + " AND R_Status_ID IN (SELECT R_Status_ID FROM R_Status WHERE IsClosed='N')" - + "ORDER BY DocumentNo DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - if (own) - { - pstmt.setInt(2, getAD_User_ID()); - pstmt.setInt(3, getAD_User_ID()); - pstmt.setInt(4, getAD_User_ID()); - } - rs = pstmt.executeQuery(); - while (rs.next()) - list.add (new MRequest (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("Own=" + own +" #" + list.size()); - return list; - } // getRequests - - /** - * Get Request. - * Needs to have ID set first; Check that it is owned / created by requestor - * @return invoice of BP with ID - */ - public MRequest getRequest() - { - m_infoMessage = null; - MRequest retValue = null; - String sql = "SELECT * FROM R_Request " - + "WHERE R_Request_ID=?" - + " AND (C_BPartner_ID=?" - + " OR SalesRep_ID IN (SELECT AD_User_ID FROM AD_User WHERE C_BPartner_ID=?))"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, m_id); - pstmt.setInt(2, getC_BPartner_ID()); - pstmt.setInt(3, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MRequest (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "R_Request_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("R_Request_ID=" + m_id + " - " + retValue); - return retValue; - } // getRequest - - - /** - * Get Request Types - * @return Array of Request Types - */ - public ArrayList getRequestTypes () - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM R_RequestType " - + "WHERE IsSelfService='Y' AND AD_Client_ID=? ORDER BY Name"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_Client_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add (new MRequestType (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getRequestTypes - - /** - * Get Request Type - * @return Request Type - */ - public MRequestType getRequestType () - { - m_infoMessage = null; - MRequestType retValue = null; - String sql = "SELECT * FROM R_RequestType WHERE IsSelfService='Y' AND R_RequestType_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MRequestType (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("R_RequestType_ID=" + m_id + " - " + retValue); - return retValue; - } // getRequestType - - - /** - * Get Invoices - * @return invoices of BP - */ - public ArrayList getInvoices() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_BusinessDocuments, - new Object[] {MDocType.DOCBASETYPE_APInvoice, MDocType.DOCBASETYPE_APCreditMemo, - MDocType.DOCBASETYPE_ARInvoice, MDocType.DOCBASETYPE_ARCreditMemo})) - { - log.info("No Access"); - return list; - } - String sql = "SELECT * FROM C_Invoice WHERE C_BPartner_ID=?" - + " AND DocStatus NOT IN ('DR','IN') " - + "ORDER BY DocumentNo DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MInvoice (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getInvoices - - /** - * Get Invoice. - * Needs to have ID set first - * @return invoice with ID of BP - */ - public MInvoice getInvoice() - { - m_infoMessage = null; - MInvoice retValue = null; - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_BusinessDocuments, - new Object[] {MDocType.DOCBASETYPE_APInvoice, MDocType.DOCBASETYPE_APCreditMemo, - MDocType.DOCBASETYPE_ARInvoice, MDocType.DOCBASETYPE_ARCreditMemo})) - { - log.info("No Access"); - return null; - } - String sql = "SELECT * FROM C_Invoice WHERE C_BPartner_ID=? AND C_Invoice_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - pstmt.setInt(2, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MInvoice (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "C_Invoice_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("C_Invoice_ID=" + m_id + " - " + retValue); - return retValue; - } // getInvoice - - /** - * Get Payments - * @return payments of BP - */ - public ArrayList getPayments() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_BusinessDocuments, - new Object[] {MDocType.DOCBASETYPE_APPayment, MDocType.DOCBASETYPE_ARReceipt})) - { - log.info("No Access"); - return list; - } - String sql = "SELECT * FROM C_Payment WHERE C_BPartner_ID=?" - + " AND DocStatus NOT IN ('DR','IN') " - + "ORDER BY DocumentNo DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MPayment (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getPayments - - /** - * Get Active Assets if not Credit Stop and EMail is verified - * @return payments of BP - */ - public ArrayList getAssets() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - if (m_wu != null) - { - if (m_wu.isCreditStopHold()) - return list; - if (!m_wu.isEMailVerified()) - return list; - } - if (m_wu != null && - !m_wu.hasBPAccess(X_AD_UserBPAccess.BPACCESSTYPE_AssetsDownload, null)) - { - log.info("No Access"); - return list; - } - String sql = "SELECT * FROM A_Asset WHERE C_BPartner_ID=? AND IsActive='Y' ORDER BY Name"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MAsset (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getAssets - - /** - * Get Interest Areas - * @return interest areas of BPC - */ - public ArrayList getInterests() - { - m_infoMessage = null; - int AD_Client_ID = Env.getAD_Client_ID(m_ctx); - // - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM R_InterestArea " - + "WHERE IsActive='Y' AND IsSelfService='Y'" - + " AND AD_Client_ID=? " - + "ORDER BY Name"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, AD_Client_ID); - rs = pstmt.executeQuery(); - while (rs.next()) - { - MInterestArea ia = new MInterestArea (m_ctx, rs, null); - ia.setSubscriptionInfo(getAD_User_ID()); - list.add (ia); - } - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getInterests - - /** - * Get Advertisements - * @return advertisements of BP - */ - public ArrayList getAdvertisements() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM W_Advertisement WHERE C_BPartner_ID=? ORDER BY ValidFrom DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MAdvertisement (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getAdvertisement - - /** - * Get All Advertisements - * @return all advertisements - */ - public ArrayList getAllAds() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM W_Advertisement WHERE IsActive='Y' ORDER BY Description"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MAdvertisement (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getAllAds - - /** - * Get Commissioned Invoices - * @return commissioned invoices - */ - public ArrayList getCommissionedInvoices() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_Invoice " - + "WHERE (C_Invoice.SalesRep_ID=?" // #1 - + " OR EXISTS (SELECT * FROM C_BPartner bp WHERE C_Invoice.C_BPartner_ID=bp.C_BPartner_ID AND bp.SalesRep_ID=?)" - + " OR EXISTS (SELECT * FROM C_InvoiceLine il INNER JOIN M_Product p ON (il.M_Product_ID=p.M_Product_ID) WHERE C_Invoice.C_Invoice_ID=il.C_Invoice_ID AND p.SalesRep_ID=?))" - + " AND DocStatus NOT IN ('DR','IN') " - + "ORDER BY DocumentNo DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_User_ID()); - pstmt.setInt(2, getAD_User_ID()); - pstmt.setInt(3, getAD_User_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MInvoice (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getCommissionedInvoices - - /** - * Get Commission Runs - * @return commissioned invoices - */ - public ArrayList getCommissionRuns() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_CommissionRun " - + "WHERE EXISTS (SELECT * FROM C_Commission c " - + "WHERE C_CommissionRun.C_Commission_ID=c.C_Commission_ID AND c.C_BPartner_ID=?) " - + "ORDER BY DocumentNo"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MCommissionRun (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getCommissionRuns - - - /** - * Get Notices - * @return notices - */ - public ArrayList getNotes() - { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM AD_Note " - + "WHERE AD_User_ID=?" - + " AND (Processed='N' OR Processed IS NULL) " - + "ORDER BY Created DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_User_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MNote (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getNotes - - - /** - * Get Notification. - * Needs to have ID set first - * @return notification of User with ID - */ - public MNote getNote() - { - m_infoMessage = null; - MNote retValue = null; - String sql = "SELECT * FROM AD_Note WHERE AD_User_ID=? AND AD_Note_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_User_ID()); - pstmt.setInt(2, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MNote (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "AD_Note_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("AD_Note_ID=" + m_id + " - " + retValue); - return retValue; - } // getNote - - - /** - * Get Workflow Activities - * @return activities - */ - public ArrayList getActivities() - { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM AD_WF_Activity " - + "WHERE AD_User_ID=?" - + " AND Processed='N' " - + "ORDER BY Priority DESC, Created"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_User_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MWFActivity (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getActivities - - - /** - * Get Acitivity. - * Needs to have ID set first - * @return notification of User with ID - */ - public MWFActivity getActivity() - { - m_infoMessage = null; - MWFActivity retValue = null; - String sql = "SELECT * FROM AD_WF_Activity WHERE AD_User_ID=? AND AD_WF_Activity_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_User_ID()); - pstmt.setInt(2, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MWFActivity (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "AD_WF_Activity_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("AD_WF_Activity_ID=" + m_id + " - " + retValue); - return retValue; - } // getActivity - - - /** - * Get Expenses - * @return expense reports - */ - public ArrayList getExpenses() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM S_TimeExpense " - + "WHERE C_BPartner_ID=? " - + "ORDER BY Created DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MTimeExpense (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getExpenses - - /** - * Get Expense Report. - * Needs to have ID set first - * @return invoice of BP with ID - */ - public MTimeExpense getExpense() - { - m_infoMessage = null; - MTimeExpense retValue = null; - String sql = "SELECT * FROM S_TimeExpense WHERE C_BPartner_ID=? AND S_TimeExpense_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - pstmt.setInt(2, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MTimeExpense (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "S_TimeExpense_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (retValue == null) - retValue = new MTimeExpense (m_ctx, 0, null); - if (log.isLoggable(Level.FINE)) log.fine("S_TimeExpense_ID=" + m_id + " - " + retValue); - return retValue; - } // getExpense - - - /** - * Get Registrations - * @return registrations - */ - public ArrayList getRegistrations() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM A_Registration " - + "WHERE C_BPartner_ID=? " - + "ORDER BY Created DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MRegistration (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getRegistrations - - /** - * Get Registration. - * Needs to have ID set first - * @return invoice of BP with ID - */ - public MRegistration getRegistration() - { - m_infoMessage = null; - MRegistration retValue = null; - String sql = "SELECT * FROM A_Registration WHERE C_BPartner_ID=? AND A_Registration_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - pstmt.setInt(2, m_id); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MRegistration (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "A_Registration_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - // new registration - if (retValue == null) - retValue = new MRegistration (m_ctx, 0, null); - if (log.isLoggable(Level.FINE)) log.fine("A_Registration_ID=" + m_id + " - " + retValue); - return retValue; - } // getRegistration - - - /** - * Get RfQs. - * Where Response is Accepted, Self Service and either - * all vendors or this vendor is selected. - * @return request for quotations - */ - public ArrayList getRfQs() - { - m_infoMessage = null; - ArrayList list = new ArrayList(); - String sql = "SELECT * " - + "FROM C_RfQ r " - + "WHERE r.IsRfQResponseAccepted='Y'" - + " AND r.IsSelfService='Y' AND r.IsActive='Y' AND r.Processed='N'" - + " AND (r.IsInvitedVendorsOnly='N'" - + " OR EXISTS (SELECT * FROM C_RfQResponse rr " - + " WHERE r.C_RfQ_ID=rr.C_RfQ_ID AND rr.C_BPartner_ID=?)) " - + "ORDER BY r.Name"; - - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MRfQ (m_ctx, rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("#" + list.size()); - return list; - } // getRfQs - - /** - * Get RfQ Response. - * Needs to have ID set first - * @return rfq of BP with ID - */ - public MRfQResponse getRfQResponse() - { - m_infoMessage = null; - MRfQResponse retValue = null; - String sql = "SELECT * FROM C_RfQResponse " - + "WHERE C_RfQ_ID=?" - + " AND C_BPartner_ID=? AND IsActive='Y'"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, m_id); - pstmt.setInt(2, getC_BPartner_ID()); - rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MRfQResponse (m_ctx, rs, null); - } - catch (Exception e) - { - log.log(Level.SEVERE, "C_RfQResponse_ID=" + m_id, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - // No Response existing - if (retValue == null) - { - MRfQ rfq = new MRfQ (m_ctx, m_id, null); - // We can create a Response ? - if (rfq.get_ID() != 0 && rfq.isSelfService() - && rfq.isRfQResponseAccepted() && !rfq.isInvitedVendorsOnly() - && getC_BPartner_ID() > 0 && getAD_User_ID() > 0) - { - MBPartner bp = new MBPartner (m_ctx, getC_BPartner_ID(), null); - bp.setPrimaryAD_User_ID(getAD_User_ID()); - retValue = new MRfQResponse (rfq, bp); // may have no lines - retValue.saveEx(); - } - } - // - if (log.isLoggable(Level.FINE)) log.fine("C_RfQResponse_ID=" + m_id + " - " + retValue); - return retValue; - } // getRfQResponse - -} // Info diff --git a/org.adempiere.base/src/org/compiere/util/WebLogin.java b/org.adempiere.base/src/org/compiere/util/WebLogin.java deleted file mode 100644 index be43466375..0000000000 --- a/org.adempiere.base/src/org/compiere/util/WebLogin.java +++ /dev/null @@ -1,689 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. - * This program is free software; you can redistribute it and/or modify it - * under the terms version 2 of the GNU General Public License as published - * by the Free Software Foundation. This program is distributed in the hope - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html - * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@adempiere.org - *****************************************************************************/ -package org.compiere.util; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MBPBankAccount; -import org.compiere.model.MMailMsg; -import org.compiere.model.MSession; - - -/** - * WebLogin provides a standard interface to login - * from Webapps like WStore or CM - * - * @author Yves Sandfort - * @version $Id$ - */ -public class WebLogin -{ - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - private final static String COOKIE_NAME = "CompiereWebUser"; - - /** Forward Parameter */ - private String P_ForwardTo = "ForwardTo"; - /** SalesRep Parameter */ - private String P_SalesRep_ID = "SalesRep_ID"; - /** EMail Parameter */ - private String P_EMail = "EMail"; - /** Password Parameter */ - private String P_Password = "Password"; - /** Mode/Action Parameter */ - private String P_Action = "Mode"; - - /** Login Page */ - private String m_login_page = "/login.jsp"; - /** Update Page */ - private String m_update_page = "/update.jsp"; - - /** Message */ - private String m_message = null; - /** Context */ - private Properties m_ctx; - /** HttpServletRequest */ - private HttpServletRequest m_request; - /** HttpServletResponse */ - private HttpServletResponse m_response; - /** HttpSession */ - private HttpSession m_session; - /** adressConfirm */ - private boolean m_addressConfirm; - /** forward */ - private String m_forward; - /** SalesRep */ - private String m_salesRep; - /** EMail */ - private String m_email; - /** Password */ - private String m_password; - /** WebUser */ - private WebUser m_wu; - /** Mode */ - private String m_mode; - - /** - * WebLogin - * @param t_request - * @param t_response - * @param t_ctx - */ - public WebLogin (HttpServletRequest t_request, HttpServletResponse t_response, Properties t_ctx) - { - m_request = t_request; - m_response = t_response; - m_ctx = t_ctx; - // We will check the Request to see whether Parameters are overwritten - if (m_request.getParameter ("P_ForwardTo")!=null) - setP_ForwardTo (m_request.getParameter("P_ForwardTo")); - if (m_request.getParameter ("SalesRep_ID")!=null) - setP_SalesRep_ID (m_request.getParameter ("SalesRep_ID")); - if (m_request.getParameter ("P_EMail")!=null) - setP_EMail (m_request.getParameter ("P_EMail")); - if (m_request.getParameter ("P_Password")!=null) - setP_Password (m_request.getParameter ("P_Password")); - if (m_request.getParameter ("P_Action")!=null) - setP_Action (m_request.getParameter ("P_Action")); - if (m_request.getParameter ("LOGIN_RelURL")!=null) - setLogin_RelURL (m_request.getParameter ("LOGIN_RelURL")); - if (m_request.getParameter ("update_page")!=null) - setLogin_RelURL (m_request.getParameter ("update_page")); - } - - /** - * init will initialize the WebLogin Object for further use - * @return true if init was successfull - */ - public boolean init() - { - m_session = m_request.getSession(true); // create new - m_forward = WebUtil.getParameter (m_request, P_ForwardTo); // get forward from request - if (m_forward != null) - m_session.setAttribute(P_ForwardTo, m_forward); - else - m_forward = ""; - m_salesRep = WebUtil.getParameter (m_request, P_SalesRep_ID); // get SalesRep from request - if (m_salesRep != null) - m_session.setAttribute(P_SalesRep_ID, m_salesRep); - - // Get Base Info - m_email = WebUtil.getParameter (m_request, P_EMail); - if (m_email == null) - m_email = ""; - m_email = m_email.trim(); - if (m_email != null) - m_session.setAttribute (P_EMail, m_email); - m_password = WebUtil.getParameter (m_request, P_Password); - if (m_password == null) - m_password = ""; // null loads w/o check - m_password = m_password.trim(); - if (m_session.getAttribute (WebInfo.NAME)!=null) - { - WebInfo wi = (WebInfo)m_session.getAttribute(WebInfo.NAME); - m_wu = wi.getWebUser (); - } - return true; - } - - /** - * Action run functions against the Login process. - * @return true if successfull - * @throws IOException - * @throws ServletException - */ - public boolean action() throws IOException, ServletException - { - //remote Address - String remoteIP = m_request.getHeader("X-Forwarded-For"); - remoteIP = remoteIP!=null ? remoteIP : m_request.getRemoteAddr(); - // Mode - if (getMode() == null) - { - String s = WebUtil.getParameter (m_request, P_Action); - setMode(s); - } - boolean deleteCookie = "deleteCookie".equals(m_mode); - if (deleteCookie) - { - log.fine("** deleteCookie"); - WebUtil.deleteCookieWebUser (m_request, m_response, COOKIE_NAME); - } - // - boolean logout = "logout".equals(m_mode); - if (logout || deleteCookie) - { - log.fine("** logout"); - if (m_session != null) - { - MSession cSession = MSession.get (m_ctx, false); - if (cSession != null) - cSession.logout(); - // - m_wu = (WebUser)m_session.getAttribute(WebUser.NAME); - if (m_wu != null) - m_wu.logout(); - - m_session.removeAttribute(WebUser.NAME); - m_session.setMaxInactiveInterval(1); - m_session.invalidate (); - } - // Forward to unsecure / - WebUtil.createForwardPage(m_response, "Logout", m_request.getScheme() + "://" + m_request.getServerName() + ":" + m_request.getServerPort() + "/", 2); - } - // Send EMail *** Send Password EMail Request - else if ("SendEMail".equals(m_mode)) - { - log.info("** send mail"); - m_wu = WebUser.get (m_ctx, m_email); // find it - if (!m_wu.isEMailValid()) - m_wu.setPasswordMessage("EMail not found in system"); - else - { - m_wu.setPassword(); // set password to current - // - String msg = WebUtil.sendEMail (m_request, m_wu, - MMailMsg.MAILMSGTYPE_UserPassword, new Object[]{ - m_request.getServerName(), - m_wu.getName(), - WebUtil.getFrom(m_request), - m_wu.getPassword()}); - if (EMail.SENT_OK.equals(msg)) - m_wu.setPasswordMessage ("EMail sent"); - else - m_wu.setPasswordMessage ("Problem sending EMail: " + msg); - } - m_forward = getLogin_RelURL (); - } // SendEMail - // Login - else if ("Login".equals(m_mode)) - { - if (log.isLoggable(Level.INFO)) log.info("** login " + m_email + "/" + m_password); - // add Cookie - WebUtil.addCookieWebUser(m_request, m_response, m_email, COOKIE_NAME); - - // Always re-query - m_wu = WebUser.get (m_ctx, m_email, m_password, false); - m_wu.login(m_password); - // Password valid - if (m_wu.isLoggedIn()) - { - if (m_forward==null || m_forward.equals(getLogin_RelURL ())) - m_forward = "/index.jsp"; - // Create Session with User ID - MSession cSession = MSession.get (m_ctx, remoteIP, - m_request.getRemoteHost(), m_session.getId()); - if (cSession != null) - cSession.setWebStoreSession(true); - } - else - { - m_forward = getLogin_RelURL (); - if (log.isLoggable(Level.FINE)) log.fine("- PasswordMessage=" + m_wu.getPasswordMessage()); - } - // If no session exists or is not loaded, load or create it - if (m_session==null) - m_session = m_request.getSession (true); - - m_session.setAttribute (WebInfo.NAME, new WebInfo (m_ctx, m_wu)); - } // Login - - // Login New - else if ("LoginNew".equals(m_mode)) - { - log.info("** loginNew"); - WebUtil.addCookieWebUser(m_request, m_response, "", COOKIE_NAME); - m_wu = WebUser.get (m_ctx, ""); - m_forward = getLogin_RelURL (); - } - - // Submit - update/new Contact - else if ("Submit".equals(m_mode)) - { - if (log.isLoggable(Level.INFO)) log.info("** submit " + m_email + "/" + m_password + " - AddrConf=" + m_addressConfirm); - // we have a record for address update - if (m_wu != null && m_wu.isLoggedIn() && m_addressConfirm) // address update - ; - else // Submit - always re-load user record - m_wu = WebUser.get (m_ctx, m_email, null, false); // load w/o password check direct - // - if (m_wu.getAD_User_ID() != 0) // existing BPC - { - String passwordNew = WebUtil.getParameter (m_request, "PasswordNew"); - if (passwordNew == null) - passwordNew = ""; - boolean passwordChange = passwordNew.length() > 0 && !passwordNew.equals(m_password); - if (m_addressConfirm || m_wu.login (m_password)) - { - // Create / set session - if (m_wu.isLoggedIn()) - { - MSession cSession = MSession.get (m_ctx, remoteIP, - m_request.getRemoteHost(), m_session.getId()); - if (cSession != null) - cSession.setWebStoreSession(true); - } - // - if (passwordChange) - if (log.isLoggable(Level.FINE)) log.fine("- update Pwd " + m_email + ", Old=" + m_password + ", DB=" + m_wu.getPassword() + ", New=" + passwordNew); - if (WebUtil.updateFields(m_request, m_wu, passwordChange)) - { - if (passwordChange) - m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Password changed"); - } - else - { - m_forward = getLogin_RelURL (); - log.warning(" - update not done"); - } - } - else - { - m_forward = getLogin_RelURL (); - m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Email/Password not correct"); - log.warning(" - update not confirmed"); - } - } - else // new - { - if (log.isLoggable(Level.FINE)) log.fine("** new " + m_email + "/" + m_password); - m_wu.setEmail (m_email); - m_wu.setPassword (m_password); - if (WebUtil.updateFields (m_request, m_wu, true)) - { - if (m_wu.login(m_password)) - { - m_session.setAttribute (WebInfo.NAME, new WebInfo (m_ctx, m_wu)); - // Create / set session - MSession cSession = MSession.get (m_ctx, remoteIP, - m_request.getRemoteHost(), m_session.getId()); - if (cSession != null) - cSession.setWebStoreSession(true); - WebUtil.resendCode(m_request, m_wu); - } - else - m_forward = getLogin_RelURL (); - } - else - { - if (log.isLoggable(Level.FINE)) log.fine("- failed - " + m_wu.getSaveErrorMessage() + " - " + m_wu.getPasswordMessage()); - m_forward = getLogin_RelURL (); - } - } // new - if (m_wu!=null) - m_session.setAttribute (WebInfo.NAME, new WebInfo (m_ctx, m_wu)); - } // Submit - - else if("email".equals(m_mode)) - { - String email = WebUtil.getParameter (m_request, "EMail"); - if (email == null) - email = ""; - email = email.trim(); - - String emailNew = WebUtil.getParameter (m_request, "EMailNew"); - if (emailNew == null) - emailNew = ""; - - email = email.trim(); - if((emailNew.length() == 0)||(emailNew.equals(email))) - { - setMessage("New EMail invalid."); - return false; - } - - if(!WebUtil.isEmailValid(emailNew)) - { - setMessage("New EMail invalid."); - return false; - } - - m_wu.setEmail(emailNew); - m_wu.save(); - m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "EMail Address Changed"); - m_session.setAttribute(WebInfo.NAME, new WebInfo(m_ctx, m_wu)); - } - - else if("password".equals(m_mode)) - { - if (m_wu == null) - { - log.warning("No web user"); - return false; - } - - String password = WebUtil.getParameter (m_request, "Password"); - if (password == null) - password = ""; // null loads w/o check - password = password.trim(); - - if(!m_wu.login(password)) - { - setMessage("Email/Password not correct"); - return false; - } - - MSession cSession = MSession.get (m_ctx, remoteIP, m_request.getRemoteHost(), m_session.getId()); - if (cSession != null) - cSession.setWebStoreSession(true); - - String passwordNew = WebUtil.getParameter (m_request, "PasswordNew"); - if (passwordNew == null) - passwordNew = ""; - - password = password.trim(); - if( (passwordNew.length() == 0) || (passwordNew.equals(password))) - { - setMessage("New Password invalid."); - return false; - } - - m_wu.setPasswordMessage(null); - m_wu.setPassword(passwordNew); - if(m_wu.getPasswordMessage() != null) - { - setMessage("New Password invalid."); - return false; - } - m_wu.save(); - if (m_forward==null || m_forward.equals(getLogin_RelURL ())) - m_forward = "/index.jsp"; - m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Password Changed"); - m_session.setAttribute(WebInfo.NAME, new WebInfo(m_ctx, m_wu)); - } - - else if("address".equals(m_mode)) - { - m_wu.setC_Country_ID(WebUtil.getParamOrNull(m_request, "C_Country_ID")); - m_wu.setC_Region_ID(WebUtil.getParamOrNull(m_request, "C_Region_ID")); - m_wu.setRegionName(WebUtil.getParamOrNull(m_request, "RegionName")); - m_wu.setName(WebUtil.getParamOrNull(m_request, "Name")); - m_wu.setCompany(WebUtil.getParamOrNull(m_request, "Company")); - m_wu.setTitle(WebUtil.getParamOrNull(m_request, "Title")); - m_wu.setAddress(WebUtil.getParamOrNull(m_request, "Address")); - m_wu.setAddress2(WebUtil.getParamOrNull(m_request, "Address2")); - m_wu.setCity(WebUtil.getParamOrNull(m_request, "City")); - m_wu.setPostal(WebUtil.getParamOrNull(m_request, "Postal")); - m_wu.setPhone(WebUtil.getParamOrNull(m_request, "Phone")); - m_wu.setFax(WebUtil.getParamOrNull(m_request, "Fax")); - m_wu.save(); - m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Contact Information Changed"); - m_session.setAttribute(WebInfo.NAME, new WebInfo(m_ctx, m_wu)); - } - - else if ("EMailVerify".equals(m_mode)) - { - if (m_wu == null) - { - log.warning("No web user"); - return false; - } - - if (log.isLoggable(Level.INFO)) log.info(m_forward + " - " + m_wu.toString()); - - String cmd = WebUtil.getParameter(m_request, "ReSend"); - if (cmd != null && cmd.length() > 1) - WebUtil.resendCode(m_request, m_wu); - else - m_wu.setEMailVerifyCode(WebUtil.getParameter(m_request, "VerifyCode"), m_request.getRemoteAddr()); - - } - - else if ("bankaccountach".equals(m_mode)) - { - if (m_wu == null) - { - log.warning("No web user"); - return false; - } - - if (log.isLoggable(Level.INFO)) log.info(m_forward + " - " + m_wu.toString()); - - MBPBankAccount thisBPBankAccount = m_wu.getBankAccount (true); - // As this sets bankaccountach - thisBPBankAccount.setIsACH (true); - thisBPBankAccount.setA_City (WebUtil.getParamOrNull (m_request, "A_City")); - thisBPBankAccount.setA_Name (WebUtil.getParamOrNull (m_request, "A_Name")); - thisBPBankAccount.setAccountNo (WebUtil.getParamOrNull (m_request, "AccountNo")); - thisBPBankAccount.setRoutingNo (WebUtil.getParamOrNull (m_request, "RoutingNo")); - thisBPBankAccount.saveEx(); - } - else - log.log(Level.WARNING, "Unknown request='" + m_mode + "'"); - - return true; - } // action - - /** - * setMessage to set a Message - * @param newVal - */ - public void setMessage(String newVal) - { - if (newVal!=null) - m_message = newVal; - } - - /** - * getMessage back - * @return Message - */ - public String getMessage() - { - return m_message; - } - - /** - * setP_ForwardTo to overwrite default "ForwardTo" Parameter - * @param newVal new value to look for - */ - public void setP_ForwardTo(String newVal) - { - if (newVal!=null) - P_ForwardTo = newVal; - } - - /** - * getP_ForwardTo - * @return ForwardTo request parameter - */ - public String getP_ForwardTo() - { - return P_ForwardTo; - } - - /** - * setP_EMail to overwrite default "EMail" Parameter - * @param newVal new value to look for - */ - public void setP_EMail(String newVal) - { - if (newVal!=null) - P_EMail = newVal; - } - - /** - * getP_EMail - * @return EMail request parameter - */ - public String getP_EMail() - { - return P_EMail; - } - - /** - * setP_Password to overwrite default "Password" Parameter - * @param newVal new value to look for - */ - public void setP_Password(String newVal) - { - if (newVal!=null) - P_Password = newVal; - } - - /** - * getP_Password - * @return Password request parameter - */ - public String getP_Password() - { - return P_Password; - } - - /** - * setP_SalesRep_ID to overwrite default "SalesRep_ID" Parameter - * @param newVal new value to look for - */ - public void setP_SalesRep_ID(String newVal) - { - if (newVal!=null) - P_SalesRep_ID = newVal; - } - - /** - * getP_SalesRep_ID - * @return SalesRep_ID request parameter - */ - public String getP_SalesRep_ID() - { - return P_SalesRep_ID; - } - - /** - * setP_Action to overwrite default "Action/Mode" Parameter - * @param newVal new value to look for - */ - public void setP_Action(String newVal) - { - if (newVal!=null) - P_Action = newVal; - } - - /** - * getP_SalesRep_ID - * @return SalesRep_ID request parameter - */ - public String getP_Action() - { - return P_Action; - } - - /** - * setLogin_RelURL to overwrite default Login Relative URL - * @param newVal new relative URL inside Domain to goto - */ - public void setLogin_RelURL(String newVal) - { - if (newVal!=null) - m_login_page = newVal; - } - - /** - * getLogin_RelURL - * @return Login_RelURL request parameter - */ - public String getLogin_RelURL() - { - return m_login_page; - } - - /** - * setLogin_RelURL to overwrite default Login Relative URL - * @param newVal new relative URL inside Domain to goto - */ - public void setUpdate_page(String newVal) - { - if (newVal!=null) - m_update_page = newVal; - } - - /** - * getLogin_RelURL - * @return Login_RelURL request parameter - */ - public String getUpdate_page() - { - return m_update_page; - } - - /** - * setForward updates Forward URL - * @param newVal - */ - public void setForward(String newVal) - { - if (newVal!=null) - m_forward = newVal; - } - - /** - * getForward - * @return URL to forward request on to - */ - public String getForward() - { - return m_forward; - } - - /** - * getSalesRep_ID - * @return SalesRep_ID of the SalesRep_ID in the Request - */ - public String getSalesRep_ID() - { - return m_salesRep; - } - - /** - * setAddressConfirm - * @param newVal new addressConfirm - */ - public void setAddressConfirm(boolean newVal) - { - m_addressConfirm = newVal; - } - - /** - * getAdressConfirm - * @return boolean addressConfirm - */ - public boolean getAddressConfirm() - { - return m_addressConfirm; - } - - public WebUser getWebUser() - { - return m_wu; - } - - public void setMode(String t_mode) - { - m_mode = t_mode; - } - - public String getMode() - { - return m_mode; - } -} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java b/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java deleted file mode 100644 index 7176d5400a..0000000000 --- a/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java +++ /dev/null @@ -1,429 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.util; - -import java.io.Serializable; -import java.text.DecimalFormat; -import java.text.SimpleDateFormat; -import java.util.Enumeration; -import java.util.Locale; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MClient; -import org.compiere.model.MStore; - - -/** - * Web Session Context Value Object - * - * @author Jorg Janke - * @version $Id: WebSessionCtx.java,v 1.6 2006/09/23 11:04:19 comdivision Exp $ - */ -public class WebSessionCtx implements Serializable -{ - /** SV */ - private static final long serialVersionUID = -5069858671373130221L; - - /** - * Get/create Web Session Context - * @param request request - * @return ctx or null - */ - public static WebSessionCtx get (HttpServletRequest request, int W_Store_ID) - { - HttpSession session = request.getSession(false); - if (session == null) - session = request.getSession(true); - if (session == null) - return null; - WebSessionCtx wsc = (WebSessionCtx)session.getAttribute(NAME); - // Create New - if (wsc == null) - { - wsc = new WebSessionCtx(request, W_Store_ID); - session.setAttribute(NAME, wsc); - } - return wsc; - } // get - - /** - * Get/create Web Session Context - * @param request request - * @return ctx or null - */ - public static WebSessionCtx get (HttpServletRequest request) - { - HttpSession session = request.getSession(false); - if (session == null) - session = request.getSession(true); - if (session == null) - return null; - WebSessionCtx wsc = (WebSessionCtx)session.getAttribute(NAME); - // Create New - if (wsc == null) - { - wsc = new WebSessionCtx (request); - session.setAttribute(NAME, wsc); - } - wsc.setLanguage(request); - return wsc; - } // get - - /** Context */ - public final static String CTX_SERVER_CONTEXT = "context"; - /** Dodument Directory */ - public final static String CTX_DOCUMENT_DIR = "documentDir"; - /** Header (Error) Message */ - public final static String HDR_MESSAGE = "hdrMessage"; - /** Header Info Message */ - public final static String HDR_INFO = "hdrInfo"; - - /** Logger */ - static private CLogger log = CLogger.getCLogger (WebSessionCtx.class); - /** Cache 60 minutes */ - static private CCache s_cacheCtx = new CCache(null, "WebSessionCtx", 30, 60, false); - - /************************************************************************** - * Web Session Context - * @param request request - */ - private WebSessionCtx (HttpServletRequest request) - { - if (log.isLoggable(Level.INFO)) log.info (request.getContextPath() + " (" + request.getRemoteAddr() - + " - " + request.getLocale() + ") #" + counter); - ctx = new Properties(); - setLanguage(request); - - HttpSession session = request.getSession(false); - - // Add Servlet Init Parameters (webStore/src/web/WEB-INF/web.xml) - ServletContext sc = session.getServletContext(); - Enumeration en = sc.getInitParameterNames(); - while (en.hasMoreElements()) - { - String key = (String)en.nextElement(); - String value = sc.getInitParameter(key); - ctx.setProperty(key, value); - if (log.isLoggable(Level.CONFIG)) log.config (key + "=" + value); - } - - setWStore (request.getContextPath()); - ctx = getDefaults (); - - // ServerContext - dev2/wstore - ctx.put(CTX_SERVER_CONTEXT, request.getServerName() + request.getContextPath()); - // Make Context directly availabe to jsp's - session.setAttribute("ctx", ctx); - // - if (log.isLoggable(Level.FINE)) log.fine("#" + ctx.size()); - } // WebSessionCtx - - /************************************************************************** - * Web Session Context - * @param request request - */ - private WebSessionCtx (HttpServletRequest request, int W_Store_ID) - { - if (log.isLoggable(Level.INFO)) log.info (request.getContextPath() + " (" + request.getRemoteAddr() - + " - " + request.getLocale() + ") #" + counter); - ctx = new Properties(); - setLanguage(request); - - HttpSession session = request.getSession(false); - - // Add Servlet Init Parameters (webStore/src/web/WEB-INF/web.xml) - ServletContext sc = session.getServletContext(); - Enumeration en = sc.getInitParameterNames(); - while (en.hasMoreElements()) - { - String key = (String)en.nextElement(); - String value = sc.getInitParameter(key); - ctx.setProperty(key, value); - if (log.isLoggable(Level.CONFIG)) log.config (key + "=" + value); - } - - setWStore (W_Store_ID); - ctx = getDefaults (); - - // ServerContext - dev2/wstore - ctx.put(CTX_SERVER_CONTEXT, request.getServerName() + request.getContextPath()); - // Make Context directly availabe to jsp's - session.setAttribute("ctx", ctx); - // - if (log.isLoggable(Level.FINE)) log.fine("#" + ctx.size()); - } // WebSessionCtx - - /** Sessition Attribute Name */ - public static final String NAME = "WebSessionCtx"; - - /** Static counter */ - public static int s_counter = 0; - /** Instance Counter */ - public int counter = ++s_counter; - - - /** Session Context */ - public Properties ctx = null; - /** Session Language */ - public Language language = null; - - /** Localized Date format */ - public SimpleDateFormat dateFormat = null; - /** Localized Timestamp format */ - public SimpleDateFormat dateTimeFormat = null; - - /** Localized Amount format */ - public DecimalFormat amountFormat = null; - /** Localized Integer format */ - public DecimalFormat integerFormat = null; - /** Localized Number format */ - public DecimalFormat numberFormat = null; - /** Localized Quantity format */ - public DecimalFormat quantityFormat = null; - - /** Login Info */ - public String loginInfo = ""; - /** Web Store */ - public MStore wstore = null; - - /** - * Set Web Store - * @param contextPath web server context path - */ - private void setWStore (String contextPath) - { - // get from context - int W_Store_ID = Env.getContextAsInt(ctx, "W_Store_ID"); - if (W_Store_ID != 0) - { - wstore = MStore.get(ctx, W_Store_ID); - if (wstore.getW_Store_ID() != 0) - { - if (log.isLoggable(Level.INFO)) log.info("From web.xml - " + wstore); - return; - } - } - if ("/adempiere".equals(contextPath)) // HTML UI - return; - - // Modifications for POSterita - if(wstore == null) - { - wstore = MStore.get(ctx, contextPath); - } - // End Modifications for Posterita - - if (wstore == null) - throw new IllegalStateException("No Web Store found - " + contextPath); - } // setWStore - - - /** - * Set Web Store - * @param W_Store_ID Web Store ID - */ - public void setWStore (int W_Store_ID) - { - // get from context - if (W_Store_ID != 0) - { - wstore = MStore.get(ctx, W_Store_ID); - if (wstore.getW_Store_ID() != 0) - { - if (log.isLoggable(Level.INFO)) log.info("From web.xml - " + wstore); - return; - } - } - if (wstore == null) - throw new IllegalStateException("No Web Store found - ID: " + W_Store_ID); - } // setWStore - - /** - * Get Web Store Defaults - * @return context - */ - private Properties getDefaults () - { - // No Web Store - if (wstore == null) - return new Properties(); - // - Integer key = Integer.valueOf(wstore.getW_Store_ID()); - Properties newCtx = (Properties)s_cacheCtx.get(key); - - /** Create New Context */ - if (newCtx == null) - { - if (log.isLoggable(Level.INFO)) log.info(wstore.getWebContext()); - newCtx = new Properties(); - // copy explicitly - Enumeration e = ctx.keys(); - while (e.hasMoreElements()) - { - String pKey = (String)e.nextElement(); - newCtx.setProperty(pKey, ctx.getProperty(pKey)); - } - - Env.setContext(newCtx, "#AD_Client_ID", wstore.getAD_Client_ID()); - Env.setContext(newCtx, "#AD_Org_ID", wstore.getAD_Org_ID()); - // - Env.setContext(newCtx, "#SalesRep_ID", wstore.getSalesRep_ID()); - Env.setContext(newCtx, "#M_PriceList_ID", wstore.getM_PriceList_ID()); - Env.setContext(newCtx, "#M_Warehouse_ID", wstore.getM_Warehouse_ID()); - // - String s = wstore.getWebParam1(); - Env.setContext(newCtx, "webParam1", s == null ? "" : s); - s = wstore.getWebParam2(); - Env.setContext(newCtx, "webParam2", s == null ? "" : s); - s = wstore.getWebParam3(); - Env.setContext(newCtx, "webParam3", s == null ? "" : s); - s = wstore.getWebParam4(); - Env.setContext(newCtx, "webParam4", s == null ? "" : s); - s = wstore.getWebParam5(); - Env.setContext(newCtx, "webParam5", s == null ? "" : s); - s = wstore.getWebParam6(); - Env.setContext(newCtx, "webParam6", s == null ? "" : s); - s = wstore.getStylesheet(); - if (s == null) - s = "standard"; - else - { - int index = s.lastIndexOf('.'); - if (index != -1) - s = s.substring(0, index); - } - Env.setContext(newCtx, "Stylesheet", s); - // - s = wstore.getWebInfo(); - if (s != null && s.length() > 0) - Env.setContext(newCtx, HDR_INFO, s); - - // Payment Term - Env.setContext(newCtx, "#M_PriceList_ID", wstore.getM_PriceList_ID()); - - // Default User - SalesRep - if (Env.getContextAsInt(newCtx, "#AD_User_ID") == 0) - Env.setContext(newCtx, "#AD_User_ID", wstore.getSalesRep_ID()); - - // Default Role for access - if (Env.getContextAsInt(newCtx, "#AD_Role_ID") == 0) - { - int AD_Role_ID = 0; // HARDCODED - System - Env.setContext(newCtx, "#AD_Role_ID", AD_Role_ID); - } - - // Client - MClient client = MClient.get (newCtx, wstore.getAD_Client_ID()); - // Name,Description, SMTPHost,RequestEMail,RequestUser, RequestUserPw - Env.setContext(newCtx, "name", client.getName()); - Env.setContext(newCtx, "description", client.getDescription()); - - // AD_Language - if (newCtx.getProperty("#AD_Language") == null && client.getAD_Language() != null) - Env.setContext(newCtx, "#AD_Language", client.getAD_Language()); - // DocumentDir - String docDir = client.getDocumentDir(); - Env.setContext(newCtx, CTX_DOCUMENT_DIR, docDir == null ? "" : docDir); - - // Default Language - if (newCtx.getProperty("#AD_Language") == null) - Env.setContext(newCtx, "#AD_Language", "en_US"); - - // Save Context - Key is AD_Client_ID - s_cacheCtx.put(key, newCtx); - } - // return new Properties (pp); seems not to work with JSP - Enumeration e = newCtx.keys(); - while (e.hasMoreElements()) - { - String pKey = (String)e.nextElement(); - ctx.setProperty(pKey, newCtx.getProperty(pKey)); - } - return ctx; - } // getDefaults - - - /************************************************************************** - * Set Language from request or session in. - * - Properties - * - Cookie - * - Session - * @param request request - */ - private void setLanguage (HttpServletRequest request) - { - // Get Cookie - Properties cProp = WebUtil.getCookieProprties(request); - - // Get/set Parameter: Language - String AD_Language = WebUtil.getParameter (request, Env.LANGUAGE); - if (AD_Language == null) - { - // Check Cookie - AD_Language = cProp.getProperty(Env.LANGUAGE); - if (AD_Language == null) - { - // Check Request Locale - Locale locale = request.getLocale(); - AD_Language = Language.getAD_Language (locale); - } - } - if (AD_Language != null) - { - Language lang = Language.getLanguage(AD_Language); - Env.verifyLanguage (ctx, lang); - Env.setContext(ctx, Env.LANGUAGE, lang.getAD_Language()); - Msg.getMsg(ctx, "0"); - cProp.setProperty(Env.LANGUAGE, lang.getAD_Language()); - setLanguage(lang); - } - else if (language == null) // set base language - setLanguage (Language.getBaseLanguage()); - } // setLanguage - - /** - * Set Language and init formats - * @param lang language - */ - private void setLanguage (Language lang) - { - language = lang; - // - dateFormat = DisplayType.getDateFormat(DisplayType.Date, language); - dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, language); - // - amountFormat = DisplayType.getNumberFormat(DisplayType.Amount, language); - integerFormat = DisplayType.getNumberFormat(DisplayType.Integer, language); - numberFormat = DisplayType.getNumberFormat(DisplayType.Number, language); - quantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, language); - } // setLanguage - - /** - * String representation - * @return Session + count - */ - public String toString () - { - return "WSessionCtx#" + counter; - } // toString - -} // WSessionCtx \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/util/WebUtil.java b/org.adempiere.base/src/org/compiere/util/WebUtil.java index f6e66f90a2..854f7004a2 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUtil.java +++ b/org.adempiere.base/src/org/compiere/util/WebUtil.java @@ -40,34 +40,24 @@ import java.util.logging.Level; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; -import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; import org.apache.ecs.AlignType; import org.apache.ecs.xhtml.a; import org.apache.ecs.xhtml.body; -import org.apache.ecs.xhtml.br; -import org.apache.ecs.xhtml.hr; import org.apache.ecs.xhtml.input; import org.apache.ecs.xhtml.label; import org.apache.ecs.xhtml.option; -import org.apache.ecs.xhtml.p; import org.apache.ecs.xhtml.script; -import org.apache.ecs.xhtml.small; import org.apache.ecs.xhtml.td; import org.apache.ecs.xhtml.tr; import org.compiere.model.MAttachment; import org.compiere.model.MAttachmentEntry; -import org.compiere.model.MMailMsg; -import org.compiere.model.MRequest; -import org.compiere.model.MStore; -import org.compiere.model.MUserMail; /** * Servlet Utilities @@ -80,76 +70,7 @@ public final class WebUtil /** Static Logger */ private static CLogger log = CLogger.getCLogger (WebUtil.class); - /** - * Create Timeout Message - * - * @param request request - * @param response response - * @param servlet servlet - * @param message - optional message - * @throws ServletException - * @throws IOException - */ - public static void createTimeoutPage (HttpServletRequest request, HttpServletResponse response, - HttpServlet servlet, String message) throws ServletException, IOException - { - log.info(message); - WebSessionCtx wsc = WebSessionCtx.get(request); - String windowTitle = "Timeout"; - if (wsc != null) - windowTitle = Msg.getMsg(wsc.ctx, "Timeout"); - - WebDoc doc = WebDoc.create (windowTitle); - - // Body - body body = doc.getBody(); - // optional message - if (message != null && message.length() > 0) - body.addElement(new p(message, AlignType.CENTER)); - - // login button - body.addElement(getLoginButton(wsc == null ? null : wsc.ctx)); - - // - body.addElement(new hr()); - body.addElement(new small(servlet.getClass().getName())); - // fini - createResponse (request, response, servlet, null, doc, false); - } // createTimeoutPage - - /** - * Create Error Message - * - * @param request request - * @param response response - * @param servlet servlet - * @param message message - * @throws ServletException - * @throws IOException - */ - public static void createErrorPage (HttpServletRequest request, HttpServletResponse response, - HttpServlet servlet, String message) - throws ServletException, IOException - { - log.info( message); - WebSessionCtx wsc = WebSessionCtx.get(request); - String windowTitle = "Error"; - if (wsc != null) - windowTitle = Msg.getMsg(wsc.ctx, "Error"); - if (message != null) - windowTitle += ": " + message; - - WebDoc doc = WebDoc.create (windowTitle); - - // Body - body b = doc.getBody(); - - b.addElement(new p(servlet.getServletName(), AlignType.CENTER)); - b.addElement(new br()); - - // fini - createResponse (request, response, servlet, null, doc, false); - } // createErrorPage + /** * Create Exit Page "Log-off". @@ -504,28 +425,7 @@ public final class WebUtil return null; return value; } // getParamOrNull - - - /** - * reload - * @param logMessage - * @param jsp - * @param session - * @param request - * @param response - * @param thisContext - * @throws ServletException - * @throws IOException - */ - public static void reload(String logMessage, String jsp, HttpSession session, HttpServletRequest request, HttpServletResponse response, ServletContext thisContext) - throws ServletException, IOException - { - session.setAttribute(WebSessionCtx.HDR_MESSAGE, logMessage); - log.warning(" - " + logMessage + " - update not confirmed"); - thisContext.getRequestDispatcher(jsp).forward(request, response); - } - - + /************************************************************************** * Create Standard Response Header with optional Cookie and print document. * D:\j2sdk1.4.0\docs\guide\intl\encoding.doc.html @@ -1044,77 +944,6 @@ public final class WebUtil response.addCookie(cookie); } // deleteCookieWebUser - /************************************************************************** - * Send EMail - * @param request request - * @param to web user - * @param msgType see MMailMsg.MAILMSGTYPE_* - * @param parameter object array with parameters - * @return mail EMail.SENT_OK or error message - */ - public static String sendEMail (HttpServletRequest request, WebUser to, - String msgType, Object[] parameter) - { - WebSessionCtx wsc = WebSessionCtx.get(request); - MStore wStore = wsc.wstore; - MMailMsg mailMsg = wStore.getMailMsg(msgType); - // - StringBuilder subject = new StringBuilder(mailMsg.getSubject()); - if (parameter.length > 0 && parameter[0] != null) - subject.append(parameter[0]); - // - StringBuilder message = new StringBuilder(); - String hdr = wStore.getEMailFooter(); - if (hdr != null && hdr.length() > 0) - message.append(hdr).append("\n"); - message.append(mailMsg.getMessage()); - if (parameter.length > 1 && parameter[1] != null) - message.append(parameter[1]); - if (mailMsg.getMessage2() != null) - { - message.append("\n") - .append(mailMsg.getMessage2()); - if (parameter.length > 2 && parameter[2] != null) - message.append(parameter[2]); - } - if (mailMsg.getMessage3() != null) - { - message.append("\n") - .append(mailMsg.getMessage3()); - if (parameter.length > 3 && parameter[3] != null) - message.append(parameter[3]); - } - message.append(MRequest.SEPARATOR) - .append("http://").append(request.getServerName()).append(request.getContextPath()) - .append("/ - ").append(wStore.getName()) - .append("\n").append("Request from: ").append(getFrom(request)) - .append("\n"); - String ftr = wStore.getEMailFooter(); - if (ftr != null && ftr.length() > 0) - message.append(ftr); - - // Create Mail - EMail email = wStore.createEMail(to.getEmail(), - subject.toString(), message.toString()); - // CC Order - if (msgType.equals(MMailMsg.MAILMSGTYPE_OrderAcknowledgement)) - { - String orderEMail = wStore.getWebOrderEMail(); - String storeEMail = wStore.getWStoreEMail(); - if (orderEMail != null && orderEMail.length() > 0 - && !orderEMail.equals(storeEMail)) // already Bcc - email.addBcc(orderEMail); - } - - // Send - String retValue = email.send(); - // Log - MUserMail um = new MUserMail(mailMsg, to.getAD_User_ID(), email); - um.saveEx(); - // - return retValue; - } // sendEMail - /** * Get Remote From info * @param request request @@ -1147,26 +976,6 @@ public final class WebUtil } } // setCookieWebUser - /** - * Resend Validation Code - * @param request request - * @param wu user - */ - public static void resendCode(HttpServletRequest request, WebUser wu) - { - String msg = sendEMail(request, wu, - MMailMsg.MAILMSGTYPE_UserVerification, - new Object[]{ - request.getServerName(), - wu.getName(), - wu.getEMailVerifyCode()}); - if (EMail.SENT_OK.equals(msg)) - wu.setPasswordMessage ("EMail sent"); - else - wu.setPasswordMessage ("Problem sending EMail: " + msg); - } // resendCode - - /** * Update Web User * @param request request diff --git a/org.adempiere.server-feature/feature.xml b/org.adempiere.server-feature/feature.xml index 7237430302..ce3bf1c39a 100644 --- a/org.adempiere.server-feature/feature.xml +++ b/org.adempiere.server-feature/feature.xml @@ -26,11 +26,6 @@ id="org.adempiere.ui.zk.feature" version="0.0.0"/> - - diff --git a/org.adempiere.server-feature/server.product.functionaltest.launch b/org.adempiere.server-feature/server.product.functionaltest.launch index 19135892cf..053dcc8888 100644 --- a/org.adempiere.server-feature/server.product.functionaltest.launch +++ b/org.adempiere.server-feature/server.product.functionaltest.launch @@ -421,9 +421,6 @@ - - - diff --git a/org.adempiere.server-feature/server.product.launch b/org.adempiere.server-feature/server.product.launch index 0c5c3e522c..6bbd0529af 100644 --- a/org.adempiere.server-feature/server.product.launch +++ b/org.adempiere.server-feature/server.product.launch @@ -422,9 +422,6 @@ - - - diff --git a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java index 9e702aad5e..14571af999 100644 --- a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java +++ b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java @@ -60,7 +60,6 @@ import org.compiere.Adempiere; import org.compiere.model.AdempiereProcessorLog; import org.compiere.model.MClient; import org.compiere.model.MSession; -import org.compiere.model.MStore; import org.compiere.model.MSysConfig; import org.compiere.model.MSystem; import org.compiere.model.Query; @@ -1184,24 +1183,6 @@ public class AdempiereMonitor extends HttpServlet table.addElement(line); // line = new tr(); - MStore[] wstores = MStore.getActive(); - line.addElement(new th().addElement("Active Web Stores #" + wstores.length)); - p = new p(); - for (int i = 0; i < wstores.length; i++) - { - MStore store = wstores[i]; - if (i > 0) - p.addElement(" - "); - a a = new a(store.getWebContext(), store.getName()); - a.setTarget("t" + i); - p.addElement(a); - } - if (wstores.length == 0) - p.addElement(" "); - line.addElement(new td().addElement(p)); - table.addElement(line); - // - line = new tr(); List sessions = new Query(Env.getCtx(), MSession.Table_Name, "Processed = 'N'", null).list(); line.addElement(new th().addElement("Active sessions #" + sessions.size())); p = new p(); diff --git a/org.adempiere.webstore-feature/.project b/org.adempiere.webstore-feature/.project deleted file mode 100644 index 3387c1a340..0000000000 --- a/org.adempiere.webstore-feature/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - org.adempiere.webstore-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.FeatureNature - - diff --git a/org.adempiere.webstore-feature/.settings/org.eclipse.core.resources.prefs b/org.adempiere.webstore-feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0203..0000000000 --- a/org.adempiere.webstore-feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.adempiere.webstore-feature/.settings/org.eclipse.m2e.core.prefs b/org.adempiere.webstore-feature/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/org.adempiere.webstore-feature/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/org.adempiere.webstore-feature/build.properties b/org.adempiere.webstore-feature/build.properties deleted file mode 100644 index 64f93a9f0b..0000000000 --- a/org.adempiere.webstore-feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/org.adempiere.webstore-feature/feature.xml b/org.adempiere.webstore-feature/feature.xml deleted file mode 100644 index 3219c2649d..0000000000 --- a/org.adempiere.webstore-feature/feature.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - [Enter Feature Description here.] - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - - - - - - diff --git a/org.adempiere.webstore-feature/pom.xml b/org.adempiere.webstore-feature/pom.xml deleted file mode 100644 index f3f44a7456..0000000000 --- a/org.adempiere.webstore-feature/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - org.idempiere - org.idempiere.parent - 7.1.0-SNAPSHOT - ../org.idempiere.parent/pom.xml - - org.adempiere.webstore.feature - eclipse-feature - \ No newline at end of file diff --git a/org.adempiere.webstore.resource/.classpath b/org.adempiere.webstore.resource/.classpath deleted file mode 100644 index 423c974870..0000000000 --- a/org.adempiere.webstore.resource/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/org.adempiere.webstore.resource/.project b/org.adempiere.webstore.resource/.project deleted file mode 100644 index d51548dd8a..0000000000 --- a/org.adempiere.webstore.resource/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.adempiere.webstore.resource - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.adempiere.webstore.resource/.settings/org.eclipse.core.resources.prefs b/org.adempiere.webstore.resource/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0203..0000000000 --- a/org.adempiere.webstore.resource/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.adempiere.webstore.resource/.settings/org.eclipse.jdt.core.prefs b/org.adempiere.webstore.resource/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b5eacefd65..0000000000 --- a/org.adempiere.webstore.resource/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.release=enabled diff --git a/org.adempiere.webstore.resource/.settings/org.eclipse.m2e.core.prefs b/org.adempiere.webstore.resource/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/org.adempiere.webstore.resource/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/org.adempiere.webstore.resource/.settings/org.eclipse.pde.core.prefs b/org.adempiere.webstore.resource/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 5bb379e52a..0000000000 --- a/org.adempiere.webstore.resource/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Thu Dec 23 08:01:11 MYT 2010 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/org.adempiere.webstore.resource/AdemPiereInc120x60.gif b/org.adempiere.webstore.resource/AdemPiereInc120x60.gif deleted file mode 100644 index cb06f6fd8d..0000000000 Binary files a/org.adempiere.webstore.resource/AdemPiereInc120x60.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/AdempiereERP.gif b/org.adempiere.webstore.resource/AdempiereERP.gif deleted file mode 100644 index 565d771061..0000000000 Binary files a/org.adempiere.webstore.resource/AdempiereERP.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/AdempiereSKY.jpg b/org.adempiere.webstore.resource/AdempiereSKY.jpg deleted file mode 100644 index 41590fb5ff..0000000000 Binary files a/org.adempiere.webstore.resource/AdempiereSKY.jpg and /dev/null differ diff --git a/org.adempiere.webstore.resource/Background.gif b/org.adempiere.webstore.resource/Background.gif deleted file mode 100644 index 11988728ed..0000000000 Binary files a/org.adempiere.webstore.resource/Background.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/C32.gif b/org.adempiere.webstore.resource/C32.gif deleted file mode 100644 index c83d267cbd..0000000000 Binary files a/org.adempiere.webstore.resource/C32.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/Calculator16.gif b/org.adempiere.webstore.resource/Calculator16.gif deleted file mode 100644 index 9248971a91..0000000000 Binary files a/org.adempiere.webstore.resource/Calculator16.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/Calendar16.gif b/org.adempiere.webstore.resource/Calendar16.gif deleted file mode 100644 index f6978d7d3b..0000000000 Binary files a/org.adempiere.webstore.resource/Calendar16.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/LogoSmall.gif b/org.adempiere.webstore.resource/LogoSmall.gif deleted file mode 100644 index bd7fc0116f..0000000000 Binary files a/org.adempiere.webstore.resource/LogoSmall.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/META-INF/MANIFEST.MF b/org.adempiere.webstore.resource/META-INF/MANIFEST.MF deleted file mode 100644 index 57d0f25e59..0000000000 --- a/org.adempiere.webstore.resource/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: iDempiere Web Store Resources -Bundle-SymbolicName: org.adempiere.webstore.resource -Bundle-Version: 7.1.0.qualifier -Bundle-Vendor: Adempiere.org -Fragment-Host: org.adempiere.webstore;bundle-version="0.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=11))" -Import-Package: org.compiere.wstore -Jetty-WarPatchFragmentFolderPath: / -Bundle-ClassPath: . -Automatic-Module-Name: org.adempiere.webstore.resource diff --git a/org.adempiere.webstore.resource/addressInfo.jsp b/org.adempiere.webstore.resource/addressInfo.jsp deleted file mode 100644 index 8c047843ca..0000000000 --- a/org.adempiere.webstore.resource/addressInfo.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Address Info - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Address

-

Please confirm your address:

-
- -
- Address on File - - - - - -
- - - -
- - - -
- - - -
- - - -
- - - - - -
- - - -
- -
- - - -
- - -
-
- - -
Enter all mandatory data.
- -
-
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/advertisements.jsp b/org.adempiere.webstore.resource/advertisements.jsp deleted file mode 100644 index 13a42bbaf4..0000000000 --- a/org.adempiere.webstore.resource/advertisements.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Advertisements - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Advertisements

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - <c:out value='${ad.name}'/> - <c:out value='${ad.webParam1}'/> -   -
-   Contact -
-   Buy Next Step -
-   -

-

- -
Name
Description
Image URL
Text -
Click Target
  - - - -

 
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/allAds.jsp b/org.adempiere.webstore.resource/allAds.jsp deleted file mode 100644 index 02a1d8028e..0000000000 --- a/org.adempiere.webstore.resource/allAds.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - All Ads - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Partner Info

- -

-
-

Please check with our partners:

- -

- - : - - - -
-
-

-

 

- - - - - - - -
- - - <c:out value='${ad.name}'/> - <c:out value='${ad.webParam1}'/> -   -
-   Contact -
-   Buy Next Step -
-   -

-

-
- -

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/amexCID.jpg b/org.adempiere.webstore.resource/amexCID.jpg deleted file mode 100644 index 908db991a6..0000000000 Binary files a/org.adempiere.webstore.resource/amexCID.jpg and /dev/null differ diff --git a/org.adempiere.webstore.resource/assetDownload.gif b/org.adempiere.webstore.resource/assetDownload.gif deleted file mode 100644 index d96276895f..0000000000 Binary files a/org.adempiere.webstore.resource/assetDownload.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/assets.jsp b/org.adempiere.webstore.resource/assets.jsp deleted file mode 100644 index c05271bc67..0000000000 --- a/org.adempiere.webstore.resource/assets.jsp +++ /dev/null @@ -1,113 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - -<%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> -<%----%> - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Assets - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Assets

- -

-
- -
- '/> - - - - -

To access your Assets:

-

Enter Verification Code - - -

-

The Verification Code will be sent to   - -

-

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionGuarantee DateQuantityYour VersionSerial #DeliveryDownload
  - -
-
  -
- - - - Download <c:out value='${addlDL}'/>
-
-
- - n/a - -   -
- -

! !

-
-

To download, click on the link - or right-click and "Save Target As - ..."

-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/basket.gif b/org.adempiere.webstore.resource/basket.gif deleted file mode 100644 index a27c934e01..0000000000 Binary files a/org.adempiere.webstore.resource/basket.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/basket.jsp b/org.adempiere.webstore.resource/basket.jsp deleted file mode 100644 index ab7ede01ec..0000000000 --- a/org.adempiere.webstore.resource/basket.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Basket - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Web Basket

- -

Empty Basket (timeout) - Please go back, refresh the page and add products - again.

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductPriceQuantity Total 
   -
- -
-
-

- -

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/bbbPrivacy.gif b/org.adempiere.webstore.resource/bbbPrivacy.gif deleted file mode 100644 index 51c62307f5..0000000000 Binary files a/org.adempiere.webstore.resource/bbbPrivacy.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/bbbReliability.gif b/org.adempiere.webstore.resource/bbbReliability.gif deleted file mode 100644 index 794382533b..0000000000 Binary files a/org.adempiere.webstore.resource/bbbReliability.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/build.properties b/org.adempiere.webstore.resource/build.properties deleted file mode 100644 index 77385b72e9..0000000000 --- a/org.adempiere.webstore.resource/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -bin.includes = META-INF/,\ - .,\ - *.* -bin.excludes = src/**,\ - bin/**,\ - .settings/**,\ - .classpath,\ - .project,\ - build.properties -output.. = target/classes/ -source.. = src/ diff --git a/org.adempiere.webstore.resource/checkout.gif b/org.adempiere.webstore.resource/checkout.gif deleted file mode 100644 index ca63ae50d5..0000000000 Binary files a/org.adempiere.webstore.resource/checkout.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/commissionRuns.jsp b/org.adempiere.webstore.resource/commissionRuns.jsp deleted file mode 100644 index 3af01a0999..0000000000 --- a/org.adempiere.webstore.resource/commissionRuns.jsp +++ /dev/null @@ -1,56 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Commissions - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Commissions

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
Document NoDescriptionStart DateGrand Total
 
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/commissionedInvoices.jsp b/org.adempiere.webstore.resource/commissionedInvoices.jsp deleted file mode 100644 index 5da013f394..0000000000 --- a/org.adempiere.webstore.resource/commissionedInvoices.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Commissioned Invoices - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Commissioned Invoices

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoDescriptionDateTotal LinesGrand TotalImageOpen
  Get Invoice ImageNot Paid
-

 

-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/confirm.jsp b/org.adempiere.webstore.resource/confirm.jsp deleted file mode 100644 index 9ef4de3715..0000000000 --- a/org.adempiere.webstore.resource/confirm.jsp +++ /dev/null @@ -1,99 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Payment Confirmation - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Thanks - Payment Confirmation

- - - - - - - - - - - - - -
PaymentInvoiceDetailsTotal
- - - Get Invoice PDF - - - -   - - -  
-
- For downloads, please check   - -   for documentation and other information. -
- - - - -

- - - - - - - - - - - - - - - - - - - - - - - -
Interest AreaDescriptionSubscription
  - - -   - - - - - - -
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/customize.html b/org.adempiere.webstore.resource/customize.html deleted file mode 100644 index 4d03807385..0000000000 --- a/org.adempiere.webstore.resource/customize.html +++ /dev/null @@ -1,46 +0,0 @@ - - -Adempiere Web Store Custimize - - - - -

Custimize your Web Store

-

$Id: customize.html,v 1.1 2006/04/21 18:07:56 jjanke Exp $ - -

-

This application creates the web store for AD_Client_ID=11 (GardenWorld) - -

-

For your own application, you need to - -

-
    -
  • Log in as Client Administrator -
      -
    • In window Client, change the web directory, e.g. to xxx
    • -
    • Click on the right bottom corner of the window to get your AD_Client_ID, e.g. 1000000 - -
    • -
    -
  • -
  • Unjar adempiereWebStore.war - -
  • -
  • In the WEB_INF directory -
      -
    • Edit web.xml to and change the AD_Client_ID parameter value to your AD_Client_ID, e.g. 1000000
    • -
    • Edit jboss-web.xml and set the context to your web directory, e.g. xxx - -
    • -
    -
  • -
  • Change the UI of the *.html and *.jsp files as required
  • -
  • Repackage it under another name, e.g. myStore.war before copying it to - $IDEMPIERE_HOME/jboss/server/adempiere/deploy -
  • -
-

 

-

 

- - diff --git a/org.adempiere.webstore.resource/emailVerify.jsp b/org.adempiere.webstore.resource/emailVerify.jsp deleted file mode 100644 index 4a357cfd45..0000000000 --- a/org.adempiere.webstore.resource/emailVerify.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Verify EMail - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Verify Your EMail Address

- -
- -
-
- -

-
- -
- '/> - - - - - - - - - - - -

Enter Verification Code - - -

-

The Verification Code will be sent to   - -

-

-
-
- -

- Thank you - your email address was verified. -

-
- -

! !

-
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/errorPage.jsp b/org.adempiere.webstore.resource/errorPage.jsp deleted file mode 100644 index 6ab70e313b..0000000000 --- a/org.adempiere.webstore.resource/errorPage.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%@ page isErrorPage="true" %> - - -Adempiere Error - - -
-

Adempiere System Error

-

Sorry, an error occured. If the error persists, please inform us.

-

Error Message:

-

-<%= exception.getMessage() %>
-
-

Stack Trace:

-<% - java.lang.Throwable ex = exception; - while (ex != null) - { - out.println("

" + ex.toString() + "

"); - java.io.CharArrayWriter cw = new java.io.CharArrayWriter(); - java.io.PrintWriter pw = new java.io.PrintWriter(cw,true); - ex.printStackTrace (pw); - out.println("
");
-		out.println(cw.toString());
-		out.println("
"); - if (ex.equals(exception.getCause())) // prevent infinite loop - break; - ex = exception.getCause(); - } -%> -
-
- diff --git a/org.adempiere.webstore.resource/expense.jsp b/org.adempiere.webstore.resource/expense.jsp deleted file mode 100644 index a5303ed2e3..0000000000 --- a/org.adempiere.webstore.resource/expense.jsp +++ /dev/null @@ -1,319 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Expense - - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
- - -

My Expense:

-
- -

My Expense: New Expense

-
-
- -

-
-
- - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - -
- - - -
- - - -
- - - -
- - - - -
- - - - -
- - - -
-
- Description - - -
Max 1500 Characters
-
-
-
- Note - - -
Max 1500 Characters
-
-
- -
-
- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Line #ProductQuantityDescriptionAmount
10Mary Consultant8Feb 5,2003 10:00:00am PST 8h850.00
20Mary Consultant8Feb 6,2003 8:00:00am PST 8h950.00
     
- -
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/expenseLine.jsp b/org.adempiere.webstore.resource/expenseLine.jsp deleted file mode 100644 index 610a986092..0000000000 --- a/org.adempiere.webstore.resource/expenseLine.jsp +++ /dev/null @@ -1,366 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Expense - - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
- - -

My Expense: , Line

-
- -

My Expense: New Expense Line

-
-
- -

-
-
- - - - - - - - - - - - - - - - - - - - - -
-
- Details - - - -
- - - -
- - - - -
- - - Time - Monetary -
- - - -
- - - -
- - - - -
- - - - -
- -
-
-
- Reference - - - -
- - - -
- - - -
- - - -
- - - -
-
-
-
- Description - - -
Max 1500 Characters
-
-
-
- Note - - -
Max 1500 Characters
-
-
- -
-
- - - - -
-
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/expenses.jsp b/org.adempiere.webstore.resource/expenses.jsp deleted file mode 100644 index 106b7fa892..0000000000 --- a/org.adempiere.webstore.resource/expenses.jsp +++ /dev/null @@ -1,371 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Expenses - - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Expenses

- -

-
-

New Expense

-

Edit Most Recent Expense

- -
- - -
- - - Page 1 - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Document #DateDescriptionAmountApproved
     - - - - - - - - -
- - -
- - - Page 1 - - -
-
-
- -
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/fade.jpg b/org.adempiere.webstore.resource/fade.jpg deleted file mode 100644 index 49a042e8b2..0000000000 Binary files a/org.adempiere.webstore.resource/fade.jpg and /dev/null differ diff --git a/org.adempiere.webstore.resource/favicon.ico b/org.adempiere.webstore.resource/favicon.ico deleted file mode 100644 index 14c3ee6ebd..0000000000 Binary files a/org.adempiere.webstore.resource/favicon.ico and /dev/null differ diff --git a/org.adempiere.webstore.resource/gardenworld-print.css b/org.adempiere.webstore.resource/gardenworld-print.css deleted file mode 100644 index d765fb0a13..0000000000 --- a/org.adempiere.webstore.resource/gardenworld-print.css +++ /dev/null @@ -1,272 +0,0 @@ -/** Adempiere Web Store (c) Jorg Janke */ -/** $Id$ */ - -html{ -} -body{ - font-family: Times New Roman, sans-serif; - font-size: 11px; - color: #000000; - margin: 0px; - padding: 0px; - height: 100%; - width: 100%; -} -#page{ -} -#main { - width: 100%; -} -#menu{ - display: none; -} -.menuDetail{ - display: none; -} -.menuDetail:hover{ - display: none; -} -.menuMain{ - display: none; -} -.menuMain:hover{ - display: none; -} -.menuSub{ - display: none; -} -.menuSub:hover{ - display: none; -} -#content { - position: absolute; - right: 0px; - font-family: Times New Roman, sans-serif; - font-size: 11px; - vertical-align: top; - padding: 5px; - border: 0px; -} -#vendorUse{ - display: none; -} -.contentTable{ - font-family: Times New Roman, sans-serif; - font-size: 11px; - width: 100%; - padding: 2px; -} -.internalTable{ - font-family: Times New Roman, sans-serif; - font-size: 11px; - width: 100%; - padding: 2px; - border-style: none; -} -.adTable{ - width: 100%; - padding: 5px; -} -.oddRow{ - background-color: #FFCC99; -} -.evenRow{ - background-color: #FF9966; -} -.amount{ - text-align: right; -} -.quantity{ - text-align: right; -} -.numeric{ - text-align: right; -} -#footer{ - display: none; -} -#footerParam4{ - display: none; -} -#footerParam5{ - text-align: center; - display:inline; -} -#footerParam6{ - display: none; -} -#header{ - display: none; -} -#headerIcon { - display: none; -} -#headerIcon img{ - display: none; -} -#headerContent { - display: none; -} -#headerMenu { - display: none; -} -h1 { - font-size: x-large; - margin-bottom: 10px; - margin-top: 0; -} -h2 { - font-size: large; - font-style: italic; -} -h3 { - font-size: medium; - font-style: normal; - font-weight: bold; -} -h4 { - font-size: medium; - font-style: italic; -} -h5 { - font-size: medium; - font-weight: normal; -} -h6 { - font-size: larger; - font-weight: bold; -} -hr { - padding-bottom: 0; - padding-top: 0; -} -#menu a { - display: none; -} -#menu a:hover { - display: none; -} -p { - text-align: justify; -} -th, legend { - color: #EEEEEE; - border: 1px; - border-color: #CCCCCC; - border-style: outset; - background-color: #006699; - text-align: left; - vertical-align: top; -} -caption { - text-align: left; - font-style: italic; - font-weight: bolder; -} -.error{ - border: 1px solid #FF4A4A; - font-weight: bold; - text-align: center; - width: 100%; -} -form{ - width: 100%; -} -fieldset{ - border: 0px solid #AAAAAA; - clear: both; -} -label{ - clear: left; - width: 35%; - float: left; - text-align: right; - margin-right: 0.8em; - display: block; - font-weight: bold; - vertical-align: baseline; - white-space: nowrap; -} -input{ -/* color: #781351;*/ -/* background: #fee3ad;*/ -/* border: #000000;*/ -} -select{ - color: #000000; - background: #ffffff; - border: 1px solid #CCCCCC; -} -.mandatory{ - background:#FFFF99; -} -input.disabled{ - border: 0px; - background: transparent; -} -.buttons{ - text-align:center; -} -.Cbasket{ - font-size: 9px; - display: inline; -} -#imgButton{ - border-style:outset; -} -#imgButtonPressed{ - border-style:inset; -} -#status{ - background-color: #fff8dc; - color: #000000; - display: none; -} - -#validationInfo{ - display: none; -} -#visaBox{ - display: none; -} -#amexBox{ - display: none; -} -.availProduct{ - /* comment out next line to show the Availability column */ - display:none; -} -label#productSearch{ - width:150px; - float: left; - text-align: right; - margin-right: 0.5em; - display: block; -} -.nobr{ - white-space: nowrap; -} -.wideText{ - width:100%; -} -.lineItem{ - vertical-align: top; -} -.entryNote{ - font-family: Times New Roman, sans-serif; - font-size: 11px; - color: #666666; - text-align: center; - vertical-align: top; -} -.emphasized{ - font-weight: bold; -} -.disabledMsg{ - display: none; - font-style: italic; - text-align: center; -} -#fileLoad{ - display: none; -} \ No newline at end of file diff --git a/org.adempiere.webstore.resource/gardenworld.css b/org.adempiere.webstore.resource/gardenworld.css deleted file mode 100644 index 877b8616e2..0000000000 --- a/org.adempiere.webstore.resource/gardenworld.css +++ /dev/null @@ -1,410 +0,0 @@ -/** Adempiere Web Store (c) Jorg Janke */ -/** $Id$ */ - -html{ - overflow-y: hidden; - overflow-x: hidden; - overflow: auto; -} -body{ - font-family: Times New Roman, serif; - color: #333333; - margin: 0px; - padding: 0px; - background-color: #FFFFFF; - overflow-y: auto; - overflow-x: auto; - overflow: hidden; - height: 100%; - width: 100%; -} -#page{ - background-color: #CC0000; -} -#main { - background-color: #CC0000; - clear: both; - width: 100%; - border: 0px; - border-collapse: collapse; - margin-top: -5px; - -} -#menu{ - vertical-align: top; - text-align: center; - color: #CCCCCC; - background-color:#CC0000; - background-image: url("gwr_footertile.jpg"); - background-repeat: repeat; - width: 165px; - float: right; - padding-top: 5px; - overflow: hidden; - margin-top: -5px; -} -#content { - vertical-align: top; - left: 0px; - right: 165px; - margin-right: 0px; - background-color: #FFFFCC; - border-width: 0px; - padding: 5px; - position: absolute; - min-width: 730px; - border-left: 5px solid #CC0000; - border-top: 5px solid #CC0000; -} -#vendorUse{ - vertical-align:top; - text-align:right; - margin-top: -3px; - float: right; - background-color: #FFFFFF; -} -.contentTable{ - width: 100%; - border: 1px; - border-spacing: 2px; - padding: 2px; - border-color: #003366; - border-style: solid; -} -.internalTable{ - width: 100%; - padding: 2px; - border-style: none; -} -.adTable{ - width: 100%; - border: 1px; - border-spacing: 1px; - padding: 5px; -} -.oddRow{ - background-color: #FFCC99; -} -.evenRow{ - background-color: #FF9966; -} -.amount{ - text-align: right; -} -.quantity{ - text-align: right; -} -.numeric{ - text-align: right; -} -#footer{ - color: #CCCCCC; - background-color:#CC0000; - background-image: url("gwr_footertile.jpg"); - background-repeat: repeat; - width: 100%; - height: 80px; - border: 0px; - border-collapse: collapse; - padding: 3px; - white-space: nowrap; - min-width: 730px; -} -#footerParam4{ - width: 130px; - text-align: left; - display:inline; - float: left; - white-space: nowrap; -} -#footerParam5{ - color: #FFFF99; - text-align: left; - display:inline; - float: left; - white-space: nowrap; -} -#footerParam6{ - width: 165px; - text-align: center; - display:inline; - float: right; - white-space: nowrap; -} -#header{ - background-color:#CCCCCC; - background-image: url("gwr_header.jpg"); - background-repeat: repeat; - height: 75px; - display: block; -} -#headerIcon { - width: 165px; - height: 80px; - text-align: center; - float: right; - border: 0px; -} -#headerIcon img{ - width: 165px; - height: 80px; - border-style: none; - border-width: 0px; -} -#headerContent { - text-align: right; - color: #FFFFFF; - font-weight: bold; - white-space: nowrap; - position: absolute; - top: 18px; - right: 180px; - height: 51px; - padding: 4px; -} -#headerMenu { - text-align: left; - width: 240px; - float: left; - position: absolute; - top: 25px; - left: 0px; - padding: 4px; -} -a { - color: #003366; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -h1 { - color: #003366; - font-size: x-large; - margin-bottom: 10px; - margin-top: 0; -} -h2 { - color: #333333; - font-size: large; - font-style: italic; -} -h3 { - color: #006699; - font-size: medium; - font-style: normal; - font-weight: bold; -} -h4 { - color: #6600CC; - font-size: medium; - font-style: italic; -} -h5 { - color: #660099; - font-size: medium; - font-weight: normal; -} -h6 { - font-size: larger; - font-weight: bold; -} -hr { - padding-bottom: 0; - padding-top: 0; - width: 90%; - margin-left: 5%; -} -p { - text-align: justify; -} -th { - color: #EEEEEE; - border: 1px; - border-color: #CCCCCC; - border-style: outset; - background-color: #CC0000; - text-align: left; - vertical-align: top; -} -caption { - color: #660099; - text-align: left; - font-style: italic; - font-weight: bolder; -} -.menuDetail{ - color: #006699; - font-family: Times New Roman,serif; - font-size: 12px; - padding-bottom: 0; - padding-left: 20px; - padding-top: 0; - text-decoration: none; -} -.menuDetail:hover{ - color: #006699; - font-family: Times New Roman,serif; - font-size: 12px; - padding-bottom: 0; - padding-left: 20px; - padding-top: 0; - text-decoration: underline; -} -.menuMain{ - color: #FFFFFF; - font-weight: bold; - font-family: Times New Roman,serif; - font-size: 16px; - text-align: left; - text-decoration: none; - padding-left: 5px; - background-color: #CC0000; -} -.menuMain:hover{ - color: #CC0000; - font-family: Times New Roman,serif; - font-size: 16px; - text-align: left; - text-decoration: underline; - background-color: #FFFFCC; - padding-left: 5px; -} -.menuSub{ - color: #FFFFFF; - font-family: Times New Roman,serif; - font-size: 14px; - padding-left: 10px; - text-align: left; - text-decoration: none; -} -.menuSub:hover{ - color: #CC0000; - font-family: Times New Roman,serif; - font-size: 14px; - padding-left: 10px; - text-align: left; - text-decoration: underline; - background-color: #FFFFCC; -} -.error{ - border: 1px solid #FF4A4A; - color: #FF0000; - font-weight: bold; - text-align: center; - width: 100%; -} -form{ - width: 100%; -} -fieldset{ - border: 1px solid #336633; - clear: both; -} -legend{ - color: #003300; - background: #CCFFCC; - border: 1px solid #336633; - padding: 2px 6px; -} -label{ - clear: left; - width: 35%; - float: left; - text-align: right; - margin-right: 0.8em; - display: block; - font-weight: bold; - vertical-align: baseline; - white-space: nowrap; -} -input{ -color: #003366; -font-weight: bold; -background: #FFFFFF; -border: 1px solid #000000; -} -select{ - color: #000000; - background: #ffffff; - border: 1px solid #CCCCCC; -} -.mandatory{ - background:#FFFF66; -} -input.disabled{ - border: 0px; - background: transparent; -} -.buttons{ - text-align:center; -} -.Cbasket{ - font-size: 9px; - display: inline; -} -#imgButton{ - border-style:outset; -} -#imgButtonPressed{ - border-style:inset; -} -#status{ - background-color: #fff8dc; - color: #000000; - display: none; -} - -#validationInfo{ - text-align: center; -} -#visaBox{ - width: 40%; - float:left; - text-align: right; -} -#amexBox{ - width: 40%; - float:right; - text-align: left; -} -.availProduct{ - /* comment out next line to show the Availability column */ - display:none; -} -label#productSearch{ - width:150px; - float: left; - text-align: right; - margin-right: 0.5em; - display: block; -} -.nobr{ - white-space: nowrap; -} -.wideText{ - width:100%; -} -.lineItem{ - vertical-align: top; -} -.entryNote{ - font-size: small; - color: #666666; - text-align: center; - vertical-align: top; -} -.emphasized{ - font-weight: bold; -} -.disabledMsg{ - display: none; - font-style: italic; - text-align: center; -} -.tableNav -{ - vertical-align: top; - text-align: left; - width: 100%; -} \ No newline at end of file diff --git a/org.adempiere.webstore.resource/gwr_footertile.jpg b/org.adempiere.webstore.resource/gwr_footertile.jpg deleted file mode 100644 index bc74b87b3d..0000000000 Binary files a/org.adempiere.webstore.resource/gwr_footertile.jpg and /dev/null differ diff --git a/org.adempiere.webstore.resource/gwr_header.jpg b/org.adempiere.webstore.resource/gwr_header.jpg deleted file mode 100644 index 532f678887..0000000000 Binary files a/org.adempiere.webstore.resource/gwr_header.jpg and /dev/null differ diff --git a/org.adempiere.webstore.resource/gwr_logo.gif b/org.adempiere.webstore.resource/gwr_logo.gif deleted file mode 100644 index f14b322c68..0000000000 Binary files a/org.adempiere.webstore.resource/gwr_logo.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/help.gif b/org.adempiere.webstore.resource/help.gif deleted file mode 100644 index f25fc3fbf1..0000000000 Binary files a/org.adempiere.webstore.resource/help.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/help.jsp b/org.adempiere.webstore.resource/help.jsp deleted file mode 100644 index ec055a228d..0000000000 --- a/org.adempiere.webstore.resource/help.jsp +++ /dev/null @@ -1,59 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Welcome - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Web Store Help

-

New User

-

You create your new account when you create an order or when you click on the - "Login" button or "Welcome" link. Enter your email address, a password, and then - select "New User" to complete the other mandatory and optional information.

-

Invalid Password or EMail

-

If you received an error, you may select "Send Password to - EMail" to have your password sent to the email address you've entered. If you cannot - receive an email with that email address (e.g. misspelling), contact us with both - the current incorrect email address as well as the correct one. Do NOT login using - a different email address or you will create a new account and not be able to access - the assets of the original account. If that happens, you will need to contact us to - merge the accounts.

-

Change Password, EMail Address or Contact Information

-

To change your password, you must first log in with your old password. Then - select "Update User Info" at the top of the page. On the User Information screen, - use the Change Password field set to enter your old and new password. Your EMail - Address and Contact Information may also be changed on the User Information - screen.

-

Additional User of Business Partner

-

If you are an additional user of an existing Business Partner, please ask your - supervisor to contact us and we will add you as an additional user to that Business - Partner.

-

Payment Not Approved

-

If your payment was not successful, you may use My Orders to either "Void" the - order or "Complete" it with the correct payment information. If you need additional - help completing the order please use the Contact Us screen to contact the company - directly.

-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/iDempiere120x60.png b/org.adempiere.webstore.resource/iDempiere120x60.png deleted file mode 100644 index e5cd1f7b4f..0000000000 Binary files a/org.adempiere.webstore.resource/iDempiere120x60.png and /dev/null differ diff --git a/org.adempiere.webstore.resource/index.html b/org.adempiere.webstore.resource/index.html deleted file mode 100644 index d21e160029..0000000000 --- a/org.adempiere.webstore.resource/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - -iDempiere Web Store - - - - - - -

- -

-

iDempiere™ - Copyright © 1999-2013 -

-

Click here if not forwarded automatically

-
-

How to Customize your web store

- - diff --git a/org.adempiere.webstore.resource/index.jsp b/org.adempiere.webstore.resource/index.jsp deleted file mode 100644 index 196ac405c9..0000000000 --- a/org.adempiere.webstore.resource/index.jsp +++ /dev/null @@ -1,92 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Welcome - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductDescription PriceQuantityUOM 
- - - - - - - - -   -    
-
-

Price List: () -

-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/info.jsp b/org.adempiere.webstore.resource/info.jsp deleted file mode 100644 index 6acbc1d26b..0000000000 --- a/org.adempiere.webstore.resource/info.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Interest Areas - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Info - Interest Areas

- -

-
- - - - - - - - - - - - - - - - - - - - - - - -
Interest AreaDescriptionSubscription
  - - -   - - - - - - -
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/invoiceLines.jsp b/org.adempiere.webstore.resource/invoiceLines.jsp deleted file mode 100644 index 485dd3b3cf..0000000000 --- a/org.adempiere.webstore.resource/invoiceLines.jsp +++ /dev/null @@ -1,93 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Invoice Details - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> - - - - - - - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Invoice Details

- -

-
- - - - - - - - - - - - - - - - - - - -
Document NoDescriptionDateTotal LinesGrand TotalImageOpen
  Get Invoice ImagePaid - -
-

Lines

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LineNameDescriptionQtyPriceLine Net
  
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/invoices.jsp b/org.adempiere.webstore.resource/invoices.jsp deleted file mode 100644 index 6d29ecacc3..0000000000 --- a/org.adempiere.webstore.resource/invoices.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Invoices - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Invoices

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoDescriptionDateTotal LinesGrand TotalImageOpen
  Get Invoice ImagePaid - -
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/lock.gif b/org.adempiere.webstore.resource/lock.gif deleted file mode 100644 index 7400865f49..0000000000 Binary files a/org.adempiere.webstore.resource/lock.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/login.jsp b/org.adempiere.webstore.resource/login.jsp deleted file mode 100644 index 6b09aae212..0000000000 --- a/org.adempiere.webstore.resource/login.jsp +++ /dev/null @@ -1,164 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - <%@ include file="/WEB-INF/jspf/head.jspf" %> - <c:out value='${ctx.name}'/> - Login - - - -
- <%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

User Information

- -
- -
- Login Existing User - - '/> - - - - - - - - checked> Address validated -
- - - - -   - -
- -
- - - - - -
-
- - - - -
-
- -
- -
Enter all mandatory data.
- -
-
-

 

-
-
- <%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/notes.jsp b/org.adempiere.webstore.resource/notes.jsp deleted file mode 100644 index 1df42c072b..0000000000 --- a/org.adempiere.webstore.resource/notes.jsp +++ /dev/null @@ -1,121 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Notices - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Notices

- -

-
-

Workflow

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Created
Priority
Workflow Step
Description
HistoryAnswer


- - - :  - - - -  -  - - -

- - -
-
-

Notices

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CreatedMessageReferenceDescriptionTextAnswer
  - - :  - - - -  -  - - -    - - -
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/orderDetails.jsp b/org.adempiere.webstore.resource/orderDetails.jsp deleted file mode 100644 index 7b8331a81f..0000000000 --- a/org.adempiere.webstore.resource/orderDetails.jsp +++ /dev/null @@ -1,100 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Order Details - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> - - - - - - - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Order Details

- -

-
- - - - - - - - - - - - - - - - - - - -
Document NoDescriptionStatusDateTotal LinesGrand Total 
   - - - - - - -   -
-

Lines

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LineNameDescriptionQtyPriceLine Net
  
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/orders.jsp b/org.adempiere.webstore.resource/orders.jsp deleted file mode 100644 index f64499ea54..0000000000 --- a/org.adempiere.webstore.resource/orders.jsp +++ /dev/null @@ -1,73 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Orders - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Orders

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoDesciptionStatusDateTotal LinesGrand Total 
   - - - - - - -   -
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/paymentInfo.jsp b/org.adempiere.webstore.resource/paymentInfo.jsp deleted file mode 100644 index da91054cc6..0000000000 --- a/org.adempiere.webstore.resource/paymentInfo.jsp +++ /dev/null @@ -1,147 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Payment Info - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
- -

Thank you for your Order

- - - - - - - - - - - - - - - -
OrderLinesShippingTaxTotal
     
-
- -

Payment of

-
-

Please enter your payment information

- -

Payment Info:

- -
-
-
- -
-
- Payment Information - - - -
- - - -
- - - -  -  - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - -
- - Save Payment Information -
-
- - -
- -
-
- -
Enter all mandatory data.
- -
-
-
-
-
- Credit Card Validation Code
- (Card ID)
- Visa and Mastercard: 3 digits - back
- American Express: 4 digits - front
-

 

-
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/payments.jsp b/org.adempiere.webstore.resource/payments.jsp deleted file mode 100644 index 3f823290bf..0000000000 --- a/org.adempiere.webstore.resource/payments.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Payments - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Payments

- -

-
-
-
- Make a Payment - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoDoc StatusCredit CardDateAmountDetails
   
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/pdf.gif b/org.adempiere.webstore.resource/pdf.gif deleted file mode 100644 index cc05f43854..0000000000 Binary files a/org.adempiere.webstore.resource/pdf.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/pom.xml b/org.adempiere.webstore.resource/pom.xml deleted file mode 100644 index 412eae5591..0000000000 --- a/org.adempiere.webstore.resource/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - org.idempiere - org.idempiere.parent - 7.1.0-SNAPSHOT - ../org.idempiere.parent/pom.xml - - org.adempiere.webstore.resource - eclipse-plugin - \ No newline at end of file diff --git a/org.adempiere.webstore.resource/print-standard.css b/org.adempiere.webstore.resource/print-standard.css deleted file mode 100644 index 846258d46b..0000000000 --- a/org.adempiere.webstore.resource/print-standard.css +++ /dev/null @@ -1,381 +0,0 @@ -/** Adempiere Web Store (c) Jorg Janke */ -/** $Id$ */ - -html{ - overflow-y: hidden; - overflow-x: hidden; - overflow: auto; -} -body{ - font-family: Arial, sans-serif; - color: #333333; - margin: 0px; - padding: 0px; - background-color: #FFFFFF; - overflow-y: auto; - overflow-x: auto; - overflow: hidden; - height: 100%; - width: 100%; -} -#page{ - background-color: transparent; -} -#main { - background-color: #FFFFFF; - clear: both; - width: 100%; - border: 0px; - border-collapse: collapse; - -} -#menu{ - vertical-align: top; - text-align: left; - background: #ffffff url("fade.jpg") no-repeat fixed; - width: 129px; - float: left; - padding-top: 5px; - overflow: hidden; -} -#content { - vertical-align: top; - left: 130px; - right: 0px; - margin-right: 0px; - background-color: #FFFFFF; - border-color: #CCCCCC; - border-style: solid; - border-width: 1px 0px 1px 1px; - padding: 5px; - position: absolute; - min-width: 730px; -} -#vendorUse{ - vertical-align:top; - text-align:right; - width: 0px; - float: right; - background-color: #FFFFFF; -} -.contentTable{ - width: 100%; - border: 1px; - border-spacing: 2px; - padding: 2px; - border-color: #CCCCCC; - border-style: solid; -} -.internalTable{ - width: 100%; - padding: 2px; - border-style: none; -} -.adTable{ - width: 100%; - border: 1px; - border-spacing: 1px; - padding: 5px; -} -.oddRow{ - background-color: #EEEEEE; -} -.evenRow{ - background-color: #CCCCCC; -} -.amount{ - text-align: right; -} -.quantity{ - text-align: right; -} -.numeric{ - text-align: right; -} -#footer{ - background-color:#FFFFFF; - width: 100%; - border: 0px; - border-collapse: collapse; - padding: 3px; - white-space: nowrap; - min-width: 730px; -} -#footerParam4{ - width: 130px; - text-align: left; - display:inline; - float: left; - white-space: nowrap; -} -#footerParam5{ - text-align: left; - display:inline; - float: left; - white-space: nowrap; -} -#footerParam6{ - text-align: right; - display:inline; - float: right; - white-space: nowrap; -} -#header{ - background-color:#FFFFFF; - background-image: url("AdempiereSKY.jpg"); - background-repeat: repeat-x; - height: 75px; - display: block; -} -#headerIcon { - width: 130px; - text-align: left; - float: left; - border: 0px; -} -#headerIcon img{ - width: 130px; - height: 75px; - border-style: none; - border-width: 0px; -} -#headerContent { - text-align: left; - margin-right: 240px; - white-space: nowrap; - position: absolute; - top: 0px; - left: 131px; -} -#headerMenu { - text-align: right; - width: 240px; - float: right; - position: absolute; - top: 0px; - right: 0px; -} -a { - color: #000066; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -h1 { - color: #003366; - font-size: x-large; - margin-bottom: 10px; - margin-top: 0; -} -h2 { - color: #333333; - font-size: large; - font-style: italic; -} -h3 { - color: #006699; - font-size: medium; - font-style: normal; - font-weight: bold; -} -h4 { - color: #6600CC; - font-size: medium; - font-style: italic; -} -h5 { - color: #660099; - font-size: medium; - font-weight: normal; -} -h6 { - font-size: larger; - font-weight: bold; -} -hr { - padding-bottom: 0; - padding-top: 0; -} -p { - text-align: justify; -} -th { - color: #EEEEEE; - border: 1px; - border-color: #CCCCCC; - border-style: outset; - background-color: #006699; - text-align: left; - vertical-align: top; -} -caption { - color: #660099; - text-align: left; - font-style: italic; - font-weight: bolder; -} -.menuDetail{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - padding-bottom: 0; - padding-left: 20px; - padding-top: 0; - text-decoration: none; -} -.menuDetail:hover{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - padding-bottom: 0; - padding-left: 20px; - padding-top: 0; - text-decoration: underline; -} -.menuMain{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 16px; - text-align: left; - text-decoration: none; - padding-left: 5px; -} -.menuMain:hover{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 16px; - text-align: left; - text-decoration: underline; - padding-left: 5px; -} -.menuSub{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - padding-left: 10px; - text-align: left; - text-decoration: none; -} -.menuSub:hover{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - padding-left: 10px; - text-align: left; - text-decoration: underline; -} -.error{ - border: 1px solid #FF4A4A; - color: #FF0000; - font-weight: bold; - text-align: center; - width: 100%; -} -form{ - width: 100%; -} -fieldset{ - border: 1px solid #AAAAAA; - clear: both; -} -legend{ - color: #003366; - background: #EEEEEE; - border: 1px solid #999999; - padding: 2px 6px; -} -label{ - clear: left; - width: 35%; - float: left; - text-align: right; - margin-right: 0.8em; - display: block; - font-weight: bold; - vertical-align: baseline; - white-space: nowrap; -} -input{ -/* color: #781351;*/ -/* background: #fee3ad;*/ -/* border: #000000;*/ -} -select{ - color: #000000; - background: #ffffff; - border: 1px solid #CCCCCC; -} -.mandatory{ - background:#FFFF99; -} -input.disabled{ - border: 0px; - background: transparent; -} -.buttons{ - text-align:center; -} -.Cbasket{ - font-size: 9px; - display: inline; -} -#imgButton{ - border-style:outset; -} -#imgButtonPressed{ - border-style:inset; -} -#status{ - background-color: #fff8dc; - color: #000000; - display: none; -} - -#validationInfo{ - text-align: center; -} -#visaBox{ - width: 40%; - float:left; - text-align: right; -} -#amexBox{ - width: 40%; - float:right; - text-align: left; -} -.availProduct{ - /* comment out next line to show the Availability column */ - display:none; -} -label#productSearch{ - width:150px; - float: left; - text-align: right; - margin-right: 0.5em; - display: block; -} -.nobr{ - white-space: nowrap; -} -.wideText{ - width:100%; -} -.lineItem{ - vertical-align: top; -} -.entryNote{ - font-size: small; - color: #666666; - text-align: center; - vertical-align: top; -} -.emphasized{ - font-weight: bold; -} -.disabledMsg{ - display: none; - font-style: italic; - text-align: center; -} diff --git a/org.adempiere.webstore.resource/registration.jsp b/org.adempiere.webstore.resource/registration.jsp deleted file mode 100644 index b997f980ed..0000000000 --- a/org.adempiere.webstore.resource/registration.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> -<%@ page language="java" import="java.sql.*" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Registration - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> - - - - - - - - - - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Registration

- -

-
-
-
- New Registration - - - -
- - - -
- - - -
- - - checked name="InProduction" type="checkbox" id="InProduction" value="IsInProduction" /> -
- - - checked name="AllowPublish" type="checkbox" id="AllowPublish" value="IsAllowPublish" /> -
- - - - -
-
- -
- - - -
-
-
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/registrations.jsp b/org.adempiere.webstore.resource/registrations.jsp deleted file mode 100644 index 3c9d6b82fd..0000000000 --- a/org.adempiere.webstore.resource/registrations.jsp +++ /dev/null @@ -1,59 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Registrations - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Registrations

- -

-
-

New Registration

- - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionService DateIn ProductionAllow Publication
 
-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/request.jsp b/org.adempiere.webstore.resource/request.jsp deleted file mode 100644 index 265a0a4e64..0000000000 --- a/org.adempiere.webstore.resource/request.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Request - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

New Request

-
- - - - - - - - - - - - - - / -
- - - -
- - - -
- - - - Confidential Information -
- -
- Summary - -
- Summary: 1500 characters max -
- Attachments: Click on the document number after submitting. -
-
-
- - -
- - -

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/requestDetails.jsp b/org.adempiere.webstore.resource/requestDetails.jsp deleted file mode 100644 index 2d8db3a64d..0000000000 --- a/org.adempiere.webstore.resource/requestDetails.jsp +++ /dev/null @@ -1,244 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Request Details - - - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> - - - - - - - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

New Request

-

Request

- -

-
-
- Request - - - - - - - -
- Summary - -

  -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Attachments - - - - - - - -
-
-
-
-
-
- -

- - -
- - - - - - - - -
- Response - - - / -
- - - Close request -
- - - Escalate request -
- - - Confidential Information -
- -
- Follow-Up - -
- Follow-Up: 1500 characters max; for longer text, submit as an attachment -
-
- -
Response Form disabled due to Attach File Form being in use
-
- - -
-
-
- - -

- -
-
- Attach File - -
Attach File Form disabled due to Response Form being in use
- - - -
-
- -

- - -
-

 

-

History

- - - - - - - - - - - - - - - - - - - - - - -
CreatedByResult
 
-
- - - - - - - - - - - - - - - - - - - - - - -
UpdatedByOld Values
 
-

 

-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/requestTypes.jsp b/org.adempiere.webstore.resource/requestTypes.jsp deleted file mode 100644 index 76e704ffdb..0000000000 --- a/org.adempiere.webstore.resource/requestTypes.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -Request Types - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Request Types

- -

-
-

New Request

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDescriptionOpenTotalNew last 30 daysClosed last 30 days
-
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/requests.jsp b/org.adempiere.webstore.resource/requests.jsp deleted file mode 100644 index ea7d9bd41f..0000000000 --- a/org.adempiere.webstore.resource/requests.jsp +++ /dev/null @@ -1,156 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Requests - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Requests

- -

-
-

New Request

- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoSummaryStatusAssignedCreated
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/requestsAll.jsp b/org.adempiere.webstore.resource/requestsAll.jsp deleted file mode 100644 index ffbaad83b7..0000000000 --- a/org.adempiere.webstore.resource/requestsAll.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - - - - - - - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -- Requests: <c:out value='${requestType.name}'/> - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Requests:

- -

-
-

Request Types - New Request

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoSummaryStatusAssignedCreated
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/requests_sr.jsp b/org.adempiere.webstore.resource/requests_sr.jsp deleted file mode 100644 index b51ddcb8c3..0000000000 --- a/org.adempiere.webstore.resource/requests_sr.jsp +++ /dev/null @@ -1,58 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - Assigned Requests - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

Assigned Requests

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Document NoSummaryStatusAssignedCreated
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/rfqDetails.jsp b/org.adempiere.webstore.resource/rfqDetails.jsp deleted file mode 100644 index db21c6c003..0000000000 --- a/org.adempiere.webstore.resource/rfqDetails.jsp +++ /dev/null @@ -1,241 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My RfQ Details - - -
- <%@ include file="/WEB-INF/jspf/header.jspf" %> - - - - - - - - - - - - - -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My RfQ Details:

- -

-
-
-
- RfQ Summary - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionDetailsResponseWork StartDelivery
- -
- -
- -
- -
- - -
- Get Report -
-
-
- By -
- -
Total: -
- -
- -
- -
- -
- - -
- - -
- -
- -
- days -
- days -
-
-
- Line Items - - - - - - - - - - - - - - - - - - - - - - - - - -
#ProductLine Details
- - - - -
- Timeline - - - - - - - - - - - - - - - - - - - -
Work StartDelivery
- - - - - - - - - - days -
- - - - - - - - - - days -
-
-
- Line Quantities - - - - - - - - - - - - - - - - - - - - -
UOMQuantityPriceDiscount
- - - - - - - -
-
-
-
- Product Description - -
- -
-
- Product Details - -
- -
-
-
-
- Complete -
- -
-
-
-
- <%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- - diff --git a/org.adempiere.webstore.resource/rfqs.jsp b/org.adempiere.webstore.resource/rfqs.jsp deleted file mode 100644 index afbf62b83a..0000000000 --- a/org.adempiere.webstore.resource/rfqs.jsp +++ /dev/null @@ -1,61 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My RfQs - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My RfQ's

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDesciptionDetailsResponse byWork StartDelivery
   - days
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/robots.txt b/org.adempiere.webstore.resource/robots.txt deleted file mode 100644 index 8c827cdb6a..0000000000 --- a/org.adempiere.webstore.resource/robots.txt +++ /dev/null @@ -1 +0,0 @@ -User-agent: * diff --git a/org.adempiere.webstore.resource/shipments.jsp b/org.adempiere.webstore.resource/shipments.jsp deleted file mode 100644 index dcbdc230ac..0000000000 --- a/org.adempiere.webstore.resource/shipments.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Shipments - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Shipments

- -

-
- - - - - - - - - - - - - - - - - - - - - - -
Document NoStatusDate
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/src/.gitignore b/org.adempiere.webstore.resource/src/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/org.adempiere.webstore.resource/standard-ie6.css b/org.adempiere.webstore.resource/standard-ie6.css deleted file mode 100644 index e9a2f98146..0000000000 --- a/org.adempiere.webstore.resource/standard-ie6.css +++ /dev/null @@ -1,3 +0,0 @@ -/** Adempiere Web Store (c) Jorg Janke */ -/** $Id$ */ - diff --git a/org.adempiere.webstore.resource/standard-print.css b/org.adempiere.webstore.resource/standard-print.css deleted file mode 100644 index 7fc239d066..0000000000 --- a/org.adempiere.webstore.resource/standard-print.css +++ /dev/null @@ -1,272 +0,0 @@ -/** Adempiere Web Store (c) Jorg Janke */ -/** $Id$ */ - -html{ -} -body{ - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #000000; - margin: 0px; - padding: 0px; - height: 100%; - width: 100%; -} -#page{ -} -#main { - width: 100%; -} -#menu{ - display: none; -} -.menuDetail{ - display: none; -} -.menuDetail:hover{ - display: none; -} -.menuMain{ - display: none; -} -.menuMain:hover{ - display: none; -} -.menuSub{ - display: none; -} -.menuSub:hover{ - display: none; -} -#content { - position: absolute; - left: 0px; - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - vertical-align: top; - padding: 5px; - border: 0px; -} -#vendorUse{ - display: none; -} -.contentTable{ - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - width: 100%; - padding: 2px; -} -.internalTable{ - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - width: 100%; - padding: 2px; - border-style: none; -} -.adTable{ - width: 100%; - padding: 5px; -} -.oddRow{ - background-color: #EEEEEE; -} -.evenRow{ - background-color: #CCCCCC; -} -.amount{ - text-align: right; -} -.quantity{ - text-align: right; -} -.numeric{ - text-align: right; -} -#footer{ - display: none; -} -#footerParam4{ - display: none; -} -#footerParam5{ - text-align: center; - display:inline; -} -#footerParam6{ - display: none; -} -#header{ - display: none; -} -#headerIcon { - display: none; -} -#headerIcon img{ - display: none; -} -#headerContent { - display: none; -} -#headerMenu { - display: none; -} -h1 { - font-size: x-large; - margin-bottom: 10px; - margin-top: 0; -} -h2 { - font-size: large; - font-style: italic; -} -h3 { - font-size: medium; - font-style: normal; - font-weight: bold; -} -h4 { - font-size: medium; - font-style: italic; -} -h5 { - font-size: medium; - font-weight: normal; -} -h6 { - font-size: larger; - font-weight: bold; -} -hr { - padding-bottom: 0; - padding-top: 0; -} -#menu a { - display: none; -} -#menu a:hover { - display: none; -} -p { - text-align: justify; -} -th, legend { - color: #EEEEEE; - border: 1px; - border-color: #CCCCCC; - border-style: outset; - background-color: #006699; - text-align: left; - vertical-align: top; -} -caption { - text-align: left; - font-style: italic; - font-weight: bolder; -} -.error{ - border: 1px solid #FF4A4A; - font-weight: bold; - text-align: center; - width: 100%; -} -form{ - width: 100%; -} -fieldset{ - border: 0px solid #AAAAAA; - clear: both; -} -label{ - clear: left; - width: 35%; - float: left; - text-align: right; - margin-right: 0.8em; - display: block; - font-weight: bold; - vertical-align: baseline; - white-space: nowrap; -} -input{ -/* color: #781351;*/ -/* background: #fee3ad;*/ -/* border: #000000;*/ -} -select{ - color: #000000; - background: #ffffff; - border: 1px solid #CCCCCC; -} -.mandatory{ - background:#FFFF99; -} -input.disabled{ - border: 0px; - background: transparent; -} -.buttons{ - text-align:center; -} -.Cbasket{ - font-size: 9px; - display: inline; -} -#imgButton{ - border-style:outset; -} -#imgButtonPressed{ - border-style:inset; -} -#status{ - background-color: #fff8dc; - color: #000000; - display: none; -} - -#validationInfo{ - display: none; -} -#visaBox{ - display: none; -} -#amexBox{ - display: none; -} -.availProduct{ - /* comment out next line to show the Availability column */ - display:none; -} -label#productSearch{ - width:150px; - float: left; - text-align: right; - margin-right: 0.5em; - display: block; -} -.nobr{ - white-space: nowrap; -} -.wideText{ - width:100%; -} -.lineItem{ - vertical-align: top; -} -.entryNote{ - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666666; - text-align: center; - vertical-align: top; -} -.emphasized{ - font-weight: bold; -} -.disabledMsg{ - display: none; - font-style: italic; - text-align: center; -} -#fileLoad{ - display: none; -} \ No newline at end of file diff --git a/org.adempiere.webstore.resource/standard.css b/org.adempiere.webstore.resource/standard.css deleted file mode 100644 index be92739204..0000000000 --- a/org.adempiere.webstore.resource/standard.css +++ /dev/null @@ -1,380 +0,0 @@ -/** Adempiere Web Store (c) Jorg Janke */ -/** $Id: standard.css,v 1.6 2006/05/15 23:02:35 mdeaelfweald Exp $ */ - -html{ -} -body{ - font-family: Arial, sans-serif; - color: #333333; - margin: 0px; - padding: 0px; - background-color: #FFFFFF; - height: 100%; - width: 100%; -} -#page{ - background-color: transparent; -} -#main { - background-color: #FFFFFF; - clear: both; - width: 100%; - border: 0px; - border-collapse: collapse; - -} -#menu{ - vertical-align: top; - text-align: left; - background: #ffffff url("fade.jpg") no-repeat fixed; - width: 129px; - float: left; - padding-top: 5px; -} -#content { - vertical-align: top; - left: 130px; - right: 0px; - margin-right: 0px; - background-color: #FFFFFF; - border-color: #CCCCCC; - border-style: solid; - border-width: 1px 0px 1px 1px; - padding: 5px; - position: absolute; - min-width: 730px; -} -#vendorUse{ - vertical-align:top; - text-align:right; - width: 0px; - float: right; - background-color: #FFFFFF; -} -.contentTable{ - width: 100%; - border: 1px; - border-spacing: 2px; - padding: 2px; - border-color: #CCCCCC; - border-style: solid; -} -.internalTable{ - width: 100%; - padding: 2px; - border-style: none; -} -.adTable{ - width: 100%; - border: 1px; - border-spacing: 1px; - padding: 5px; -} -.oddRow{ - background-color: #EEEEEE; -} -.evenRow{ - background-color: #CCCCCC; -} -.amount{ - text-align: right; -} -.quantity{ - text-align: right; -} -.numeric{ - text-align: right; -} -#footer{ - background-color:#FFFFFF; - width: 100%; - border: 0px; - border-collapse: collapse; - padding: 3px; - white-space: nowrap; - min-width: 730px; -} -#footerParam4{ - width: 130px; - text-align: left; - display:inline; - float: left; - white-space: nowrap; -} -#footerParam5{ - text-align: left; - display:inline; - float: left; - white-space: nowrap; -} -#footerParam6{ - text-align: right; - display:inline; - float: right; - white-space: nowrap; -} -#header{ - background-color:#FFFFFF; - background-image: url("AdempiereSKY.jpg"); - background-repeat: repeat-x; - height: 75px; - display: block; -} -#headerIcon { - width: 130px; - text-align: left; - float: left; - border: 0px; -} -#headerIcon img{ - width: 130px; - height: 75px; - border-style: none; - border-width: 0px; -} -#headerContent { - text-align: left; - margin-right: 240px; - white-space: nowrap; - position: absolute; - top: 0px; - left: 131px; -} -#headerMenu { - text-align: right; - width: 240px; - float: right; - position: absolute; - top: 0px; - right: 0px; -} -a { - color: #000066; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -h1 { - color: #003366; - font-size: x-large; - margin-bottom: 10px; - margin-top: 0; -} -h2 { - color: #333333; - font-size: large; - font-style: italic; -} -h3 { - color: #006699; - font-size: medium; - font-style: normal; - font-weight: bold; -} -h4 { - color: #6600CC; - font-size: medium; - font-style: italic; -} -h5 { - color: #660099; - font-size: medium; - font-weight: normal; -} -h6 { - font-size: larger; - font-weight: bold; -} -hr { - padding-bottom: 0; - padding-top: 0; -} -p { - text-align: justify; -} -th { - color: #EEEEEE; - border: 1px; - border-color: #CCCCCC; - border-style: outset; - background-color: #006699; - text-align: left; - vertical-align: top; -} -caption { - color: #660099; - text-align: left; - font-style: italic; - font-weight: bolder; -} -.menuDetail{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - padding-bottom: 0; - padding-left: 20px; - padding-top: 0; - text-decoration: none; -} -.menuDetail:hover{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - padding-bottom: 0; - padding-left: 20px; - padding-top: 0; - text-decoration: underline; -} -.menuMain{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 16px; - text-align: left; - text-decoration: none; - padding-left: 5px; -} -.menuMain:hover{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 16px; - text-align: left; - text-decoration: underline; - padding-left: 5px; -} -.menuSub{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - padding-left: 10px; - text-align: left; - text-decoration: none; -} -.menuSub:hover{ - color: #006699; - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - padding-left: 10px; - text-align: left; - text-decoration: underline; -} -.error{ - border: 1px solid #FF4A4A; - color: #FF0000; - font-weight: bold; - text-align: center; - width: 100%; -} -form{ - width: 100%; -} -fieldset{ - border: 1px solid #AAAAAA; - clear: both; -} -legend{ - color: #003366; - background: #EEEEEE; - border: 1px solid #999999; - padding: 2px 6px; -} -label{ - clear: left; - width: 35%; - float: left; - text-align: right; - margin-right: 0.8em; - display: block; - font-weight: bold; - vertical-align: baseline; - white-space: nowrap; -} -input{ -/* color: #781351;*/ -/* background: #fee3ad;*/ -/* border: #000000;*/ -} -select{ - color: #000000; - background: #ffffff; - border: 1px solid #CCCCCC; -} -.mandatory{ - background:#FFFF99; -} -input.disabled{ - border: 0px; - background: transparent; -} -.buttons{ - text-align:center; -} -.Cbasket{ - font-size: 9px; - display: inline; -} -#imgButton{ - border-style:outset; -} -#imgButtonPressed{ - border-style:inset; -} -#status{ - background-color: #fff8dc; - color: #000000; - display: none; -} - -#validationInfo{ - text-align: center; -} -#visaBox{ - width: 40%; - float:left; - text-align: right; -} -#amexBox{ - width: 40%; - float:right; - text-align: left; -} -.availProduct{ - /* comment out next line to show the Availability column */ - display:none; -} -label#productSearch{ - width:150px; - float: left; - text-align: right; - margin-right: 0.5em; - display: block; -} -.nobr{ - white-space: nowrap; -} -.wideText{ - width:100%; -} -.lineItem{ - vertical-align: top; -} -.entryNote{ - font-size: small; - color: #666666; - text-align: center; - vertical-align: top; -} -.emphasized{ - font-weight: bold; -} -.disabledMsg{ - display: none; - font-style: italic; - text-align: center; -} -.tableNav -{ - vertical-align: top; - text-align: left; - width: 100%; -} \ No newline at end of file diff --git a/org.adempiere.webstore.resource/template.jsp b/org.adempiere.webstore.resource/template.jsp deleted file mode 100644 index 0b9af20926..0000000000 --- a/org.adempiere.webstore.resource/template.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/> - My Template - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

My Template

- -

-
- - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionDate
 
-

 

-
-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/test_1.jsp b/org.adempiere.webstore.resource/test_1.jsp deleted file mode 100644 index a0ce295672..0000000000 --- a/org.adempiere.webstore.resource/test_1.jsp +++ /dev/null @@ -1,74 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - -<%@ include file="/WEB-INF/jspf/head.jspf" %> -<c:out value='${ctx.name}'/>- My Test Area - -
-<%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -

WebStore Links

-

Add Product to Web Store: test Az - test Oak

-

Create Request for Sales Rep: test GU - test GA

-

EL Test

-

\${1.2 + 2.3} = ${1.2 + 2.3}

-

Test for Each

-
-
-

Form

-
-

- -

-

- -

-

- -

-

- -

-
-

Table

- - - - - - - - - - - - - - - - - - - - -
- caption -
c1c2c3c4
c1c2c3c4
c1c2c3c4
-

 

-
-<%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/update.jsp b/org.adempiere.webstore.resource/update.jsp deleted file mode 100644 index 393d1543e1..0000000000 --- a/org.adempiere.webstore.resource/update.jsp +++ /dev/null @@ -1,203 +0,0 @@ -<%@ include file="/WEB-INF/jspf/page.jspf" %> - - - - - - - - <%@ include file="/WEB-INF/jspf/head.jspf" %> - <c:out value='${ctx.name}'/> - Update - - - -
- <%@ include file="/WEB-INF/jspf/header.jspf" %> -
- <%@ include file="/WEB-INF/jspf/menu.jspf" %> - <%@ include file="/WEB-INF/jspf/vendor.jspf" %> -
-

User Information

-
-
- - '/> - - - - - - - - checked> Address validated -
- - - -
- - - -
- - -
-
- -
- - - -
-
-
- -
-
- - '/> - - - - - - - -   -
- - - -
- - - -
- - -
-
- -
- - -
-
-
- -
-
- - - '/> - - - - - - - -
- - - -
- - - -
- - - -
- - - -
- - - - - -
- - - -
- - -
-
- -
- - - -
- -
- -
- -
- -
Enter all mandatory data, for any specific section.
- -

 

-
-
- <%@ include file="/WEB-INF/jspf/footer.jspf" %> -
- diff --git a/org.adempiere.webstore.resource/visaCID.jpg b/org.adempiere.webstore.resource/visaCID.jpg deleted file mode 100644 index 388c02a1a7..0000000000 Binary files a/org.adempiere.webstore.resource/visaCID.jpg and /dev/null differ diff --git a/org.adempiere.webstore.resource/wfBack24.gif b/org.adempiere.webstore.resource/wfBack24.gif deleted file mode 100644 index 2a5e703062..0000000000 Binary files a/org.adempiere.webstore.resource/wfBack24.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/wfEnd24.gif b/org.adempiere.webstore.resource/wfEnd24.gif deleted file mode 100644 index b9c2c6c8ed..0000000000 Binary files a/org.adempiere.webstore.resource/wfEnd24.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/wfNext24.gif b/org.adempiere.webstore.resource/wfNext24.gif deleted file mode 100644 index 28bca3e72e..0000000000 Binary files a/org.adempiere.webstore.resource/wfNext24.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/wfStart24.gif b/org.adempiere.webstore.resource/wfStart24.gif deleted file mode 100644 index e094d12282..0000000000 Binary files a/org.adempiere.webstore.resource/wfStart24.gif and /dev/null differ diff --git a/org.adempiere.webstore.resource/wstore.js b/org.adempiere.webstore.resource/wstore.js deleted file mode 100644 index 37314fc26c..0000000000 --- a/org.adempiere.webstore.resource/wstore.js +++ /dev/null @@ -1,449 +0,0 @@ -/**************************************************************************** - * Compiere (c) Jorg Janke - All rights reseverd - * $Id: wstore.js,v 1.5 2006/05/23 22:39:03 mdeaelfweald Exp $ - * - * Web Store Scripts - ***************************************************************************/ - -var mandatory = "Enter mandatory:"; - -/** - * Is field empty ? - * Returns true if field is empty - */ -function isEmpty (value) -{ - if (value == null) - return true; - if (value == "") - return true; - for (var i = 0; i < value.length; i++) - { - var c = value.charAt(i); - if ((c != ' ' && c != '\n' && c != '\t')) - return false; - } - return true; -} - - - -function checkCreditCard(field) -{ - window.alert(field.name + "=" + field.value); - return true; -} - -function checkExpDate(field) -{ - window.alert(field.name + "=" + field.value); - return true; -} - -function checkABA (field) -{ - window.alert(field.name + "=" + field.value); - return true; -} - -function checkBAcct (field) -{ - window.alert(field.name + "=" + field.value); - return true; -} -function checkChknum (field) -{ - window.alert(field.name + "=" + field.value); - return true; -} - -function checkDL (field) -{ - window.alert(field.name + "=" + field.value); - return true; -} - -function checkField (field) -{ - window.alert(field.name + "=" + field.value); - return true; -} - - -/** - * Test mandatory fields for lookup - */ -function checkLookup (field) -{ - window.alert (field); - var f = field.form; - window.alert (f); - if (!isEmpty(f.EMAIL.value) && !isEmpty(f.password.value)) - return true; - var msg = mandatory; - if (isEmpty(f.EMAIL.value)) - mandatory += "\n - " + f.EMAIL.title; - if (isEmpty(f.password.value)) - mandatory += "\n - " + f.password.title; - window.alert(mandatory); - return false; -} - -var statusInfo = ''; - -/**************************************************************************** - * Check form - * - onSubmit="submitForm(this, new Array ('Name','..'));" - */ -function checkForm (formObj, requiredFields) -{ - statusInfo += 'checkForm:' + formObj.name + '[' + requiredFields.length + ']'; - if (formObj.nodeName == 'FORM') - { - if (formObj.Submit) - { - formObj.Submit.disabled=true; - statusInfo += '(' + formObj.Submit.name + ')'; - } - } - else - { - formObj = formObj.form; - if (formObj == null | formObj.nodeName != 'FORM') - { - alert ('invalid submitter'); - return false; - } - statusInfo += '->' + formObj.name; - } - window.status=statusInfo; - - var alertMsg = ""; - // check required fields - if (requiredFields) - { - for (i=0; i height) - menu.style.height = height - (menu.offsetHeight - height) + "px"; - - if(content.offsetHeight != height) - content.style.height=height+"px"; - // hack to ensure that padding, border, et al are taken into account - if(content.offsetHeight > height) - content.style.height = height - (content.offsetHeight - height) + "px"; - - if(vendor.offsetHeight != height) - vendor.style.height = height+"px"; - // hack to ensure that padding, border, et al are taken into account - if(vendor.offsetHeight > height) - vendor.style.height = height - (vendor.offsetHeight - height) + "px"; - - if(main.offsetHeight != height) - main.style.height = height+"px"; - // hack to ensure that padding, border, et al are taken into account - if(main.offsetHeight > height) - main.style.height = height - (main.offsetHeight - height) + "px"; -} -addOnLoadListener(resizeContent); - -function updateSelect(ajax, xmlTagName, selectId) -{ -// alert("updateSelect("+xmlTagName+","+selectId+"): " + ajax.request.responseText); - var xml = ajax.request.responseXML; - var error = xml.getElementsByTagName("error")[0]; - if(error) - { - AJAX.timeoutStatus(error.textContent, 3000); - return; - } - - var xmlOptions = xml.getElementsByTagName(xmlTagName)[0]; - if(!xmlOptions) - { - AJAX.timeoutStatus("Unable to read response", 3000); - return; - } - - // first we remove existing entries - var htmlSelect = document.getElementById(selectId); - while(htmlSelect.options.length > 0) - { - htmlSelect.removeChild(htmlSelect.options[0]); - } - - for(var i=0; i - * AL - * AK - * OR - * - */ - - var params = new Array(); - params['cmd']='regions'; - params['country']=countryId; - //params['selected']=regionId; - var loader = new AJAX.AjaxLoader("locationServlet", changeCountryCallback, null, "GET", params); -} - -function changeCountryCallback() -{ - updateSelect(this, "regions", "ID_C_Region_ID"); -} \ No newline at end of file diff --git a/org.adempiere.webstore.servlet/.classpath b/org.adempiere.webstore.servlet/.classpath deleted file mode 100644 index 423c974870..0000000000 --- a/org.adempiere.webstore.servlet/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/org.adempiere.webstore.servlet/.project b/org.adempiere.webstore.servlet/.project deleted file mode 100644 index cda7850171..0000000000 --- a/org.adempiere.webstore.servlet/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.adempiere.webstore.servlet - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.adempiere.webstore.servlet/.settings/org.eclipse.core.resources.prefs b/org.adempiere.webstore.servlet/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0203..0000000000 --- a/org.adempiere.webstore.servlet/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.adempiere.webstore.servlet/.settings/org.eclipse.jdt.core.prefs b/org.adempiere.webstore.servlet/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b5eacefd65..0000000000 --- a/org.adempiere.webstore.servlet/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.release=enabled diff --git a/org.adempiere.webstore.servlet/.settings/org.eclipse.m2e.core.prefs b/org.adempiere.webstore.servlet/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb..0000000000 --- a/org.adempiere.webstore.servlet/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/org.adempiere.webstore.servlet/.settings/org.eclipse.pde.core.prefs b/org.adempiere.webstore.servlet/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 16ef5326df..0000000000 --- a/org.adempiere.webstore.servlet/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Mon Jan 10 12:18:40 MYT 2011 -eclipse.preferences.version=1 -pluginProject.extensions=true -resolve.requirebundle=false diff --git a/org.adempiere.webstore.servlet/META-INF/MANIFEST.MF b/org.adempiere.webstore.servlet/META-INF/MANIFEST.MF deleted file mode 100644 index 756586df30..0000000000 --- a/org.adempiere.webstore.servlet/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: iDempiere Web Store Servlets -Bundle-SymbolicName: org.adempiere.webstore.servlet -Bundle-Version: 7.1.0.qualifier -Bundle-Vendor: Adempiere.org -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=11))" -Export-Package: org.compiere.wstore -Require-Bundle: org.adempiere.base;bundle-version="0.0.0" -Import-Package: javax.servlet, - javax.servlet.annotation;version="3.1.0", - javax.servlet.http, - javax.servlet.jsp, - javax.servlet.jsp.jstl.core, - javax.servlet.jsp.tagext, - org.apache.ecs, - org.apache.ecs.xhtml, - org.apache.taglibs.standard.tag.el.core -Fragment-Host: org.adempiere.webstore;bundle-version="0.0.0" -Bundle-ClassPath: . -Automatic-Module-Name: org.adempiere.webstore.servlet diff --git a/org.adempiere.webstore.servlet/build.properties b/org.adempiere.webstore.servlet/build.properties deleted file mode 100644 index 6eb93292ff..0000000000 --- a/org.adempiere.webstore.servlet/build.properties +++ /dev/null @@ -1,5 +0,0 @@ - -bin.includes = META-INF/,\ - . -output.. = target/classes/ -source.. = src/ diff --git a/org.adempiere.webstore.servlet/pom.xml b/org.adempiere.webstore.servlet/pom.xml deleted file mode 100644 index 122db7d868..0000000000 --- a/org.adempiere.webstore.servlet/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - org.idempiere - org.idempiere.parent - 7.1.0-SNAPSHOT - ../org.idempiere.parent/pom.xml - - org.adempiere.webstore.servlet - eclipse-plugin - \ No newline at end of file diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java deleted file mode 100644 index ad81b55bde..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java +++ /dev/null @@ -1,182 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MAdvertisement; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Web Request. - * - * @author Jorg Janke - * @version $Id: AdvertisementServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="advertisementServlet", - urlPatterns = "/advertisementServlet" -) -public class AdvertisementServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -1795015577057042600L; - /** Logging */ - private static final CLogger log = CLogger.getCLogger(AdvertisementServlet.class); - /** Name */ - static public final String NAME = "AdvertisementServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("AdvertisementServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Avertisement Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine(""); - } // destroy - - /*************************************************************************/ - - public static final String P_ADVERTISEMENT_ID = "W_Advertisement_ID"; - - /** - * Process the HTTP Get request - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to request.jsp"); - if (!response.isCommitted ()) - response.sendRedirect("advertisements.jsp"); - } // doGet - - - /************************************************************************** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - - // Get Session attributes - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // - Properties ctx = JSPEnv.getCtx(request); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu == null) - { - log.warning("No web user"); - if (!response.isCommitted ()) - response.sendRedirect("loginServlet?ForwardTo=advertisement.jsp"); // entry - return; - } - int W_Advertisement_ID = WebUtil.getParameterAsInt(request, P_ADVERTISEMENT_ID); - MAdvertisement ad = new MAdvertisement (ctx, W_Advertisement_ID, null); - if (ad.get_ID() == 0) - { - WebUtil.createForwardPage(response, "Web Advertisement Not Found", "advertisements.jsp", 0); - return; - } - StringBuilder info = new StringBuilder(); - // - String Name = WebUtil.getParameter (request, "Name"); - if (Name != null && Name.length() > 0 && !Name.equals(ad.getName())) - { - ad.setName(Name); - info.append("Name - "); - } - String Description = WebUtil.getParameter (request, "Description"); - if (Description != null && Description.length() > 0 && !Description.equals(ad.getDescription())) - { - ad.setDescription(Description); - info.append("Description - "); - } - String AdText = WebUtil.getParameter (request, "AdText"); - if (AdText != null && AdText.length() > 0 && !AdText.equals(ad.getAdText())) - { - ad.setAdText(AdText); - info.append("AdText - "); - } - String ClickTargetURL = WebUtil.getParameter (request, "ClickTargetURL"); - if (ClickTargetURL != null && ClickTargetURL.length() > 0 && !ClickTargetURL.equals(ad.getClickTargetURL())) - { - ad.setClickTargetURL(ClickTargetURL); - info.append("ClickTargetURL - "); - } - if (info.length() > 0) - { - if (ad.save()) - WebUtil.createForwardPage(response, "Web Advertisement Updated: " + info.toString(), "advertisements.jsp", 0); - else - WebUtil.createForwardPage(response, "Web Advertisement Update Error", "advertisements.jsp", 0); - } - else - WebUtil.createForwardPage(response, "Web Advertisement not changed", "advertisements.jsp", 0); - } // doPost - -} // AdvertisementSerlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java deleted file mode 100644 index c3e6d58153..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java +++ /dev/null @@ -1,340 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; -import java.util.logging.Level; -import java.util.zip.Deflater; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MAsset; -import org.compiere.model.MAssetDelivery; -import org.compiere.model.MProductDownload; -import org.compiere.util.CLogger; -import org.compiere.util.Msg; -import org.compiere.util.WebEnv; -import org.compiere.util.WebInfo; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Asset (Delivery) Servlet. - * - * @author Jorg Janke - * @version $Id: AssetServlet.java,v 1.3 2006/09/16 08:32:33 comdivision Exp $ - */ -@WebServlet( - name="assetServlet", - urlPatterns = "/assetServlet" -) -public class AssetServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 8335032857740563624L; - /** Logging */ - private static final CLogger log = CLogger.getCLogger(AssetServlet.class); - /** Name */ - static public final String NAME = "assetServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("AssetServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Assets Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine(""); - } // destroy - - - /** - * Process the HTTP Get request. - * (logout, deleteCookie) - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(false); - // - String url = "/assets.jsp"; - if (session == null - || session.getAttribute(WebInfo.NAME) == null - || session.getAttribute(WebUser.NAME) == null) - url = "/login.jsp"; - else - { - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - WebInfo info = (WebInfo)session.getAttribute(WebInfo.NAME); - if (info != null) - info.setMessage(""); - - // Parameter = Asset_ID - if invoice is valid and belongs to wu then create PDF & stream it - String msg = streamAsset(request, response); - if (info != null) - info.setMessage(Msg.parseTranslation(ctx, msg)); - if (msg == null // OK - || msg.length() == 0 - || msg.startsWith("**")) - // if not returned - results in exception: Cannot forward after response has been committed - return; - } - - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - doGet(request,response); - } // doPost - - /** - * Stream asset - * @param request request - * @param response response - * @return "" or error message - */ - protected String streamAsset (HttpServletRequest request, HttpServletResponse response) - { - // Get Asset ID - int A_Asset_ID = WebUtil.getParameterAsInt (request, "Asset_ID"); - if (A_Asset_ID == 0) - { - log.fine("No ID)"); - return "No Asset ID"; - } - byte[] assetInfo = String.valueOf(A_Asset_ID).getBytes(); - - // Get Asset - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - WebEnv.dump(request); - MAsset asset = new MAsset(ctx, A_Asset_ID, null); - if (asset.getA_Asset_ID() != A_Asset_ID) - { - if (log.isLoggable(Level.FINE)) log.fine("Asset not found - ID=" + A_Asset_ID); - return "Asset not found"; - } - // Get WebUser & Compare with invoice - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu.getC_BPartner_ID() != asset.getC_BPartner_ID()) - { - log.warning ("A_Asset_ID=" + A_Asset_ID - + " - BP_Invoice=" + asset.getC_BPartner_ID() - + " <> BP_User=" + wu.getC_BPartner_ID()); - return "Your asset not found"; - } - if (!asset.isDownloadable() || wu.isCreditStopHold() || !wu.isEMailVerified()) - return "Asset not downloadable"; - - // Name & URL - String pd = WebUtil.getParameter(request, "PD"); - String dl_name = null; - String dl_url = null; - InputStream in = null; - int M_ProductDownload_ID = 0; - if (pd != null && pd.length() > 0) - { - MProductDownload[] pdls = asset.getProductDownloads(); - if (pdls != null) - { - for (int i = 0; i < pdls.length; i++) - { - if (pdls[i].getDownloadURL().indexOf(pd) != -1) - { - M_ProductDownload_ID = pdls[i].getM_ProductDownload_ID(); - dl_name = pd; - dl_url = pdls[i].getDownloadURL(); - in = pdls[i].getDownloadStream(ctx.getProperty(WebSessionCtx.CTX_DOCUMENT_DIR)); - break; - } - } - } - } - if (log.isLoggable(Level.FINE)) log.fine(dl_name + " - " + dl_url); - if (dl_name == null || dl_url == null || in == null) - return "@NotFound@ @A_Asset_ID@: " + pd; - - /** - Download SupportContract.pdf for Jorg Janke - jjanke@adempiere.org - Version = 120 - Lot = . - SerNo = . - Guarantee Date = 5/30/05 - Thank you for using Adempiere Customer Asset Management - **/ - String lot = asset.getLot(); - if (lot == null || lot.length() == 0) - lot = "."; - String ser = asset.getSerNo(); - if (ser == null || ser.length() == 0) - ser = "."; - Object[] args = new Object[] { - dl_name, - wu.getName() + " - " + wu.getEmail(), - asset.getVersionNo(), - lot, - ser, - asset.getGuaranteeDate()}; - String readme = Msg.getMsg(ctx, "AssetDeliveryTemplate", args); - - - // Send File - MAssetDelivery ad = asset.confirmDelivery(request, wu.getAD_User_ID()); - if (M_ProductDownload_ID != 0) - ad.setM_ProductDownload_ID(M_ProductDownload_ID); - ad.setDescription(dl_name); - // - float speed = 0; - try - { - response.setContentType("application/zip"); - response.setHeader("Content-Location", "asset.zip"); - // response.setContentLength(length); - - int bufferSize = 2048; // 2k Buffer - response.setBufferSize(bufferSize); - // - if (log.isLoggable(Level.FINE)) log.fine(in + ", available=" + in.available()); - long time = System.currentTimeMillis(); - - // Zip Output Stream - ServletOutputStream out = response.getOutputStream (); - ZipOutputStream zip = new ZipOutputStream(out); // Servlet out - zip.setMethod(ZipOutputStream.DEFLATED); - zip.setLevel(Deflater.BEST_COMPRESSION); - zip.setComment(readme); - - // Readme File - ZipEntry entry = new ZipEntry("readme.txt"); - entry.setExtra(assetInfo); - zip.putNextEntry(entry); - zip.write(readme.getBytes(), 0, readme.length()); - zip.closeEntry(); - - // Payload - entry = new ZipEntry(dl_name); - entry.setExtra(assetInfo); - zip.putNextEntry(entry); - byte[] buffer = new byte[bufferSize]; - int count = 0; - int totalSize = 0; - do - { - count = in.read(buffer, 0, bufferSize); // read delivery - if (count > 0) - { - totalSize += count; - zip.write (buffer, 0, count); // write zip - } - } while (count != -1); - zip.closeEntry(); - - // Fini - zip.finish(); - zip.close(); - in.close(); - time = System.currentTimeMillis() - time; - speed = ((float)totalSize/1024) / ((float)time/1000); - String msg = (totalSize/1024) + "kB - " + time + " ms - " + speed + " kB/sec"; - log.fine(msg); - - // Delivery Record - ad.setDeliveryConfirmation(msg); - ad.saveEx(); - asset.saveEx(); - } - catch (IOException ex) - { - String msg = ex.getMessage (); - if (msg == null || msg.length () == 0) - msg = ex.toString (); - log.warning(msg); - // Delivery Record - try - { - if (msg.length () > 120) - msg = msg.substring (0, 119); - ad.setDeliveryConfirmation (msg); - ad.saveEx(); - // asset.saveEx(); not delivered - } - catch (Exception ex1) - { - log.log(Level.SEVERE, "2 - " + ex); - } - // nned to differentiate error message as response committed - return "** Streaming error; Please Retry"; - } - // - return null; - } // streamAsset - -} // AssetServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java deleted file mode 100644 index 54f29d3b8a..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java +++ /dev/null @@ -1,325 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Enumeration; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUtil; - -/** - * Shopping Basket. - * you could add a new line via parameter - * ?M_Product_ID=11&Name=aaaaa&Quantity=1&Price=11.11 - * if price list found, the price will be potentially overwritten - * - * @author Jorg Janke - * @version $Id: BasketServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="basketServlet", - urlPatterns = "/basketServlet" -) -public class BasketServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 3636119916937667318L; - /** Logging */ - private static final CLogger log = CLogger.getCLogger(BasketServlet.class); - /** Name */ - static public final String NAME = "basketServlet"; - /** SalesRep Parameter */ - static public final String P_SalesRep_ID = "SalesRep_ID"; - /** Product Parameter */ - static public final String P_Product_ID = "M_Product_ID"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("BasketServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Basket"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine(""); - } // destroy - - - /************************************************************************** - * Process the HTTP Get request. - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr() - + " - " + request.getRequestURL()); - @SuppressWarnings("unused") - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - - // Create WebBasket - WebBasket wb = (WebBasket)session.getAttribute(WebBasket.NAME); - if (wb == null) - wb = new WebBasket(); - session.setAttribute(WebBasket.NAME, wb); - // SalesRep - int SalesRep_ID = WebUtil.getParameterAsInt (request, P_SalesRep_ID); - if (SalesRep_ID != 0) - { - wb.setSalesRep_ID(SalesRep_ID); - if (log.isLoggable(Level.FINE)) log.fine("SalesRep_ID=" + SalesRep_ID); - } - - // Get Price List - PriceList pl = (PriceList)session.getAttribute(PriceList.NAME); - if (pl == null) - { - log.fine("No Price List in session"); - pl = (PriceList)request.getAttribute(PriceList.NAME); - } - if (log.isLoggable(Level.FINE)) log.fine("PL=" + pl); - - // Do we delete? Delete_x - deleteLine (request, wb); - // Do we add? Add_x - addLine (request, pl, wb); - - if (log.isLoggable(Level.INFO)) log.info(wb.toString()); - // Go back to basket - String url = "/basket.jsp"; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doGet - - /** - * Add Line - * @param request request - * @param pl price list - * @param wb web basket - */ - private void addLine (HttpServletRequest request, PriceList pl, WebBasket wb) - { - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - - // Get Parameter - int M_PriceList_ID = WebUtil.getParameterAsInt (request, "M_PriceList_ID"); - int M_PriceList_Version_ID = WebUtil.getParameterAsInt (request, "M_PriceList_Version_ID"); - wb.setM_PriceList_ID (M_PriceList_ID); - wb.setM_PriceList_Version_ID (M_PriceList_Version_ID); - // - int M_Product_ID = WebUtil.getParameterAsInt (request, P_Product_ID); - String Name = WebUtil.getParameter (request, "Name"); - String sQuantity = WebUtil.getParameter (request, "Quantity"); - String sPrice = WebUtil.getParameter (request, "Price"); - - // Search for Product ID Add_134 = Add - Enumeration en = request.getParameterNames (); - while (M_Product_ID == 0 && en.hasMoreElements ()) - { - String parameter = (String)en.nextElement (); - if (parameter.startsWith ("Add_")) - { - if (WebUtil.exists (request, parameter)) // to be sure - { - try - { - M_Product_ID = Integer.parseInt (parameter.substring (4)); - if (log.isLoggable(Level.FINE)) log.fine("Found Parameter=" + parameter + " -> " + M_Product_ID); - if (!WebUtil.exists(sQuantity)) - sQuantity = WebUtil.getParameter (request, "Qty_" + M_Product_ID); - if (!WebUtil.exists(sPrice)) - sPrice = WebUtil.getParameter (request, "Price_" + M_Product_ID); - if (!WebUtil.exists(Name)) - Name = WebUtil.getParameter (request, "Name_" + M_Product_ID); - if (log.isLoggable(Level.FINE)) log.fine("Found Parameters " + Name + ",Qty=" + sQuantity + ",Price=" + sPrice); - } - catch (Exception ex) - { - log.warning ("ParseError for " + parameter + " - " + ex.toString ()); - } - } - } - } - if (M_Product_ID == 0) - return; - - // **** Set Qty - BigDecimal Qty = null; - try - { - if (sQuantity != null && sQuantity.length () > 0) - Qty = new BigDecimal (sQuantity); - } - catch (Exception ex1) - { - log.warning ("(qty) - " + ex1.toString()); - } - if (Qty == null) - Qty = Env.ONE; - - // **** Set Price - BigDecimal Price = null; - // Find info in current price list - if (M_Product_ID != 0 && pl != null) - { - PriceListProduct plp = pl.getPriceListProduct(M_Product_ID); - if (plp != null) - { - Price = plp.getPrice (); - Name = plp.getName (); - if (log.isLoggable(Level.FINE)) log.fine("Found in PL = " + Name + " - " + Price); - } - } - /** if not found inPL and exists as parameter - try - { - if (Price == null && sPrice != null && sPrice.length () > 0) - Price = new BigDecimal (sPrice); - } - catch (Exception ex1) - { - log.warn ("addLine (price) - " + ex1.toString()); - } - /**/ - // Price not in session price list and not as parameter - if (Price == null && (pl == null || pl.isNotAllPrices())) - { - // Create complete Price List - int AD_Client_ID = Env.getContextAsInt(ctx, "AD_Client_ID"); - pl = PriceList.get (ctx, AD_Client_ID, M_PriceList_ID, null, null, true); - session.setAttribute(PriceList.NAME, pl); // set on session level - PriceListProduct plp = pl.getPriceListProduct(M_Product_ID); - if (plp != null) - { - Price = plp.getPrice (); - Name = plp.getName (); - if (log.isLoggable(Level.FINE)) log.fine("Found in complete PL = " + Name + " - " + Price); - } - } - - - if (Price != null) - { - WebBasketLine wbl = wb.add (M_Product_ID, Name, Qty, Price); - if (log.isLoggable(Level.FINE)) log.fine(wbl.toString()); - } - else // Price not found - log.warning ("Product Price not found - M_Product_ID=" + M_Product_ID - + ", Name=" + Name); - - } // addLine - - /** - * Delete Line. - * Delete_x - * @param request request - * @param wb web basket - */ - private void deleteLine (HttpServletRequest request, WebBasket wb) - { - try - { - String enc = request.getCharacterEncoding(); - if (enc == null) - request.setCharacterEncoding(WebEnv.ENCODING); - } - catch (Exception e) - { - log.log(Level.SEVERE, "Set CharacterEncoding=" + WebEnv.ENCODING, e); - } - Enumeration en = request.getParameterNames(); - while (en.hasMoreElements()) - { - String parameter = (String)en.nextElement(); - if (parameter.startsWith("Delete_")) - { - try - { - int line = Integer.parseInt (parameter.substring (7)); - if (log.isLoggable(Level.FINE)) log.fine("Delete parameter=" + parameter + " -> " + line); - wb.delete(line); - } - catch (NumberFormatException ex) - { - log.warning("ParseError for " + parameter + " - " + ex.toString()); - } - } - } - } // deleteLine - - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - // log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doGet(request, response); - } -} // Basket diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutLinkTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutLinkTag.java deleted file mode 100644 index c3fb1acc8d..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutLinkTag.java +++ /dev/null @@ -1,143 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; -import java.util.ArrayList; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.apache.ecs.xhtml.a; -import org.apache.ecs.xhtml.hr; -import org.apache.ecs.xhtml.img; -import org.apache.ecs.xhtml.p; -import org.compiere.util.CLogger; -import org.compiere.util.HtmlCode; - -/** - * CheckOut Links. - * Creates Basket / Checkout Link - *
- *  
- *	
- * - * @author Jorg Janke - * @version $Id: CheckOutLinkTag.java,v 1.3 2006/07/30 00:53:21 jjanke Exp $ - */ -public class CheckOutLinkTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = 6103865361649483332L; - /** Logger */ - private static final CLogger log = CLogger.getCLogger (CheckOutLinkTag.class); - /** One Line */ - private boolean m_oneLine = false; - - /** - * Set to one line - * @param var Y or something else - */ - public void setOneLine (String var) - { - m_oneLine = "Y".equals(var); - } // setOneLine - - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - HttpSession session = pageContext.getSession(); - HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); - WebBasket wb = (WebBasket)session.getAttribute(WebBasket.NAME); - - // log.fine("WebBasket=" + wb); - if (wb != null && wb.getLineCount() > 0) - { - if (log.isLoggable(Level.FINE)) log.fine("WebBasket exists"); - // - JspWriter out = pageContext.getOut(); - HtmlCode html = new HtmlCode(); - // - if (!m_oneLine) - html.addElement(new hr("90%", "left")); - // - img img = new img ("basket.gif"); - img.setBorder(0); - a a = new a("basket.jsp"); - a.setClass("menuMain"); - if (m_oneLine) - { - a.addElement (img); - a.addElement ("Basket"); - html.addElement(a); - html.addElement(" - "); - } - else - { - a.addElement ("Basket"); - a.addElement (img); - html.addElement(a); - // List Content - p p = new p(); - p.setClass("Cbasket"); - ArrayList lines = wb.getLines(); - for (int i = 0; i < lines.size(); i++) - { - p.addElement("
"); - Object line = lines.get(i); - p.addElement(line.toString()); - } - p.addElement("

"); - html.addElement(p); - // html.addElement(new br()); - } - // - img = new img ("checkout.gif"); - img.setBorder(0); - String url = CheckOutServlet.NAME; - if (!request.isSecure()) - url = "./" + CheckOutServlet.NAME; - a = new a(url); - a.setClass("menuMain"); - a.addElement("Create Order"); - a.addElement(img); - html.addElement(a); - // - html.output(out); - } // web basket - return (SKIP_BODY); - } // doStartTag - - /** - * End Tag - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - -} // CheckOutLinkTag diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java deleted file mode 100644 index 4fd5e0b882..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; - - -/** - * Check Out. - * - * @author Jorg Janke - * @version $Id: CheckOutServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="checkOutServlet", - urlPatterns = "/checkOutServlet" -) -public class CheckOutServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -8593119091754611172L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - /** Name */ - static public final String NAME = "checkOutServlet"; - /** Attribute */ - static public final String ATTR_CHECKOUT = "CheckOut"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("CheckOutServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web CheckOut Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine("destroy"); - } // destroy - - - /** - * Process the HTTP Get request. - * (logout, deleteCookie) - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - - // Web User/Basket - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - WebBasket wb = (WebBasket)session.getAttribute(WebBasket.NAME); - - String url = "/login.jsp"; - // Nothing in basket - if (wb == null || wb.getLineCount() == 0) - url = "/basket.jsp"; - else - { - session.setAttribute(ATTR_CHECKOUT, "Y"); // indicate checkout - if (wu != null && wu.isLoggedIn ()) - url = "/addressInfo.jsp"; - } - - // if (request.isSecure()) - // { - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - // } - // else - // Switch to secure - // { - // url = "https://" + request.getServerName() + request.getContextPath() + "/" + url; - // log.info ("doGet - Secure Forward to " + url); - // WUtil.createForwardPage(response, "Secure Access", url); - // } - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - @SuppressWarnings("unused") - HttpSession session = request.getSession(false); - } // doPost - -} // CheckOutServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/Click.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/Click.java deleted file mode 100644 index 0de4a1ac76..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/Click.java +++ /dev/null @@ -1,210 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Enumeration; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MClick; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Click Counter. - * Counts the click and forwards. - * - http://www.adempiere.com/wstore/click?target=www.yahoo.com - http://www.adempiere.com/wstore/click/www.yahoo.com - http://www.adempiere.com/wstore/click?www.yahoo.com - * - * - * @author Jorg Janke - * @version $Id: Click.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="clickServlet", - urlPatterns = "/click" -) -public class Click extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -5255937471697633035L; - - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - - /** Name */ - static public final String NAME = "click"; - - /** Target Parameter */ - static public final String PARA_TARGET = "target"; - /** Fallback Target */ - static public final String DEFAULT_TARGET = "http://www.adempiere.org/"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("Click.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Click Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine("destroy"); - } // destroy - - - /************************************************************************** - * Process the HTTP Get request. - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - long time = System.currentTimeMillis(); - request.getSession(true); // force create session for ctx - // - String url = getTargetURL(request); - if (!response.isCommitted ()) - response.sendRedirect(url); - response.flushBuffer(); - if (log.isLoggable(Level.FINE)) log.fine("redirect - " + url); - - // Save Click - saveClick(request, url); - // - if (log.isLoggable(Level.FINE)) log.fine(url + " - " + (System.currentTimeMillis()-time) + "ms"); - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - doGet (request, response); - } // doPost - - /** - * Get Target URL. - * 1 - target parameter - * 3 - parameter - * 2 - path - * @param request request - * @return URL - */ - private String getTargetURL (HttpServletRequest request) - { - // Get Named Parameter - /click?target=www... - String url = WebUtil.getParameter(request, PARA_TARGET); - // Check parameters - /click?www... - if (url == null || url.length() == 0) - { - Enumeration e = request.getParameterNames (); - if (e.hasMoreElements ()) - url = (String)e.nextElement (); - } - // Check Path - /click/www... - if (url == null || url.length() == 0) - { - url = request.getPathInfo (); - if (url != null) - url = url.substring(1); // cut off initial / - } - // Still nothing - if (url == null || url.length() == 0) - url = DEFAULT_TARGET; - // add http protocol - if (url.indexOf("://") == -1) - url = "http://" + url; - return url; - } // getTargetURL - - /** - * Save Click - */ - private boolean saveClick (HttpServletRequest request, String url) - { - Properties ctx = JSPEnv.getCtx(request); - // - MClick mc = new MClick (ctx, url, null); - mc.setRemote_Addr(request.getRemoteAddr()); - mc.setRemote_Host(request.getRemoteHost()); - String ref = request.getHeader("referer"); - if (ref == null || ref.length() == 0) - ref = request.getRequestURL().toString(); - mc.setReferrer(ref); - // - mc.setAcceptLanguage(request.getHeader("accept-language")); - mc.setUserAgent(request.getHeader("user-agent")); - // - HttpSession session = request.getSession(false); - if (session != null) - { - WebUser wu = (WebUser)session.getAttribute (WebUser.NAME); - if (wu != null) - { - mc.setEMail (wu.getEmail()); - mc.setAD_User_ID (wu.getAD_User_ID()); - } - } - return mc.save(); - } // saveClick - -} // Click diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java deleted file mode 100644 index f3242865e7..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java +++ /dev/null @@ -1,149 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; - -/** - * Web Page Counter - * - http://www.adempiere.com/wstore/counter - * - * - * @author Jorg Janke - * @version $Id: Counter.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="counterServlet", - urlPatterns = "/counter" -) -public class Counter extends HttpServlet implements Runnable -{ - /** - * - */ - private static final long serialVersionUID = 194411094026644834L; - - /** Logging */ - private static CLogger log = CLogger.getCLogger(Counter.class); - - /** Name */ - static public final String NAME = "counter"; - - /** Requests */ - private List m_requests = Collections.synchronizedList(new ArrayList()); - - /** - * Initialize global variables - * - * @param config servlet config - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("Counter.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Counter"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.info(""); - } // destroy - - - /************************************************************************** - * Process the HTTP Get request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - m_requests.add(request); - new Thread(this).start(); - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - doGet (request, response); - } // doPost - - /************************************************************************** - * Async Process - */ - public void run() - { - // get Request - HttpServletRequest request = null; - if (m_requests.size() > 0) - request = (HttpServletRequest)m_requests.remove(0); - if (request == null) - { - log.log(Level.SEVERE, "Nothing in queue"); - return; - } - - @SuppressWarnings("unused") - Properties ctx = JSPEnv.getCtx(request); - String ref = request.getHeader("referer"); - if (ref == null || ref.length() == 0) - ref = request.getRequestURL().toString(); - if (log.isLoggable(Level.INFO)) log.info("Referer=" + request.getHeader("referer") + " - URL=" + request.getRequestURL()); - } // run - -} // Counter diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java deleted file mode 100644 index a8b0097f4e..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java +++ /dev/null @@ -1,142 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebLogin; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUtil; - -/** - * EMail Servlet - * @author Jorg Janke - * @version $Id: EMailServlet.java,v 1.4 2006/09/24 12:11:16 comdivision Exp $ - */ -@WebServlet( - name="emailServlet", - urlPatterns = "/emailServlet" -) -public class EMailServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 6237307729376702569L; - - /** Logging */ - private static CLogger log = CLogger.getCLogger(EMailServlet.class); - - /** Name */ - static public final String NAME = "emailServlet"; - - /** - * Initialize global variables - * - * @param config servlet config - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("EMailServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere EMail"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.info(""); - } // destroy - - - /************************************************************************** - * Process the HTTP Get request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doPost (request, response); - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - - String url = WebUtil.getParameter(request, "ForwardTo"); - if (url == null || url.length() == 0) - url = "emailVerify.jsp"; - - WebLogin thisLogin = new WebLogin(request, response, ctx); - thisLogin.init (); - thisLogin.setMode("EMailVerify"); - if (!thisLogin.action ()) - { - if (!response.isCommitted ()) - response.sendRedirect("loginServlet?ForwardTo=" + url); - return; - } - - url = "/" + url; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doPost -} // EMailServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java deleted file mode 100644 index 38ae6ac6ba..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java +++ /dev/null @@ -1,155 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Web Expense Report. - * - * @author Jorg Janke - * @version $Id: ExpenseServlet.java,v 1.3 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="expenseServlet", - urlPatterns = "/expenseServlet" -) -public class ExpenseServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -3162975286315508379L; - /** Logging */ - private static CLogger log = CLogger.getCLogger(ExpenseServlet.class); - /** Name */ - static public final String NAME = "ExpenseServlet"; - /** Submit type */ - public static String P_SubmitType_Name = "Submit"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("ExpenseServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Expense Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine(""); - } // destroy - - /*************************************************************************/ - - public static final String P_Expense_ID = "W_Expense_ID"; - - /** - * Process the HTTP Get request - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to request.jsp"); - if (!response.isCommitted ()) - response.sendRedirect("expenses.jsp"); - } // doGet - - - /*************************************************************************/ - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - - // Get Session attributes - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // - @SuppressWarnings("unused") - Properties ctx = JSPEnv.getCtx(request); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu == null) - { - log.warning("No web user"); - response.sendRedirect("loginServlet?ForwardTo=expense.jsp"); // entry - return; - } - @SuppressWarnings("unused") - int W_Expense_ID = WebUtil.getParameterAsInt(request, P_Expense_ID); - String method = WebUtil.getParameter(request, P_SubmitType_Name); - if(method.startsWith("Save")) - { - // save BUT DON'T submit for approval - }else if(method.startsWith("Submit")){ - // save AND submit for approval - }else{ - // invalid - } - WebUtil.createForwardPage(response, "Web Expense Under Construction", "expenses.jsp", 0); - } // doPost - -} // ExpenseSerlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoLinkTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoLinkTag.java deleted file mode 100644 index ec72e2570c..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoLinkTag.java +++ /dev/null @@ -1,323 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.apache.ecs.xhtml.a; -import org.apache.ecs.xhtml.br; -import org.apache.ecs.xhtml.hr; -import org.compiere.model.MStore; -import org.compiere.util.CLogger; -import org.compiere.util.HtmlCode; -import org.compiere.util.WebInfo; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; - -/** - * Info Links (Menu). - * Creates Invoice/Payment/Asset/AddressInfo/PaymentInfo Link - *
- *  
- *	
- * - * @author Jorg Janke - * @version $Id: InfoLinkTag.java,v 1.6 2006/09/21 20:45:30 jjanke Exp $ - */ -public class InfoLinkTag extends TagSupport -{ - /** SV */ - private static final long serialVersionUID = 7608741032814139346L; - /** Logger */ - private static CLogger log = CLogger.getCLogger (InfoLinkTag.class); - /** One Line */ - private boolean m_oneLine = false; - - /** - * Set to one line - * @param var Y or something else - */ - public void setOneLine (String var) - { - m_oneLine = "Y".equals(var); - } // setOneLine - - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); - Properties ctx = JSPEnv.getCtx(request); // creates wsc/wu - WebSessionCtx wsc = WebSessionCtx.get(request); - // - HttpSession session = pageContext.getSession(); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu != null && wu.isLoggedIn()) - { - if (ctx != null) - { - WebInfo info = (WebInfo)session.getAttribute(WebInfo.NAME); - if (info == null || wu.getAD_User_ID() != info.getAD_User_ID()) - { - info = new WebInfo (ctx, wu); - session.setAttribute (WebInfo.NAME, info); - } - } - // - // log.fine("WebUser exists - " + wu); - // - JspWriter out = pageContext.getOut(); - HtmlCode html = new HtmlCode(); - // - if (wu.isCustomer() || wu.isVendor()) - menuBPartner (html, wsc.wstore); - if (wu.isSalesRep()) - menuSalesRep (html, wsc.wstore); - if (wu.isEmployee() || wu.isSalesRep()) - menuUser (html, wu.isEmployee(), wsc.wstore); - menuAll (html, wsc.wstore); - // - html.output(out); - } - else - { - if (log.isLoggable(Level.FINE)) - log.fine("No WebUser"); - if (session.getAttribute(WebInfo.NAME) == null) - session.setAttribute (WebInfo.NAME, WebInfo.getGeneral()); - } - return (SKIP_BODY); - } // doStartTag - - /** - * Add Business Partner Links. - * My Assets - * My Invoices - * My Payments - * My Orders - * My Shipments - * My RfQ - * @param html code - * @param wstore web store - */ - private void menuBPartner (HtmlCode html, MStore wstore) - { - boolean first = true; - if (wstore.isMenuAssets()) - { - nl (html, first); // --- Assets - first = false; - a a = new a ("assets.jsp"); - a.setClass ("menuSub"); - a.addElement ("My Assets"); - html.addElement (a); - } - // - if (wstore.isMenuInvoices()) - { - nl (html, first); // --- Invoices - first = false; - a a = new a ("invoices.jsp"); - a.setClass ("menuSub"); - a.addElement ("My Invoices"); - html.addElement (a); - } - // - if (wstore.isMenuPayments()) - { - nl (html, first); // --- Payments - first = false; - a a = new a ("payments.jsp"); - a.setClass ("menuSub"); - a.addElement ("My Payments"); - html.addElement (a); - } - // - if (wstore.isMenuOrders()) - { - nl (html, first); // --- Orders - first = false; - a a = new a ("orders.jsp"); - a.setClass ("menuSub"); - a.addElement ("My Orders"); - html.addElement (a); - } - // - if (wstore.isMenuShipments()) - { - nl (html, first); // --- Shipments - first = false; - a a = new a ("shipments.jsp"); - a.setClass ("menuSub"); - a.addElement ("My Shipments"); - html.addElement (a); - } - // - if (wstore.isMenuRfQs()) - { - nl (html, first); // --- RfQs - first = false; - a a = new a ("rfqs.jsp"); - a.setClass ("menuSub"); - a.addElement ("My RfQ's"); - html.addElement (a); - } - } // menuCustomer - - /** - * Add Links for all. - * My Requests - * Interest Area - * Registration - * @param html code - * @param wstore web store - */ - private void menuAll (HtmlCode html, MStore wstore) - { - boolean first = false; - if (wstore.isMenuRequests()) - { - nl (html, first); // Requests - a a = new a ("requests.jsp"); - a.setClass ("menuSub"); - a.addElement ("My Requests"); - html.addElement (a); - } - // - if (wstore.isMenuInterests()) - { - nl (html, first); // --- Interest Area - a a = new a ("info.jsp"); - a.setClass ("menuSub"); - a.addElement ("Interest Area"); - html.addElement (a); - } - - if (wstore.isMenuRegistrations()) - { - nl (html, false); // --- Registration - a a = new a ("registrations.jsp"); - a.setClass ("menuSub"); - a.addElement ("Registration"); - html.addElement (a); - } - } // menuAll - - /** - * Add Links for Sales Reps. - * Open Requests - * Advertisements - * Commissions - * C.Invoices - * @param html code - * @param wstore web store - */ - private void menuSalesRep (HtmlCode html, MStore wstore) - { - nl (html, true); // ------------ - // --- Assigned Requests - a a = new a ("requests_sr.jsp"); - a.setClass ("menuSub"); - a.addElement ("Open Requests"); - html.addElement (a); - // - nl (html, false); - // --- Advertisements - a = new a ("advertisements.jsp"); - a.setClass ("menuSub"); - a.addElement ("Advertisements"); - html.addElement (a); - // - nl (html, false); - // --- Commissions - a = new a ("commissionRuns.jsp"); - a.setClass ("menuSub"); - a.addElement ("Commissions"); - html.addElement (a); - // --- C.Invoices - a = new a ("commissionedInvoices.jsp"); - a.setClass ("menuDetail"); - a.addElement ("C.Invoices"); - html.addElement (a); - // - nl (html, false); - } // menuSalesRep - - /** - * Add Links for Users. - * Notes - * Expenses - * @param html code - * @param isEmployee employee - * @param wstore web store - */ - private void menuUser (HtmlCode html, boolean isEmployee, MStore wstore) - { - nl (html, true); // ------------ - // --- Notices - if (isEmployee) - { - a a = new a ("notes.jsp"); - a.setClass ("menuMain"); - a.addElement ("Notices"); - html.addElement (a); - // - nl (html, false); - } - // --- Expense - a a = new a ("expenses.jsp"); - a.setClass ("menuSub"); - a.addElement ("Expenses"); - html.addElement (a); - } // menuUser - - /** - * Add New Line / Break - * @param html code - * @param hr insert HR rather BR - */ - private void nl (HtmlCode html, boolean hr) - { - if (m_oneLine) - html.addElement(" - "); - else if (hr) - html.addElement(new hr("90%", "left")); - else - html.addElement(new br()); - } // nl - - /** - * End Tag - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - -} // InfoLinkTag diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java deleted file mode 100644 index 1fcde0da1b..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java +++ /dev/null @@ -1,198 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MContactInterest; -import org.compiere.model.MInterestArea; -import org.compiere.model.MMailMsg; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Web Store Subscription Info. - * http://dev2/wstore/infoServlet?mode=subscribe&area=1000002&contact=1000000 - * - * @author Jorg Janke - * @version $Id: InfoServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="infoServlet", - urlPatterns = "/infoServlet" -) -public class InfoServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 7753318286119195317L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - - /** - * Initialize global variables - * @param config servlet configuration - * @throws ServletException - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("InfoServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Interest Area Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.info("destroy"); - } // destroy - - /*************************************************************************/ - - /** - * Process the initial HTTP Get request. - * Reads the Parameter Amt and optional C_Invoice_ID - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // WEnv.dump(session); - // WEnv.dump(request); - - @SuppressWarnings("unused") - boolean success = processParameter(request); - - String url = "/info.jsp"; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doGet - - /** - * Process the HTTP Post request. - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doGet (request, response); - } // doPost - - - /************************************************************************** - * Process Parameter and check them - * @param request request - * @return true if processed - */ - private boolean processParameter (HttpServletRequest request) - { - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - Properties ctx = JSPEnv.getCtx(request); - - // mode = subscribe - String mode = WebUtil.getParameter (request, "mode"); - if (mode == null) - return false; - boolean subscribe = !mode.startsWith("un"); - // area = 101 - int R_InterestArea_ID = WebUtil.getParameterAsInt(request, "area"); - MInterestArea ia = MInterestArea.get(ctx, R_InterestArea_ID); - // contact = -1 - int AD_User_ID = WebUtil.getParameterAsInt(request, "contact"); - // - if (log.isLoggable(Level.FINE)) log.fine("Subscribe=" + subscribe - + ",R_InterestArea_ID=" + R_InterestArea_ID - + ",AD_User_ID=" + AD_User_ID); - if (R_InterestArea_ID == 0 || AD_User_ID == 0) - return false; - // - MContactInterest ci = MContactInterest.get (ctx, R_InterestArea_ID, AD_User_ID, false, null); - ci.subscribe(subscribe); - boolean ok = ci.save(); - if (ok) - log.fine("success"); - else - log.log(Level.SEVERE, "subscribe failed"); - - // Lookup user if direct link - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu == null) - { - wu = WebUser.get(ctx, AD_User_ID); - session.setAttribute(WebUser.NAME, wu); - } - sendEMail (request, wu, ia.getName(), subscribe); - - return ok; - } // processParameter - - /** - * Send Subscription EMail. - * @param request request - * @param wu web user - */ - private void sendEMail (HttpServletRequest request, WebUser wu, - String listName, boolean subscribe) - { - @SuppressWarnings("unused") - String msg = JSPEnv.sendEMail(request, wu, - subscribe ? MMailMsg.MAILMSGTYPE_Subscribe : MMailMsg.MAILMSGTYPE_UnSubscribe, - new Object[]{listName, wu.getName(), listName}); - } // sendEMail - - -} // InfoServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java deleted file mode 100644 index 606155e960..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java +++ /dev/null @@ -1,274 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MInvoice; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebInfo; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - - -/** - * Check Out. - * - * @author Jorg Janke - * @version $Id: InvoiceServlet.java,v 1.3 2006/09/16 08:32:34 comdivision Exp $ - */ -@WebServlet( - name="invoiceServlet", - urlPatterns = "/invoiceServlet" -) -public class InvoiceServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 8683332649912946092L; - /** Logging */ - private static CLogger log = CLogger.getCLogger(InvoiceServlet.class); - /** Name */ - static public final String NAME = "invoiceServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("InvoiceServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Invoice Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine("destroy"); - } // destroy - - - /** - * Process the HTTP Get request. - * (logout, deleteCookie) - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - - String url = "/invoices.jsp"; - // - HttpSession session = request.getSession(false); - if (session == null - || session.getAttribute(WebInfo.NAME) == null) - url = "/login.jsp"; - else - { - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - WebInfo info = (WebInfo)session.getAttribute(WebInfo.NAME); - if (info != null) - info.setMessage(""); - - // Parameter = Invoice_ID - if invoice is valid and belongs to wu then create PDF & stream it - String msg = streamInvoice (request, response); - if (msg == null || msg.length() == 0) - return; - if (info != null) - info.setMessage(msg); - } - - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doGet (request, response); - } // doPost - - - /** - * Stream invoice - * @param request request - * @param response response - * @return "" or error message - */ - private String streamInvoice (HttpServletRequest request, HttpServletResponse response) - { - int MIN_SIZE = 2000; // if not created size is 1015 - - // Get Invoice ID - int C_Invoice_ID = WebUtil.getParameterAsInt (request, "Invoice_ID"); - if (C_Invoice_ID == 0) - { - log.fine("No ID)"); - return "No Invoice ID"; - } - - // Get Invoice - Properties ctx = JSPEnv.getCtx(request); - MInvoice invoice = new MInvoice (ctx, C_Invoice_ID, null); - if (invoice.getC_Invoice_ID() != C_Invoice_ID) - { - if (log.isLoggable(Level.FINE)) log.fine("Invoice not found - ID=" + C_Invoice_ID); - return "Invoice not found"; - } - // Get WebUser & Compare with invoice - HttpSession session = request.getSession(true); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu.getC_BPartner_ID() != invoice.getC_BPartner_ID()) - { - log.warning ("Invoice from BPartner - C_Invoice_ID=" - + C_Invoice_ID + " - BP_Invoice=" + invoice.getC_BPartner_ID() - + " = BP_Web=" + wu.getC_BPartner_ID()); - return "Your invoice not found"; - } - - // Check Directory - String dirName = ctx.getProperty("documentDir", "."); - try - { - File dir = new File (dirName); - if (!dir.exists ()) - dir.mkdir (); - } - catch (Exception ex) - { - log.log(Level.SEVERE, "Could not create directory " + dirName, ex); - return "Streaming error - directory"; - } - // Check if Invoice already created - String fileName = invoice.getPDFFileName (dirName); - File file = new File(fileName); - if (file.exists() && file.isFile() && file.length() > MIN_SIZE) { - if (log.isLoggable(Level.INFO)) log.info("Existing: " + file - + " - " + new Timestamp(file.lastModified())); - } else { - if (log.isLoggable(Level.INFO)) log.info("New: " + fileName); - file = invoice.createPDF (file); - if (file != null) - { - invoice.setDatePrinted (new Timestamp(System.currentTimeMillis())); - invoice.saveEx(); - } - } - // Issue Error - if (file == null || !file.exists() || file.length() < MIN_SIZE) - { - log.warning("File does not exist - " + file); - return "Streaming error - file"; - } - - // Send PDF - try - { - int bufferSize = 2048; // 2k Buffer - int fileLength = (int)file.length(); - // - response.setContentType("application/pdf"); - response.setBufferSize(bufferSize); - response.setContentLength(fileLength); - // - if (log.isLoggable(Level.FINE)) log.fine(file.getAbsolutePath() + ", length=" + fileLength); - long time = System.currentTimeMillis(); // timer start - // - FileInputStream in = new FileInputStream (file); - ServletOutputStream out = response.getOutputStream (); - byte[] buffer = new byte[bufferSize]; - double totalSize = 0; - int count = 0; - do - { - count = in.read(buffer, 0, bufferSize); - if (count > 0) - { - totalSize += count; - out.write (buffer, 0, count); - } - } while (count != -1); - out.flush(); - out.close(); - // - in.close(); - time = System.currentTimeMillis() - time; - double speed = (totalSize/1024) / ((double)time/1000); - if (log.isLoggable(Level.FINE)) log.fine("Length=" - + totalSize + " - " - + time + " ms - " - + speed + " kB/sec"); - } - catch (IOException ex) - { - log.log(Level.SEVERE, ex.toString()); - return "Streaming error"; - } - - return null; - } // streamInvoice - -} // InvoiceServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java deleted file mode 100644 index 6f6e2df6a8..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java +++ /dev/null @@ -1,179 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.io.PrintWriter; -import java.net.URLEncoder; -import java.util.Date; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MIssue; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebUtil; - -/** - * Issue Reporting - * - * @author Jorg Janke - * @version $Id: IssueReportServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="issueReportServlet", - urlPatterns = "/issueReportServlet" -) -public class IssueReportServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 5347264108766751365L; - /** Logging */ - private static CLogger log = CLogger.getCLogger(IssueReportServlet.class); - - /** - * Initialize global variables - * @param config servlet configuration - * @throws ServletException - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("IssueReportServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Issue Reporting"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - if (log.isLoggable(Level.INFO)) log.info(""); - } // destroy - - - /************************************************************************** - * Process the initial HTTP Get request. - * Reads the Parameter Amt and optional C_Invoice_ID - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - @SuppressWarnings("unused") - HttpSession session = request.getSession(true); - // WEnv.dump(session); - // WEnv.dump(request); - - int AD_Issue_ID = WebUtil.getParameterAsInt(request, "RECORDID"); - String DBAddress = WebUtil.getParameter(request, "DBADDRESS"); - String Comments = WebUtil.getParameter(request, "COMMENTS"); - String IssueString = WebUtil.getParameter(request, "ISSUE"); - // - StringBuffer responseText = new StringBuffer("Adempiere Support - ") - .append(new Date().toString()) - .append("\n"); - MIssue issue = null; - if (AD_Issue_ID != 0) - { - issue = new MIssue(ctx, AD_Issue_ID, null); - if (issue.get_ID() != AD_Issue_ID) - responseText.append("Issue Unknown - Request Ignored"); - else if (!issue.getDBAddress().equals(DBAddress)) - responseText.append("Not Issue Owner - Request Ignored"); - else - { - issue.addComments(Comments); - responseText.append(issue.createAnswer()); - } - } - else if (IssueString == null || IssueString.length() == 0) - { - responseText.append("Unknown Request"); - } - else - { - issue = MIssue.create(ctx, IssueString); - if (issue == null || !issue.save()) - responseText.append("Could not save Issue"); - else - responseText.append(issue.process()); - } - - // - StringBuilder answer = new StringBuilder(); - if (issue != null && issue.get_ID() != 0) - { - answer.append("RECORDID=").append(issue.get_ID()) - .append(MIssue.DELIMITER); - // answer.append("DOCUMENTNO=").append(".") - // .append(MIssue.DELIMITER); - } - answer.append("RESPONSE=").append(responseText); - // - response.setHeader("Cache-Control", "no-cache"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); // with character encoding support - out.write(URLEncoder.encode(answer.toString(), "UTF-8")); - out.flush(); - if (out.checkError()) - log.log(Level.SEVERE, "error writing"); - out.close(); - } // doGet - - /** - * Process the HTTP Post request. - * The actual payment processing - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doGet(request, response); - } // doPost - -} // IssueReportServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/JSPEnv.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/JSPEnv.java deleted file mode 100644 index 5cd7c7731c..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/JSPEnv.java +++ /dev/null @@ -1,137 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.Env; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * JSP Environment Utilities - * - * @author Jorg Janke - * @version $Id: JSPEnv.java,v 1.5 2006/09/21 20:45:30 jjanke Exp $ - */ -public class JSPEnv -{ - /** - * Get Context from Session - * @param request request - * @return properties - */ - public static Properties getCtx (HttpServletRequest request) - { - WebSessionCtx wsc = WebSessionCtx.get(request); - HttpSession session = request.getSession(true); - - // Add/set current user - WebUser wu = WebUser.get(request); - if (wu != null) - { - int AD_User_ID = wu.getAD_User_ID(); - Env.setContext(wsc.ctx, "#AD_User_ID", AD_User_ID); // security - } - - // Finish - session.setMaxInactiveInterval(1800); // 30 Min HARDCODED - String info = (String)wsc.ctx.get(WebSessionCtx.HDR_INFO); - if (info != null) - session.setAttribute(WebSessionCtx.HDR_INFO, info); - return wsc.ctx; - } // getCtx - - /*************************************************************************/ - - private final static String COOKIE_NAME = "AdempiereWebUser"; - - /** - * Get Web User from Cookie - * @param request request with cookie - * @return web user or null - */ - public static String getCookieWebUser (HttpServletRequest request) - { - Cookie[] cookies = request.getCookies(); - if (cookies == null) - return null; - for (int i = 0; i < cookies.length; i++) - { - if (COOKIE_NAME.equals(cookies[i].getName())) - return cookies[i].getValue(); - } - return null; - } // getCookieWebUser - - /** - * Add Cookie with web user - * @param request request (for context path) - * @param response response to add cookie - * @param webUser email address - */ - public static void addCookieWebUser (HttpServletRequest request, HttpServletResponse response, String webUser) - { - Cookie cookie = new Cookie(COOKIE_NAME, webUser); - cookie.setComment("Adempiere Web User"); - cookie.setPath(request.getContextPath()); - cookie.setMaxAge(2592000); // 30 days in seconds 60*60*24*30 - response.addCookie(cookie); - } // setCookieWebUser - - /** - * Remove Cookie with web user by setting user to _ - * @param request request (for context path) - * @param response response to add cookie - */ - public static void deleteCookieWebUser (HttpServletRequest request, HttpServletResponse response) - { - // Moved over to WebUtil as needed more general also for WebCM - org.compiere.util.WebUtil.deleteCookieWebUser (request, response, COOKIE_NAME); - } // deleteCookieWebUser - - /** - * Get Remote From info - * @param request request - * @return remore info - */ - public static String getFrom (HttpServletRequest request) - { - return WebUtil.getFrom (request); - } // getFrom - - /************************************************************************** - * Send EMail - * @param request request - * @param to web user - * @param msgType see MMailMsg.MAILMSGTYPE_* - * @param parameter object array with parameters - * @return mail EMail.SENT_OK or error message - */ - public static String sendEMail (HttpServletRequest request, WebUser to, - String msgType, Object[] parameter) - { - return WebUtil.sendEMail(request, to, msgType, parameter); - } // sendEMail - -} // JSPEnv diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java deleted file mode 100644 index 6b3aa08af4..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java +++ /dev/null @@ -1,181 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MCountry; -import org.compiere.model.MLocation; -import org.compiere.model.MRegion; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.Util; - -/** - * Location Servlet - * - * @author Jorg Janke - * @version $Id: LocationServlet.java,v 1.5 2006/07/30 00:53:21 jjanke Exp $ - * @author Michael Judd BF [2728388] - fix potential CSS velnerability - */ -@WebServlet( - name="locationServlet", - urlPatterns = "/locationServlet" -) -public class LocationServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -1379510686568875557L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - - /** - * Initialize global variables - * @param config servlet configuration - * @throws javax.servlet.ServletException - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("LocationServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Location Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.info("destroy"); - } // destroy - - /** - * Process the initial HTTP Get request. - * Reads the Parameter Amt and optional C_Invoice_ID - * - * @param request request - * @param response response - * @throws ServletException - * @throws java.io.IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doPost(request, response); - } // doGet - - /** - * Process the HTTP Post request. - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - @SuppressWarnings("unused") - HttpSession session = request.getSession(true); - Properties ctx = JSPEnv.getCtx(request); - MLocation loc = new MLocation (ctx, 0, null); - response.setHeader("Cache-Control", "no-cache"); - response.setContentType("text/xml; charset=UTF-8"); - response.setCharacterEncoding("UTF-8"); - PrintWriter out = response.getWriter(); - - String cmd = request.getParameter("cmd"); - cmd = Util.maskHTML(cmd, true); - - if(cmd == null) - { - out.println("Unknown Request: NULL"); - }else{ - String selected = request.getParameter("selected"); - int selectedID = 0; - try{ - selectedID = Integer.parseInt(selected); - }catch(Exception e){ - selectedID = 0; - } - - if(cmd.equalsIgnoreCase("countries"))// should probably put these in enum - { - out.println(""); - MCountry[] countries = MCountry.getCountries(loc.getCtx()); - for(MCountry country : countries) - { - int id = country.getC_Country_ID(); - out.print(""+country.getName()+""); - } - out.println(""); - }else if(cmd.equalsIgnoreCase("regions")){ - String country = Util.maskHTML(request.getParameter("country"), true); - try{ - int countryId = Integer.parseInt(country); - - out.println(""); - MRegion[] regions = MRegion.getRegions(loc.getCtx(), countryId); - if((regions.length > 0) && (selectedID == 0)) - selectedID = regions[0].getC_Region_ID(); - - for(MRegion region : regions) - { - int id = region.getC_Region_ID(); - out.print(""+region.getName()+""); - } - out.println(""); - }catch(Exception e){ - out.println("Unknown Country: " + country + ""); - } - }else{ - out.println("Unknown Request: "+cmd+""); - } - } - - out.flush(); - out.close(); - } // doPost -} diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationTag.java deleted file mode 100644 index 9e2aa0d7ed..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationTag.java +++ /dev/null @@ -1,336 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.apache.ecs.xhtml.br; -import org.apache.ecs.xhtml.input; -import org.apache.ecs.xhtml.label; -import org.apache.ecs.xhtml.option; -import org.apache.ecs.xhtml.select; -import org.apache.ecs.xhtml.span; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; -import org.compiere.model.MCountry; -import org.compiere.model.MLocation; -import org.compiere.model.MRegion; -import org.compiere.util.CLogger; -import org.compiere.util.HtmlCode; -import org.compiere.util.Msg; -import org.compiere.util.Util; - -/** - * Location City - Postal - Region - Country (Address). - *
- *	
- *	
- * - * @author Jorg Janke - * @version $Id: LocationTag.java,v 1.3 2006/07/30 00:53:21 jjanke Exp $ - */ -public class LocationTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = -1083458086024632709L; - - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - - private String m_countryID_el; - private String m_regionID_el; - private String m_regionName_el; - private String m_city_el; - private String m_postal_el; - - private MCountry m_country; - - // CSS Classes - private static final String C_MANDATORY = "mandatory"; - //private static final String C_ERROR = "error"; - - /** - * Set Country - * @param info_el country info - */ - public void setCountryID (String info_el) - { - m_countryID_el = info_el; - } // setCountry - - /** - * Set Region - * @param info_el region info - */ - public void setRegionID (String info_el) - { - m_regionID_el = info_el; - } // setRegion - - /** - * Set Region - * @param info_el region info - */ - public void setRegionName (String info_el) - { - m_regionName_el = info_el; - } // setRegion - - /** - * Set City - * @param info_el city info - */ - public void setCity (String info_el) - { - m_city_el = info_el; - } // setCity - - /** - * Set Postal - * @param info_el postal info - */ - public void setPostal (String info_el) - { - m_postal_el = info_el; - } // setPostal - - private int getCountryID(MLocation loc) - { - int C_Country_ID = 0; - try - { - String info = (String)ExpressionUtil.evalNotNull ("location", "countryID", - m_countryID_el, String.class, this, pageContext); - if (info != null && info.length () != 0) - C_Country_ID = Integer.parseInt (info); - } - catch (Exception e) - { - log.severe ("Country - " + e); - } - - if (C_Country_ID == 0) - C_Country_ID = loc.getC_Country_ID(); // default - - return C_Country_ID; - } - private int getRegionID(MLocation loc) - { - int C_Region_ID = 0; - try - { - String info = (String)ExpressionUtil.evalNotNull ("location", "regionID", - m_regionID_el, String.class, this, pageContext); - if (info != null && info.length () != 0) - C_Region_ID = Integer.parseInt (info); - } - catch (Exception e) - { - log.log(Level.SEVERE, "RegionID - " + e); - } - if (C_Region_ID == 0) - C_Region_ID = loc.getC_Region_ID(); // default - - return C_Region_ID; - } - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - Properties ctx = JSPEnv.getCtx((HttpServletRequest)pageContext.getRequest()); - MLocation loc = new MLocation (ctx, 0, null); - HtmlCode html = new HtmlCode(); - - int C_Country_ID = getCountryID(loc); - int C_Region_ID = getRegionID(loc); - option[] countries = getCountries(loc, C_Country_ID); -// if (m_country != null) m_country.DisplaySequence; - - String name = null; - label lbl = null; - input field = null; - select sel = null; - - // City *********************************************************** - name = "City"; - String city = (String)ExpressionUtil.evalNotNull ("location", "city", - m_city_el, String.class, this, pageContext); - - lbl = new label(); - lbl.setFor(name); - lbl.setID("LBL_"+name); - lbl.addElement(Msg.translate(ctx, name)); - html.addElement(lbl); - - field = new input (input.TYPE_TEXT, name, city); - field.setSize(40).setMaxlength(60).setID("ID_" + name); - field.setClass(C_MANDATORY); - html.addElement(field); - - html.addElement(new br()); - - // Postal *********************************************************** - name = "Postal"; - String postal = (String)ExpressionUtil.evalNotNull ("location", "postal", - m_postal_el, String.class, this, pageContext); - - lbl = new label(); - lbl.setFor(name); - lbl.setID("LBL_"+name); - lbl.addElement(Msg.translate(ctx, name)); - html.addElement(lbl); - - field = new input (input.TYPE_TEXT, name, postal); - field.setSize(10).setMaxlength(10).setID("ID_" + name); - field.setClass(C_MANDATORY); - html.addElement(field); - - html.addElement(new br()); - - - // Region ******************************************************* - name = "C_Region_ID"; - - lbl = new label(); - lbl.setFor(name); - lbl.setID("LBL_"+name); - - String regionName = (String)ExpressionUtil.evalNotNull ("location", "regionName", - m_regionName_el, String.class, this, pageContext); - field = new input (input.TYPE_TEXT, "RegionName", regionName); - field.setSize(40).setMaxlength(60).setID("ID_RegionName"); - if (m_country != null && m_country.isHasRegion()) - { - sel = new select (name, getRegions (loc, C_Country_ID, C_Region_ID)); - sel.setID("ID_" + name); - lbl.addElement(m_country.getRegionName()); - html.addElement(lbl); - html.addElement(sel); - html.addElement(new span(" - ")); - html.addElement(field); - } - else{ - lbl.addElement(Msg.translate(ctx, name)); - html.addElement(lbl); - html.addElement(field); - } - - html.addElement(new br()); - - // Country ******************************************************* - name = "C_Country_ID"; - - lbl = new label(); - lbl.setFor(name); - lbl.setID("LBL_"+name); - lbl.addElement(Msg.translate(ctx, name)); - html.addElement(lbl); - - sel = new select (name, countries); - sel.setID("ID_" + name); - sel.setClass(C_MANDATORY); - sel.setOnChange("changeCountry('ID_"+name+"');"); - html.addElement(sel); - - html.addElement(new br()); - - - - if (log.isLoggable(Level.FINE)) log.fine("C_Country_ID=" + C_Country_ID + ", C_Region_ID=" + C_Region_ID - + ", RegionName=" + regionName + ", City=" + city + ", Postal=" + postal); - - JspWriter out = pageContext.getOut(); - html.output(out); - // - return (SKIP_BODY); - } // doStartTag - - /** - * End Tag - NOP - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - - /** - * Get Country Options. - * Add Regions for selected country - * Set Default - * @param loc MLocation - * @param C_Country_ID default country - * @return array of country options - */ - private option[] getCountries (MLocation loc, int C_Country_ID) - { - MCountry[] countries = MCountry.getCountries(loc.getCtx()); - option[] options = new option[countries.length]; - m_country = null; - // - for (int i = 0; i < countries.length; i++) - { - options[i] = new option (String.valueOf(countries[i].getC_Country_ID())); - options[i].addElement(Util.maskHTML(countries[i].getName())); - if (countries[i].getC_Country_ID() == C_Country_ID) - { - m_country = countries[i]; - options[i].setSelected (true); - } - } - // - return options; - } // getCountries - - /** - * Get Region Options for Country - * @param loc location - * @param C_Country_ID country - * @param C_Region_ID default region - * @return region array - */ - private option[] getRegions (MLocation loc, int C_Country_ID, int C_Region_ID) - { - MRegion[] regions = MRegion.getRegions(loc.getCtx(), C_Country_ID); - option[] options = new option[regions.length+1]; - // - options[0] = new option ("0"); - options[0].addElement(" "); - // - for (int i = 0; i < regions.length; i++) - { - options[i+1] = new option (String.valueOf(regions[i].getC_Region_ID())); - options[i+1].addElement(regions[i].getName()); - if (regions[i].getC_Region_ID() == C_Region_ID) - options[i+1].setSelected(true); - } - return options; - } // getRegions - - -} // LocationTag diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginLinkTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginLinkTag.java deleted file mode 100644 index a48fb2f84b..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginLinkTag.java +++ /dev/null @@ -1,227 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.apache.ecs.xhtml.a; -import org.apache.ecs.xhtml.input; -import org.compiere.util.CLogger; -import org.compiere.util.HtmlCode; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; - -/** - * Login Link. - * Creates Login/Logout Link - *
- *  
- *  Variable used - "webUser"
- *	
- * - * @author Jorg Janke - * @version $Id: LoginLinkTag.java,v 1.3 2006/07/30 00:53:21 jjanke Exp $ - */ -public class LoginLinkTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = 3808804739017792308L; - /** Logger */ - protected static CLogger log = CLogger.getCLogger (LoginLinkTag.class); - - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - Properties ctx = JSPEnv.getCtx((HttpServletRequest)pageContext.getRequest()); - // - WebUser wu = getWebUser(ctx); - if (wu == null) - pageContext.getSession().removeAttribute(WebUser.NAME); - else - pageContext.getSession().setAttribute (WebUser.NAME, wu); - // - String serverContext = ctx.getProperty(WebSessionCtx.CTX_SERVER_CONTEXT); - // log.fine("doStartTag - ServerContext=" + serverContext); - HtmlCode html = null; - if (wu != null && wu.isValid()) - html = getWelcomeLink (serverContext, wu); - else - html = getLoginLink (serverContext); - // - JspWriter out = pageContext.getOut(); - /** - // Delete Cookie Call - if (cookieUser != null && !cookieUser.equals(" ")) - { - log.fine("- Cookie=" + cookieUser); - html.addElement(" "); - a a = new a("loginServlet?mode=deleteCookie"); - a.setClass("menuDetail"); - a.addElement("(Delete Cookie)"); - html.addElement(a); - } - **/ - html.output(out); - // - // - return (SKIP_BODY); - } // doStartTag - - /** - * End Tag - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - - - /** - * Get WebUser. - * @param ctx context - * @return Web User or null - */ - private WebUser getWebUser (Properties ctx) - { - String address = pageContext.getRequest().getRemoteAddr(); - // Get stored User - WebUser wu = (WebUser)pageContext.getSession().getAttribute (WebUser.NAME); - if (wu != null) - { - if (log.isLoggable(Level.FINEST)) log.finest("(" + address + ") - SessionContext: " + wu); - } - else - { - wu = (WebUser)pageContext.getAttribute(WebUser.NAME); - if (wu != null) - if (log.isLoggable(Level.FINEST)) log.finest ("(" + address + ") - Context: " + wu); - } - if (wu != null) - return wu; - - // Check Cookie - String cookieUser = JSPEnv.getCookieWebUser ((HttpServletRequest)pageContext.getRequest()); - if (cookieUser == null || cookieUser.trim().length() == 0) { - if (log.isLoggable(Level.FINER)) log.finer ("(" + address + ") - no cookie"); - } else { - // Try to Load - wu = WebUser.get (ctx, cookieUser); - if (log.isLoggable(Level.FINER)) log.finer ("(" + address + ") - Cookie: " + wu); - } - if (wu != null) - return wu; - // - return null; - } // getWebUser - - - /************************************************************************** - * Get Login Link - * @param serverContext server context - * @return link - */ - private HtmlCode getLoginLink(String serverContext) - { - HtmlCode retValue = new HtmlCode(); - // Login button - input button = new input(input.TYPE_BUTTON, "Login", "Login"); - button.setOnClick("window.top.location.replace('./loginServlet');"); - retValue.addElement(button); - - /** Link - a a = new a("https://" + serverContext + "/login.jsp"); - a.setClass("menuMain"); - a.addElement("Login"); - retValue.addElement(a); - **/ - - retValue.addElement(" "); - return retValue; - } // getLoginLink - - /** - * Get Welcome Link - * @param serverContext server Context - * @param wu web user - * @return link - */ - private HtmlCode getWelcomeLink(String serverContext, WebUser wu) - { - HtmlCode retValue = new HtmlCode(); - // - a a = new a("./login.jsp"); - a.setClass("menuMain"); - String msg = "Welcome " + wu.getName(); - a.addElement(msg); - retValue.addElement(a); - // - retValue.addElement("   "); - if (wu.isLoggedIn()) - { - // Verify - if (!wu.isEMailVerified()) - { - input button = new input(input.TYPE_BUTTON, "Verify", "Verify EMail"); - button.setOnClick("window.top.location.replace('emailVerify.jsp');"); - retValue.addElement(button); - retValue.addElement(" "); - } - - // Update - input button = new input(input.TYPE_BUTTON, "Update", "Update User Info"); - button.setOnClick("window.top.location.replace('update.jsp');"); - retValue.addElement(button); - retValue.addElement(" "); - - // Logout - button = new input(input.TYPE_BUTTON, "Logout", "Logout"); - button.setOnClick("window.top.location.replace('loginServlet?mode=logout');"); - retValue.addElement(button); - - /** Link - a = new a ("loginServlet?mode=logout"); - a.setClass ("menuMain"); - a.addElement ("Logout"); - retValue.addElement (a); - **/ - } - else - { - input button = new input (input.TYPE_BUTTON, "Login", "Login"); - button.setOnClick ("window.top.location.replace('./login.jsp');"); - retValue.addElement (button); - } - retValue.addElement (" "); - // - return retValue; - } // getWelcomeLink - -} // LoginLinkTag diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java deleted file mode 100644 index 3cf7d38ae9..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java +++ /dev/null @@ -1,226 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Web User Login. - *
- * 	User posts Login
- * 	- OK = forward
- *  - Did not find user
- * 	- Invalid Password
- *	
- * @author Jorg Janke - * @version $Id: LoginServlet.java,v 1.6 2006/10/08 18:17:43 comdivision Exp $ - */ -@WebServlet( - name="loginServlet", - urlPatterns = "/loginServlet" -) -public class LoginServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -7356209202584278247L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - /** Name */ - static public final String NAME = "loginServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("LoginServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Login Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine("destroy"); - } // destroy - - /** - * Process the HTTP Get request. - * (logout, deleteCookie) - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - HttpSession session = request.getSession(true); // create new - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // - // WEnv.dump(request); - Properties ctx = JSPEnv.getCtx(request); // create if required - - org.compiere.util.WebLogin thisLogin = new org.compiere.util.WebLogin(request, response, ctx); - thisLogin.init (); - // JJ: cause needs to be fixed - if (WebUtil.getParameter(request, "Mode") == null) - if (WebUtil.getParameter(request, "mode") != null) - thisLogin.setP_Action("mode"); - thisLogin.action (); - if ("logout".equals(thisLogin.getMode())) - return; // already forwarded - - String url = thisLogin.getLogin_RelURL (); - - if (!url.startsWith("/")) - url = "/" + url; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - return; - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // WEnv.dump(session); - // WEnv.dump(request); - - - org.compiere.util.WebLogin thisLogin = new org.compiere.util.WebLogin(request, response, ctx); - thisLogin.init (); - - // Forward URL - String url = thisLogin.getForward (); - String salesRep = thisLogin.getSalesRep_ID (); // get SalesRep from request - if (salesRep != null) - session.setAttribute(thisLogin.getP_SalesRep_ID (), salesRep); - boolean checkOut = "Y".equals(session.getAttribute(CheckOutServlet.ATTR_CHECKOUT)); - // Set in login.jsp & addressInfo.jsp - boolean addressConfirm = "Y".equals(WebUtil.getParameter (request, "AddressConfirm")); - if (checkOut) - { - if (addressConfirm) - url = "/orderServlet"; - else - url = "/addressInfo.jsp"; - } - else - addressConfirm = false; - if (url == null || url.length() == 0) - { - url = (String)session.getAttribute(thisLogin.getP_ForwardTo ()); // get from session - if (url == null || url.length() == 0) - url = "/index.jsp"; - } - else - { - if (!url.startsWith("/")) - url = "/" + url; - session.setAttribute(thisLogin.getP_ForwardTo (), url); // save for log in issues - } - - // SalesRep Parameter - salesRep = (String)session.getAttribute(thisLogin.getP_SalesRep_ID ()); // get SalesRep from session - if (salesRep != null) - url += "?SalesRep_ID=" + salesRep; - // - //String mode = WebUtil.getParameter (request, "Mode"); - if (log.isLoggable(Level.FINE)) log.fine("- targeting url=" + url); // + " - mode=" + mode); - - // Web User - WebUser wu = WebUser.get(request); - - // Handover Loginprocess to general WebLogin Handler - // First set the URL from our current situation - thisLogin.setForward (url); - // Also handover addressConfirm - thisLogin.setAddressConfirm (addressConfirm); - // Since Mode Usage is not consequent we will try to figure it out. - if (WebUtil.getParameter(request, "Mode")==null) - if (WebUtil.getParameter(request, "mode")!=null) - thisLogin.setP_Action("mode"); - // Start the process - thisLogin.action (); - // getback the URL - url = thisLogin.getForward (); - - wu = thisLogin.getWebUser (); - session.setAttribute (WebUser.NAME, wu); - - if (!url.startsWith("/")) - url = "/" + url; - if (log.isLoggable(Level.INFO)) log.info("doPost - Forward to " + url); - if (url.startsWith("/orderServlet")) { - response.sendRedirect(url.substring(1)); - } else { - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url); - dispatcher.forward(request, response); - } - } // doPost - -} // LoginServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/MessageTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/MessageTag.java deleted file mode 100644 index 45041caf4c..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/MessageTag.java +++ /dev/null @@ -1,94 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.compiere.util.CLogger; -import org.compiere.util.Msg; - -/** - * Message/Translation Tag. - * - * - * @author Jorg Janke - * @version $Id: MessageTag.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -public class MessageTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = -5706293833314600951L; - /** Logger */ - private CLogger log = CLogger.getCLogger (getClass()); - /** Text */ - private String m_txt; - - /** - * Set text - * @param txt text to be translated - */ - public void setTxt (String txt) - { - m_txt = txt; - } // setVar - - - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - if (m_txt != null && m_txt.length() > 0) - { - Properties ctx = JSPEnv.getCtx((HttpServletRequest)pageContext.getRequest()); - String msg = Msg.translate(ctx, m_txt); - if (log.isLoggable(Level.FINE)) log.fine(m_txt + "->" + msg); - // - try - { - JspWriter out = pageContext.getOut(); - out.print (msg); - } - catch (Exception e) - { - throw new JspException(e); - } - } - return (SKIP_BODY); - } // doStartTag - - /** - * End Tag - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - -} // MessageTag diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java deleted file mode 100644 index fcc5acb49b..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java +++ /dev/null @@ -1,240 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MAttachment; -import org.compiere.model.MNote; -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebInfo; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Web Notice. - * - * @author Jorg Janke - * @version $Id: NoteServlet.java,v 1.3 2006/09/16 08:32:34 comdivision Exp $ - */ -@WebServlet( - name="noteServlet", - urlPatterns = "/noteServlet" -) -public class NoteServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -1253263675147711219L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - /** Name */ - static public final String NAME = "NoteServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("NoteServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Note Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine("destroy"); - } // destroy - - /*************************************************************************/ - - public static final String P_Note_ID = "AD_Note_ID"; - public static final String P_ATTACHMENT_INDEX = "AttachmentIndex"; - - /** - * Process the HTTP Get request. - * Attachment Download request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - String url = "/notes.jsp"; - // - HttpSession session = request.getSession(false); - if (session == null - || session.getAttribute(WebInfo.NAME) == null) - url = "/login.jsp"; - else - { - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - WebInfo info = (WebInfo)session.getAttribute(WebInfo.NAME); - if (info != null) - info.setMessage(""); - - // Parameter = Note_ID - if is valid and belongs to wu then create PDF & stream it - String msg = streamAttachment (request, response); - if (msg == null || msg.length() == 0) - return; - if (info != null) - info.setMessage(msg); - } - - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doGet - - /** - * Stream Attachment - * @param request request - * @param response response - * @return "" or error message - */ - private String streamAttachment (HttpServletRequest request, HttpServletResponse response) - { - // Get Note ID - int AD_Note_ID = WebUtil.getParameterAsInt(request, P_Note_ID); - if (AD_Note_ID == 0) - { - log.fine("No AD_Note_ID)"); - return "No Notice ID"; - } - int attachmentIndex = WebUtil.getParameterAsInt(request, P_ATTACHMENT_INDEX); - if (attachmentIndex == 0) - { - log.fine("No index)"); - return "No Request Attachment index"; - } - if (log.isLoggable(Level.INFO)) log.info("AD_Notice_ID=" + AD_Note_ID + " / " + attachmentIndex); - - // Get Note - Properties ctx = JSPEnv.getCtx(request); - MNote doc = new MNote (ctx, AD_Note_ID, null); - if (doc.getAD_Note_ID() != AD_Note_ID) - { - if (log.isLoggable(Level.FINE)) log.fine("Note not found - ID=" + AD_Note_ID); - return "Notice not found"; - } - - MAttachment attachment = doc.getAttachment(false); - if (attachment == null) - { - if (log.isLoggable(Level.FINE)) log.fine("No Attachment for AD_Note_ID=" + AD_Note_ID); - return "Notice Attachment not found"; - } - - // Get WebUser & Compare with invoice - HttpSession session = request.getSession(true); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu.getAD_User_ID() != doc.getAD_User_ID()) - { - log.warning ("AD_Note_ID=" - + AD_Note_ID + " - User_ID=" + doc.getAD_User_ID() - + " = Web_User=" + wu.getAD_User_ID()); - return "Your Notice not found"; - } - // Stream it - return WebUtil.streamAttachment (response, attachment, attachmentIndex); - } // streamAttachment - - - /************************************************************************** - * Process the HTTP Post request. - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - String url = "/notes.jsp"; - - // Get Session attributes - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // - Properties ctx = JSPEnv.getCtx(request); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu == null) - { - log.warning("No web user"); - if (!response.isCommitted ()) - response.sendRedirect("loginServlet?ForwardTo=notes.jsp"); // entry - return; - } - WebEnv.dump(request); - - int AD_Note_ID = WebUtil.getParameterAsInt(request, P_Note_ID); - String processed = WebUtil.getParameter (request, "Processed"); - boolean prc = processed != null && processed.length() > 0; - if (prc) - { - MNote note = new MNote (ctx, AD_Note_ID, null); - if (note.get_ID() == AD_Note_ID) - { - note.setProcessed(true); - note.saveEx(); - if (log.isLoggable(Level.FINE)) log.fine("doPost - " + note); - } - } - - // Redisplay - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doPost - -} // NoteServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java deleted file mode 100644 index 1f5b642be9..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java +++ /dev/null @@ -1,356 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MDocType; -import org.compiere.model.MMailMsg; -import org.compiere.model.MOrder; -import org.compiere.model.MOrderLine; -import org.compiere.model.MPayment; -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.Msg; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - - -/** - * Web Order. - * - * @author Jorg Janke - * @version $Id: OrderServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="orderServlet", - urlPatterns = "/orderServlet" -) -public class OrderServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -94012227184686536L; - - /** Logging */ - private static CLogger log = CLogger.getCLogger(OrderServlet.class); -// private static Logger s_log = Logger.getCLogger(OrderServlet.class); - - /** Name */ - static public final String NAME = "orderServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("OrderServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Order Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine(""); - } // destroy - - - /************************************************************************** - * Process the HTTP Get request. - * (logout, deleteCookie) - * Sends Web Request Page - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doPost (request, response); - } // doGet - - /** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - - // Web User/Basket - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - WebBasket wb = (WebBasket)session.getAttribute(WebBasket.NAME); - MOrder order = null; - - boolean done = false; - String url = "/paymentInfo.jsp"; - // Not logged in - if (wu == null || !wu.isLoggedIn()) - { - session.setAttribute("CheckOut", "Y"); // indicate checkout - url = "/login.jsp"; - done = true; - } - else // Order parameter - order = getOrder(request, ctx); - - // We have an Order - if (!done && order != null) - { - if (processOrder(request, order)) - url = "/orders.jsp"; - else - { - WebOrder wo = new WebOrder (order); - MPayment p = createPayment (session, ctx, wu, wo); - if (p != null) - { - session.setAttribute (PaymentServlet.ATTR_PAYMENT, p); - session.setAttribute(WebOrder.NAME, wo); - } - else - url = "/orders.jsp"; - } - done = true; - } - - // Nothing in basket - if (!done && (wb == null || wb.getLineCount() == 0)) - { - url = "/basket.jsp"; - done = true; - } - // Create Order & Payment Info - if (!done) - { - WebOrder wo = new WebOrder(wu, wb, ctx); - // We have an order - do delete basket & checkout indicator - if (wo.isInProgress() || wo.isCompleted()) - { - session.removeAttribute(CheckOutServlet.ATTR_CHECKOUT); - session.removeAttribute(WebBasket.NAME); - sendEMail(request, ctx, wo, wu); - } - // If the Order is negative, don't create a payment - if (wo.getGrandTotal().compareTo(Env.ZERO) > 0) - { - session.setAttribute(WebOrder.NAME, wo); - MPayment p = createPayment (session, ctx, wu, wo); - if (p == null) - { - WebUtil.createForwardPage(response, "Payment could not be created", "orders.jsp", 5); - return; - } - else - session.setAttribute (PaymentServlet.ATTR_PAYMENT, p); - } - else - { - url = "/orders.jsp"; - } - } - - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doPost - - - /************************************************************************** - * Create Payment, but don't save it - * @param session session - * @param ctx context - * @param wu web user - * @param wo Order - * @return Payment - */ - private MPayment createPayment(HttpSession session, Properties ctx, - WebUser wu, WebOrder wo) - { - // See PaymentServlet.doGet - MPayment p = new MPayment(ctx, 0, null); - p.setAD_Org_ID(wo.getAD_Org_ID()); - p.setIsSelfService(true); - p.setAmount (wo.getC_Currency_ID(), wo.getGrandTotal ()); // for CC selection - p.setIsOnline (true); - // Sales CC Trx - p.setC_DocType_ID(true); - p.setTrxType(MPayment.TRXTYPE_Sales); - p.setTenderType(MPayment.TENDERTYPE_CreditCard); - // Order Info - p.setC_Order_ID(wo.getC_Order_ID()); - // BP Info - p.setBP_BankAccount(wu.getBankAccount()); - // - return p; - } // createPayment - - /** - * Get Order - * @param request request - * @param ctx context - * @return true if processed - */ - private MOrder getOrder (HttpServletRequest request, Properties ctx) - { - // Order - String para = WebUtil.getParameter (request, "C_Order_ID"); - if (para == null || para.length() == 0) - return null; - int C_Order_ID = 0; - try - { - C_Order_ID = Integer.parseInt (para); - } - catch (NumberFormatException ex) - { - } - if (C_Order_ID == 0) - return null; - - if (log.isLoggable(Level.FINE)) log.fine("C_Order_ID=" + C_Order_ID); - return new MOrder (ctx, C_Order_ID, null); - } // getOrder - - - /** - * Process Order - * @param request request - * @param order order - * @return true if processed/ok - */ - private boolean processOrder (HttpServletRequest request, MOrder order) - { - // Doc Action - String DocAction = WebUtil.getParameter (request, "DocAction"); - if (DocAction == null || DocAction.length() == 0) - return false; - - MDocType dt = MDocType.get(order.getCtx(), order.getC_DocType_ID()); - if (!order.isSOTrx() - || order.getGrandTotal().compareTo(Env.ZERO) <= 0 - || !MDocType.DOCBASETYPE_SalesOrder.equals(dt.getDocBaseType())) - { - log.warning("Not a valid Sales Order " + order); - return true; - } - - // We have a Order No & DocAction - if (log.isLoggable(Level.FINE)) log.fine("DocAction=" + DocAction); - if (!MOrder.DOCACTION_Void.equals(DocAction)) - { - // Do not complete Prepayment - if (MOrder.STATUS_WaitingPayment.equals(order.getDocStatus())) - return false; - if (MDocType.DOCSUBTYPESO_PrepayOrder.equals(dt.getDocSubTypeSO())) - return false; - if (!MOrder.DOCACTION_Complete.equals(DocAction)) - { - log.warning("Invalid DocAction=" + DocAction); - return true; - } - } - order.setDocAction (DocAction, true); // force creation - boolean ok = order.processIt (DocAction); - order.saveEx(); - return ok; - } // processOrder - - - /** - * Send Order EMail. - * @param request request - * @param ctx context - * @param wo web order - * @param wu web user - */ - private void sendEMail (HttpServletRequest request, Properties ctx, WebOrder wo, WebUser wu) - { - StringBuilder message = new StringBuilder("\n"); - // - MOrder mo = wo.getOrder(); - if (mo != null) - { - MOrderLine[] ol = mo.getLines(true, null); - for (int i = 0; i < ol.length; i++) - { - message.append("\n").append(ol[i].getQtyOrdered()).append(" * ") - .append(ol[i].getName()); - if (ol[i].getDescription() != null) - message.append(" - ").append(ol[i].getDescription()); - message.append(" (").append(ol[i].getPriceActual()) - .append(") = ").append(ol[i].getLineNetAmt()); - } // line - } // order - message.append("\n\n") - .append(Msg.getElement(ctx, "C_Order_ID")) - .append(": ") - .append(wo.getDocumentNo()) - .append(" - ").append(Msg.getElement(ctx, "GrandTotal")) - .append(": ").append(wo.getGrandTotal()); - - - JSPEnv.sendEMail(request, wu, MMailMsg.MAILMSGTYPE_OrderAcknowledgement, - new Object[]{ - wo.getDocumentNo(), - wu.getName(), - message.toString()}); - } // sendEMail - - -} // OrderServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java deleted file mode 100644 index 0ecec2fb9b..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java +++ /dev/null @@ -1,445 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.adempiere.exceptions.AdempiereException; -import org.compiere.model.MClient; -import org.compiere.model.MMailMsg; -import org.compiere.model.MPayment; -import org.compiere.model.MPaymentValidate; -import org.compiere.process.DocAction; -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.Msg; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Web Store Payment Entry & Confirmation - * - * @author Jorg Janke - * @version $Id: PaymentServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="paymentServlet", - urlPatterns = "/paymentServlet" -) -public class PaymentServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -4205866013703830396L; - - /** Logging */ - private static CLogger log = CLogger.getCLogger(PaymentServlet.class); - - public static final String ATTR_PAYMENT = "payment"; - - /** - * Initialize global variables - * @param config servlet configuration - * @throws ServletException - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("PaymentServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Payment Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.info(""); - } // destroy - - - /************************************************************************** - * Process the initial HTTP Get request. - * Reads the Parameter Amt and optional C_Invoice_ID - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // WEnv.dump(session); - // WEnv.dump(request); - - // Non existing user or Existing Web Payment - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - MPayment p = (MPayment)session.getAttribute (ATTR_PAYMENT); - if (wu == null) - { - if (log.isLoggable(Level.INFO)) log.info ("No User"); - String url = "/index.jsp"; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } - - // Remove any open Order - session.removeAttribute(WebOrder.NAME); - // Payment Amount - String amtParam = WebUtil.getParameter (request, "Amt"); - if (amtParam == null || amtParam.length() == 0) - { - if (log.isLoggable(Level.INFO)) log.info ("No Payment Amount (" + amtParam + ")"); - doPost (request, response); - return; - } - char[] chars = amtParam.toCharArray(); - StringBuffer sb = new StringBuffer(); - boolean decimal = false; - for (int i = chars.length-1; i >=0; i--) - { - char c = chars[i]; - if (c == ',' || c == '.') - { - if (!decimal) - { - sb.insert (0, '.'); - decimal = true; - } - } - else if (Character.isDigit(c)) - sb.insert(0,c); - } - BigDecimal amt = null; - try - { - if (sb.length() > 0) - { - amt = new BigDecimal (sb.toString ()); - amt = amt.abs (); // make it positive - } - } - catch (Exception ex) - { - log.warning("Parsing Amount=" + amtParam + " (" + sb + ") - " + ex.toString()); - } - // Need to be positive amount - if (amt == null || amt.compareTo(Env.ZERO) < 0) - { - if (log.isLoggable(Level.INFO)) log.info("No valid Payment Amount (" + amtParam + ") - " + amt); - doPost (request, response); - return; - } - - String invoiceParam = WebUtil.getParameter (request, "C_Invoice_ID"); - int C_Invoice_ID = 0; - try - { - if (invoiceParam != null) - C_Invoice_ID = Integer.parseInt (invoiceParam); - } - catch (NumberFormatException ex) - { - log.warning("Parsing C_Invoice_ID=" + invoiceParam + " - " + ex.toString()); - } - if (log.isLoggable(Level.INFO)) log.info("Amt=" + amt + ", C_Invoice_ID=" + C_Invoice_ID); - - // Create New Payment for Amt & optional Invoice - // see OrderServlet.createPayment - p = new MPayment(ctx, 0, null); - // p.setAD_Org_ID(..); - p.setIsSelfService(true); - p.setAmount(0, amt); // for CC selection ges default from Acct Currency - p.setIsOnline(true); - - // Sales CC Trx - p.setC_DocType_ID(true); - p.setTrxType(MPayment.TRXTYPE_Sales); - p.setTenderType(MPayment.TENDERTYPE_CreditCard); - // Payment Info - p.setC_Invoice_ID(C_Invoice_ID); - // BP Info - p.setBP_BankAccount(wu.getBankAccount()); - // - // p.saveEx(); - session.setAttribute (ATTR_PAYMENT, p); - - String url = "/paymentInfo.jsp"; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doGet - - /** - * Process the HTTP Post request. - * The actual payment processing - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - // WEnv.dump(session); - // WEnv.dump(request); - - // Web User/Payment - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - MPayment p = (MPayment)session.getAttribute (ATTR_PAYMENT); - WebOrder wo = (WebOrder)session.getAttribute (WebOrder.NAME); - - String url = null; - if (wu == null || p == null) - url = "/index.jsp"; - else if (processPayment(request, ctx, p, wu, wo)) - url = "/confirm.jsp"; - else - url = "/paymentInfo.jsp"; - - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doPost - - - /************************************************************************** - * Process Payment. - * @param request request - * @param ctx context - * @param payment payment - * @param wu web user - * @param wo web order (optional) - * @return true if processed - */ - private boolean processPayment(HttpServletRequest request, Properties ctx, - MPayment payment, WebUser wu, WebOrder wo) - { - boolean ok = processParameter(request, ctx, payment, wu); - if (ok) - { - // if negative amount - make it positive - if (payment.getPayAmt().compareTo(Env.ZERO) < 0) - payment.setPayAmt(payment.getPayAmt().abs()); - ok = payment.processOnline(); - if (ok) - { - // Process Web Order and Set Invoice ID - if (wo != null) - { - if (!wo.isCompleted()) - wo.process(payment); - if (!wo.isCompleted()) - log.warning("Order not processed " + wo); - } - else - log.warning("No Order"); - // - // Added adempiereException by zuhri - if(!payment.processIt(DocAction.ACTION_Complete)) - throw new AdempiereException(Msg.getMsg(ctx, "FailedProcessingDocument") + " - " + payment.getProcessMsg()); - // end added by zuhri - payment.saveEx(); - sendThanksEMail (request, ctx, payment, wu, wo); - } - else - { - if (log.isLoggable(Level.FINE)) log.fine(payment.getErrorMessage()); - String errMsg = payment.getErrorMessage(); - payment.saveEx(); - payment.setErrorMessage(errMsg); - request.getSession().setAttribute(WebSessionCtx.HDR_MESSAGE, errMsg); - // - sendDeclineEMail(request, payment, wu, wo); - } - } - return ok; - } // processPayment - - /** - * Process Parameter and check them - * @param request request - * @param ctx context - * @param p payment - * @param wu web user - * @return true if processed - */ - private boolean processParameter (HttpServletRequest request, Properties ctx, MPayment p, WebUser wu) - { - StringBuilder sb = new StringBuilder(); - p.setTenderType(MPayment.TENDERTYPE_CreditCard); - p.setTrxType(MPayment.TRXTYPE_Sales); - p.setA_EMail(wu.getEmail()); - // CC & Number - String ccType = WebUtil.getParameter (request, "CreditCard"); - p.setCreditCardType(ccType); - String ccNumber = WebUtil.getParameter (request, "CreditCardNumber"); - p.setCreditCardNumber (ccNumber); - String AD_Message = MPaymentValidate.validateCreditCardNumber(ccNumber, ccType); - if (AD_Message.length() > 0) - sb.append(Msg.getMsg(ctx, AD_Message)).append(" - "); - - // Optional Verification Code - String ccVV = WebUtil.getParameter (request, "CreditCardVV"); - p.setCreditCardVV(ccVV); - if (ccVV != null && ccVV.length() > 0) - { - AD_Message = MPaymentValidate.validateCreditCardVV (ccVV, ccType); - if (AD_Message.length () > 0) - sb.append (Msg.getMsg (ctx, AD_Message)).append (" - "); - } - // Exp - int mm = WebUtil.getParameterAsInt(request, "CreditCardExpMM"); - p.setCreditCardExpMM (mm); - int yy = WebUtil.getParameterAsInt(request, "CreditCardExpYY"); - p.setCreditCardExpYY (yy); - AD_Message = MPaymentValidate.validateCreditCardExp(mm, yy); - if (AD_Message.length() > 0) - sb.append(Msg.getMsg(ctx, AD_Message)).append(" - "); - - // Account Info - String aName = WebUtil.getParameter (request, "A_Name"); - if (aName == null || aName.length() == 0) - sb.append("Name - "); - else - p.setA_Name(aName); - String aStreet = WebUtil.getParameter (request, "A_Street"); - p.setA_Street(aStreet); - String aCity = WebUtil.getParameter (request, "A_City"); - if (aCity == null || aCity.length() == 0) - sb.append("City - "); - else - p.setA_City(aCity); - String aState = WebUtil.getParameter (request, "A_State"); - p.setA_State(aState); - String aZip = WebUtil.getParameter (request, "A_Zip"); - if (aZip == null || aZip.length() == 0) - sb.append("Zip - "); - else - p.setA_Zip(aZip); - String aCountry = WebUtil.getParameter (request, "A_Country"); - p.setA_Country(aCountry); - - // Error Message - boolean ok = sb.length() == 0; - p.setErrorMessage(sb.toString()); // always set - - // Save BP Bank Account - if (ok) - { - String SP = "SavePayment"; - String SavePayment = WebUtil.getParameter (request, SP); - if (SP.equals(SavePayment)) - p.saveToBP_BankAccount(wu.getBankAccount()); - } - // - return ok; - } // processParameter - - - /** - * Send Payment EMail. - * @param request request - * @param p payment - * @param wu web user - * @param wo optional web order - */ - private void sendThanksEMail (HttpServletRequest request, Properties ctx, - MPayment p, WebUser wu, WebOrder wo) - { - StringBuffer message = new StringBuffer() - .append(p.getPayAmt()) - .append(" (").append(Msg.getElement(ctx, "R_PnRef")) - .append("=").append(p.getR_PnRef()).append(") "); - if (wo != null) - message.append("\n").append(Msg.getElement(ctx, "C_Order_ID")) - .append(": ").append(wo.getDocumentNo()); - - JSPEnv.sendEMail(request, wu, MMailMsg.MAILMSGTYPE_PaymentAcknowledgement, - new Object[]{ - p.getDocumentNo() + " (" + p.getPayAmt() + ")", - wu.getName(), - message.toString()}); - // SalesRep EMail - if (wo != null && wo.getSalesRep_ID() != 0) - { - MClient client = MClient.get(ctx); - client.sendEMail(wo.getSalesRep_ID(), - "(CC) Payment: " + p.getDocumentNo() + " (" + p.getPayAmt() + ")", - "Order: " + wo.getDocumentNo() - + "\nUser: " + wu.getName() + " - " + wu.getEmail(), - null); - } - } // sendEMail - - /** - * Send Payment EMail. - * @param request request - * @param p payment - * @param wu web user - */ - private void sendDeclineEMail (HttpServletRequest request, - MPayment p, WebUser wu, WebOrder wo) - { - StringBuffer message = new StringBuffer(p.getErrorMessage()) - .append(" - ").append(p.getCurrencyISO()).append(" ").append(p.getPayAmt()) - .append(" (Reference=").append(p.getR_PnRef()).append(") "); - if (wo != null) - message.append("\nfor Order: ").append(wo.getDocumentNo()); - - JSPEnv.sendEMail(request, wu, MMailMsg.MAILMSGTYPE_PaymentError, - new Object[]{ - p.getDocumentNo() + " (" + p.getCurrencyISO() + " " + p.getPayAmt() + ")", - wu.getName(), - message.toString()}); - } // sendDeclineEMail - -} // PaymentServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java deleted file mode 100644 index f89baf8c7a..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java +++ /dev/null @@ -1,449 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.Properties; -import java.util.logging.Level; - -import org.compiere.model.I_M_PriceList; -import org.compiere.model.MProductCategory; -import org.compiere.util.CCache; -import org.compiere.util.CLogger; -import org.compiere.util.DB; - -/** - * Price List. - * ArrayList of PriceListProduct - * Implementation assumes a relatively small price list (< 200) - * This is the case, if the product is selected in the WebStore, - * but not if it is added via a direct link. In that case, it will - * load all products(!) - * - * @author Jorg Janke - * @version $Id: PriceList.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -public class PriceList -{ - /** - * Get Price List - * @param AD_Client_ID client - * @param M_PriceList_ID price list - * @param searchString query search string - * @param productCategory query product category string - * @param allRecords all if no query - * @return Price list - */ - public static PriceList get (Properties ctx, int AD_Client_ID, int M_PriceList_ID, - String searchString, String productCategory, boolean allRecords) - { - // Search Parameter - String search = searchString; - if (search != null && (search.length() == 0 || search.equals("%"))) - search = null; - if (search != null) - { - if (!search.endsWith("%")) - search += "%"; - if (!search.startsWith("%")) - search = "%" + search; - search = search.toUpperCase(); - } - int M_Product_Category_ID = 0; - try - { - if (productCategory != null && productCategory.length() > 0) - M_Product_Category_ID = Integer.parseInt(productCategory); - } - catch (Exception e) - {} - if (M_Product_Category_ID < 0) - M_Product_Category_ID = 0; - - // Search Price List Cache - String key = String.valueOf(AD_Client_ID) + "_" + M_PriceList_ID; - PriceList retValue = null; - if (search == null && M_Product_Category_ID == 0 && allRecords) - retValue = s_cache.get(key); - - // create New - if (retValue == null) - { - retValue = new PriceList (ctx, AD_Client_ID, M_PriceList_ID, - search, M_Product_Category_ID, allRecords); - if (search == null && M_Product_Category_ID == 0 && allRecords) - s_cache.put(key, retValue); - } - return retValue; - } // get - - /** Price List Cache */ - private static CCache s_cache - = new CCache(I_M_PriceList.Table_Name, "PriceList", 5, 60, true); // 1h Cache - /** Maximum Lines to be displayed */ - public static int MAX_LINES = 50; - - - /************************************************************************* - * PriceList constructor. - * @param ctx context - * @param AD_Client_ID client - * @param M_PriceList_ID optional price list - * @param searchString query search string - * @param M_Product_Category_ID query product category - * @param allRecords all if no query - */ - private PriceList (Properties ctx, int AD_Client_ID, int M_PriceList_ID, - String searchString, int M_Product_Category_ID, boolean allRecords) - { - if (log.isLoggable(Level.FINER)) log.finer("AD_Client_ID=" + AD_Client_ID + ", M_PriceList_ID=" + M_PriceList_ID - + ", Search=" + searchString + ",M_Product_Category_ID=" + M_Product_Category_ID - + ", All=" + allRecords); - m_ctx = ctx; - - // Get Price List - if (getM_PriceList_ID (AD_Client_ID, M_PriceList_ID) == 0) - if (getM_PriceList_ID(AD_Client_ID, 0) == 0) - return; - - // Get Price List Version - getM_PriceList_Version_ID(m_PriceList_ID, new Timestamp(System.currentTimeMillis())); - loadProducts (searchString, M_Product_Category_ID, allRecords); - } // PriceList - - /** Attribute Name - also in JSPs */ - public static final String NAME = "priceList"; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - - private String m_name = "Not found"; - private String m_description; - private String m_currency; - private String m_curSymbol; - private String m_AD_Language; - private boolean m_taxIncluded; - private int m_PriceList_ID = 0; - private int m_PriceList_Version_ID = 0; - private String m_searchInfo = ""; - private boolean m_notAllPrices = false; - - /** Price Lines */ - private ArrayList m_prices = new ArrayList(); - /** Context */ - private Properties m_ctx; - - /** - * Find Price List - * @param AD_Client_ID client - * @param M_PriceList_ID optional price list - * @return M_PriceList_ID - */ - private int getM_PriceList_ID (int AD_Client_ID, int M_PriceList_ID) - { - String sql = "SELECT M_PriceList_ID, pl.Name, pl.Description, pl.IsTaxIncluded," // 1..4 - + " c.ISO_Code, c.CurSymbol, cc.AD_Language " // 5..7 - + "FROM M_PriceList pl" - + " INNER JOIN C_Currency c ON (pl.C_Currency_ID=c.C_Currency_ID)" - // begin globalqss 29/09/2005 -- problem with postgres port - // + " LEFT OUTER JOIN C_Country cc ON (c.C_Currency_ID=cc.C_Currency_ID AND ROWNUM=1) " - + " LEFT OUTER JOIN C_Country cc ON (c.C_Currency_ID=cc.C_Currency_ID) " - // end globalqss 29/09/2005 - + "WHERE pl.IsActive='Y'" - + " AND pl.AD_Client_ID=?"; // #1 - if (M_PriceList_ID != 0) - sql += " AND pl.M_PriceList_ID=?"; // #2 - else - sql += " ORDER BY pl.IsDefault DESC"; - m_PriceList_ID = 0; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, AD_Client_ID); - if (M_PriceList_ID != 0) - pstmt.setInt(2, M_PriceList_ID); - rs = pstmt.executeQuery(); - if (rs.next()) - { - m_PriceList_ID = rs.getInt(1); - m_name = rs.getString(2); - m_description = rs.getString(3); - m_taxIncluded = "Y".equals(rs.getString(4)); - m_currency = rs.getString(5); - m_curSymbol = rs.getString(6); - m_AD_Language = rs.getString(7); - } - } - catch (Exception e) - { - log.log(Level.SEVERE, "getM_PriceList_ID", e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - return m_PriceList_ID; - } // getM_PriceList_ID - - /** - * Get PL Version - * @param M_PriceList_ID price list - * @param day valid day - * @return M_PriceList_Version_ID - */ - private int getM_PriceList_Version_ID (int M_PriceList_ID, Timestamp day) - { - String sql = "SELECT plv.M_PriceList_Version_ID, plv.Name, plv.Description, plv.ValidFrom " // 1..4 - + "FROM M_PriceList_Version plv " - + "WHERE plv.M_PriceList_ID=?" // #1 - + " AND plv.ValidFrom <=? " // #2 - + "ORDER BY plv.ValidFrom DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - m_PriceList_Version_ID = 0; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, M_PriceList_ID); - pstmt.setTimestamp(2, day); - rs = pstmt.executeQuery(); - if (rs.next()) - { - m_PriceList_Version_ID = rs.getInt(1); - m_name = rs.getString(2); - m_description = rs.getString(3); - // m_validFrom = rs.getTimestamp(4); - } - } - catch (Exception e) - { - log.log(Level.SEVERE, "getM_PriceList_Version_ID", e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - - return m_PriceList_Version_ID; - } // getM_PriceList_Version_ID - - /** - * Load From Product Price - * @param searchString query search string - * @param M_Product_Category_ID query product category - * @param allRecords all only true if called from BasketServlet - */ - private void loadProducts (String searchString, int M_Product_Category_ID, boolean allRecords) - { - // Set Search String - if (log.isLoggable(Level.FINER)) log.finer("loadProducts - M_PriceList_Version_ID=" + m_PriceList_Version_ID - + ", Search=" + searchString + ", M_Product_Category_ID=" + M_Product_Category_ID); - m_searchInfo = ""; - if (searchString != null) - m_searchInfo = searchString; - if (M_Product_Category_ID != 0) - { - if (m_searchInfo.length() != 0) - m_searchInfo += " - "; - m_searchInfo += MProductCategory.get(m_ctx, M_Product_Category_ID).getName(); - } - - m_prices.clear(); - m_notAllPrices = false; - // - String sql = "SELECT p.M_Product_ID, p.Value, p.Name, p.Description, " // 1..4 - + "p.Help, p.DocumentNote, p.ImageURL, p.DescriptionURL, " // 5..8 - + "pp.PriceStd, uom.Name, uom.UOMSymbol " // 9..11 - + "FROM M_ProductPrice pp " - + " INNER JOIN M_Product p ON (pp.M_Product_ID=p.M_Product_ID AND p.IsActive='Y' AND p.IsSold='Y')" - + " INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID) " - + "WHERE pp.M_PriceList_Version_ID=?" // #1 - + " AND pp.PriceStd > 0 " - + " AND p.IsSelfService='Y'"; - if (searchString != null) - sql += " AND UPPER(p.Value||p.Name||p.Description) LIKE ? "; // #2 - if (M_Product_Category_ID != 0) - sql += " AND p.M_Product_Category_ID=? "; // #3 - if (!allRecords && searchString == null && M_Product_Category_ID == 0) - { - sql += " AND p.IsWebStoreFeatured='Y' "; - m_notAllPrices = true; - } - sql += "ORDER BY p.M_Product_Category_ID, p.Value"; - // log.fine("loadProducts - " + sql); - - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - int index = 1; - pstmt.setInt(index++, m_PriceList_Version_ID); - if (searchString != null) - pstmt.setString(index++, searchString); - if (M_Product_Category_ID != 0) - pstmt.setInt(index++, M_Product_Category_ID); - rs = pstmt.executeQuery(); - int no = 0; - while (rs.next()) - { - m_prices.add (new PriceListProduct( - rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), - rs.getString(5), rs.getString(6), rs.getString(7), rs.getString(8), - rs.getBigDecimal(9), rs.getString(10), rs.getString(11) )); - // if not all records limit list - if (!allRecords && ++no > MAX_LINES) - { - m_notAllPrices = true; - break; - } - } - } - catch (Exception e) - { - log.log(Level.SEVERE, "load", e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - if (log.isLoggable(Level.FINE)) log.fine("load #" + m_prices.size() + ", Search=" + m_searchInfo); - } // load - - - /************************************************************************** - * String Representation - * @return info - */ - public String toString() - { - StringBuilder sb = new StringBuilder("PriceList["); - sb.append(m_prices.size()) - .append("]"); - return sb.toString(); - } // toString - - /** - * Get Count - * @return size - */ - public int getPriceCount() - { - return m_prices.size(); - } // getPriceCount - - /** - * No Prices - * @return true if no prices - */ - public boolean isNoLines() - { - return getPriceCount() == 0; - } // getPriceCount - - /** - * Not all Prices displayed - * @return true if no prices - */ - public boolean isNotAllPrices() - { - return m_notAllPrices; - } // isNotAllPrices - - - /** - * Get Prices - * @return Price Array List - */ - public ArrayList getPrices() - { - return m_prices; - } // getPrices - - /** - * Get Price List for Product. - * Implementation assumes a relatively small price list (< 200) - * @param M_Product_ID product - * @return price list info or null - */ - public PriceListProduct getPriceListProduct (int M_Product_ID) - { - for (int i = 0; i < m_prices.size (); i++) - { - PriceListProduct plp = m_prices.get (i); - if (plp.getId () == M_Product_ID) - return plp; - } - return null; - } // getPriceListProduct - - /** - * Get Search Info - * @return search info - */ - public String getSearchInfo() - { - return m_searchInfo; - } // getSearchInfo - - /*************************************************************************/ - - /** - * Get Name - * @return Price List Name - */ - public String getName() - { - return m_name; - } - public String getDescription() - { - return m_description; - } - public String getCurrency() - { - return m_currency; - } - public String getCurSymbol() - { - return m_curSymbol; - } - public String getAD_Language() - { - return m_AD_Language; - } - public boolean isTaxIncluded() - { - return m_taxIncluded; - } - public int getPriceList_ID() - { - return m_PriceList_ID; - } - public int getPriceList_Version_ID() - { - return m_PriceList_Version_ID; - } - -} // PriceList diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java deleted file mode 100644 index 1fb5f671e5..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java +++ /dev/null @@ -1,156 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.math.BigDecimal; - -import org.compiere.util.CLogger; - -/** - * Price List Product - * - * @author Jorg Janke - * @version $Id: PriceListProduct.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -public class PriceListProduct -{ - /** - * Price List Product. - * @param M_Product_ID product - * @param value value - * @param name name - * @param description descriprion - * @param help help - * @param documentNote document note - * @param imageURL image - * @param descriptionURL description - * @param price price - * @param uomName uom - * @param uomSymbol uom - */ - public PriceListProduct (int M_Product_ID, String value, String name, String description, - String help, String documentNote, String imageURL, String descriptionURL, - BigDecimal price, String uomName, String uomSymbol) - { - // - m_Product_ID = M_Product_ID; - m_value = value; - m_name = name; - m_description = description; - // Help, DocumentNote, ImageURL, DescriptionURL, - m_help = help; - m_documentNote = documentNote; - m_imageURL = imageURL; - m_descriptionURL = descriptionURL; - // PriceStd, UOMName, UOMSymbol - m_price = price; - m_uomName = uomName; - m_uomSymbol = uomSymbol; - } // PriceListProduct - - /** Attribute Name */ - public static final String NAME = "PriceListProduct"; - /** Logging */ - @SuppressWarnings("unused") - private CLogger log = CLogger.getCLogger(getClass()); - - private int m_Product_ID; - private String m_value; - private String m_name; - private String m_description; - - private String m_help; - private String m_documentNote; - private String m_imageURL; - private String m_descriptionURL; - - private BigDecimal m_price; - private String m_uomName; - private String m_uomSymbol; - - - /** - * String Representation - * @return info - */ - public String toString() - { - StringBuilder sb = new StringBuilder("PriceListProduct["); - sb.append(m_Product_ID).append("-").append(m_name) - .append("-").append(m_price) - .append("]"); - return sb.toString(); - } // toString - - /*************************************************************************/ - - /** - * Get Product IO - * @return M_Product_ID - */ - public int getId() - { - return m_Product_ID; - } - public String getValue() - { - return m_value; - } - /** - * Get Name - * @return name - */ - public String getName() - { - return m_name; - } - public String getDescription() - { - return m_description; - } - public String getHelp() - { - return m_help; - } - - public String getDocumentNote() - { - return m_documentNote; - } - public String getImageURL() - { - return m_imageURL; - } - public String getDescriptionURL() - { - return m_descriptionURL; - } - - public BigDecimal getPrice() - { - return m_price; - } - public String getUomName() - { - return m_uomName; - } - public String getUomSymbol() - { - return m_uomSymbol; - } - -} // PriceListProduct diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListTag.java deleted file mode 100644 index c9fa5ab0b2..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListTag.java +++ /dev/null @@ -1,137 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.jstl.core.Config; -import javax.servlet.jsp.tagext.TagSupport; - -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.WebUser; - -/** - * PriceList Tag. - * Loads Price List - *
- *  
- *  Variable used = "priceList"
- *	
- * - * @author Jorg Janke - * @version $Id: PriceListTag.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -public class PriceListTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = -2109422988040998327L; - - /** Price List ID */ - private int m_priceList_ID = 0; - - /** Web User */ - private PriceList m_priceList; - /** Logger */ - private CLogger log = CLogger.getCLogger (getClass()); - - /** - * Set Price List - * @param var price list - */ - public void setPriceList_ID (String var) - { - try - { - m_priceList_ID = Integer.parseInt (var); - } - catch (NumberFormatException ex) - { - log.warning("setPriceList_ID - " + ex.toString()); - } - } // setM_PriceList_ID - - - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - // Create Price List - Properties ctx = JSPEnv.getCtx((HttpServletRequest)pageContext.getRequest()); - int AD_Client_ID = Env.getContextAsInt(ctx, "AD_Client_ID"); - int M_PriceList_ID = m_priceList_ID; - if (M_PriceList_ID == 0) - M_PriceList_ID = Env.getContextAsInt(ctx, "M_PriceList_ID"); - - // Check Business Partner - WebUser wu = (WebUser)pageContext.getSession().getAttribute(WebUser.NAME); - if (wu != null) - { - int PriceList_ID = wu.getM_PriceList_ID(); - if (PriceList_ID != 0) - { - if (log.isLoggable(Level.FINE)) log.fine("- using BP PriceList_ID=" + PriceList_ID); - M_PriceList_ID = PriceList_ID; - } - } - - // Get Parameters - String searchString = ctx.getProperty(ProductServlet.P_SEARCHSTRING); - String productCategory = ctx.getProperty(ProductServlet.P_M_PRODUCT_CATEGORY_ID); - - - // get price list - m_priceList = PriceList.get (ctx, AD_Client_ID, M_PriceList_ID, - searchString, productCategory, false); - if (M_PriceList_ID == 0) - Env.setContext(ctx, "#M_PriceList_ID", m_priceList.getPriceList_ID()); - - // Set Price List - HttpSession session = pageContext.getSession(); - session.setAttribute (PriceList.NAME, m_priceList); - if (log.isLoggable(Level.FINE)) log.fine("PL=" + m_priceList); - - // Set Locale from Price List - String AD_Language = m_priceList.getAD_Language(); - if (AD_Language == null || AD_Language.length() == 0) - AD_Language = "en_US"; - Config.set(session, Config.FMT_LOCALE, AD_Language); - Config.set(session, Config.FMT_FALLBACK_LOCALE, "en_US"); - // - return (SKIP_BODY); - } // doStartTag - - /** - * End Tag - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - -} // PriceListTag diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java deleted file mode 100644 index e611d518fb..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java +++ /dev/null @@ -1,137 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.apache.ecs.xhtml.option; -import org.apache.ecs.xhtml.select; -import org.compiere.model.I_M_Product_Category; -import org.compiere.util.CCache; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.Env; -import org.compiere.util.HtmlCode; -import org.compiere.util.KeyNamePair; -import org.compiere.util.Util; - -/** - * Product Category List - * - * - * - * - * @author Jorg Janke - * @version $Id: ProductCategoryListTag.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -public class ProductCategoryListTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = -5125199548679756479L; - /** Logging */ - private static CLogger log = CLogger.getCLogger(ProductCategoryListTag.class); - - - /** - * Start Tag - * @return SKIP_BODY - * @throws JspException - */ - public int doStartTag() throws JspException - { - Properties ctx = JSPEnv.getCtx((HttpServletRequest)pageContext.getRequest()); - - int AD_Client_ID = Env.getAD_Client_ID(ctx); - String name = "M_Product_Category_ID"; - - option[] options = getCategories (AD_Client_ID); - select sel = new select (name, options); - sel.setID("ID_" + name); - - if (log.isLoggable(Level.FINE)) log.fine("AD_Client_ID=" + AD_Client_ID + ", #=" + options.length); - - // Assemble - HtmlCode html = new HtmlCode(); - html.addElement(sel); - - JspWriter out = pageContext.getOut(); - html.output(out); - // - return (SKIP_BODY); - } // doStartTag - - /** - * End Tag - NOP - * @return EVAL_PAGE - * @throws JspException - */ - public int doEndTag() throws JspException - { - return EVAL_PAGE; - } // doEndTag - - /** - * Get Product Category Options. - * @param AD_Client_ID client - * @return array of category options - */ - private option[] getCategories (int AD_Client_ID) - { - option[] options = (option[])s_categories.get(Integer.valueOf(AD_Client_ID)); - if (options != null) - return options; - - String sql = "SELECT M_Product_Category_ID, Name " - + "FROM M_Product_Category " - + "WHERE AD_Client_ID=" + AD_Client_ID - + " AND IsActive='Y' AND IsSelfService='Y' " - + "ORDER BY Name"; - KeyNamePair[] pairs = DB.getKeyNamePairs(sql, true); - options = new option[pairs.length]; - // - for (int i = 0; i < pairs.length; i++) - { - if (i == 0) - { - options[i] = new option ("-1"); - options[i].addElement(" "); - } - else - { - options[i] = new option (pairs[i].getID()); - options[i].addElement(Util.maskHTML(pairs[i].getName())); - } - } - // - s_categories.put(Integer.valueOf(AD_Client_ID), options); - return options; - } // getCountries - - /** Client Category Cache */ - static CCache s_categories - = new CCache(I_M_Product_Category.Table_Name, "ProductCategory", 10, 60, true); - -} // ProductCategoryListTag - diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java deleted file mode 100644 index def6b7bb3c..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java +++ /dev/null @@ -1,149 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.util.CLogger; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUtil; - -/** - * Web Product Serach - * - * @author Jorg Janke - * @version $Id: ProductServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="productServlet", - urlPatterns = "/productServlet" -) -public class ProductServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = 3205810155766880833L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - - /** - * Initialize global variables - * @param config servlet configuration - * @throws ServletException - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("ProductServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Product Serach Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.info("destroy"); - } // destroy - - public static String P_SEARCHSTRING = "SearchString"; - public static String P_M_PRODUCT_CATEGORY_ID = "M_Product_Category_ID"; - - - /*************************************************************************/ - - /** - * Process the HTTP Post request. - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - - Properties ctx = JSPEnv.getCtx(request); - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // WEnv.dump(session); - // WEnv.dump(request); - - // Web User - // WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - - // Save in ctx for PriceListTag - - // Search Parameter - String searchString = WebUtil.getParameter (request, P_SEARCHSTRING); - if (searchString != null) - ctx.put(P_SEARCHSTRING, searchString); - // Product Category - String category = WebUtil.getParameter (request, P_M_PRODUCT_CATEGORY_ID); - if (category != null) - ctx.put(P_M_PRODUCT_CATEGORY_ID, category); - - // Forward - String url = "/index.jsp"; - if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); - dispatcher.forward (request, response); - } // doPost - - - - /** - * Process the initial HTTP Get request. - * Reads the Parameter Amt and optional C_Invoice_ID - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - doPost (request, response); - } // doGet - -} // ProductServlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java deleted file mode 100644 index 23fdb789c7..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java +++ /dev/null @@ -1,307 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.compiere.model.MRegistration; -import org.compiere.model.MUser; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.WebEnv; -import org.compiere.util.WebSessionCtx; -import org.compiere.util.WebUser; -import org.compiere.util.WebUtil; - -/** - * Registration Servlet. - * - * @author Jorg Janke - * @version $Id: RegistrationServlet.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -@WebServlet( - name="registrationServlet", - urlPatterns = "/registrationServlet" -) -public class RegistrationServlet extends HttpServlet -{ - /** - * - */ - private static final long serialVersionUID = -6448126312542845680L; - /** Logging */ - private CLogger log = CLogger.getCLogger(getClass()); - /** Name */ - static public final String NAME = "RegistrationServlet"; - - /** - * Initialize global variables - * - * @param config Configuration - * @throws ServletException - */ - public void init(ServletConfig config) - throws ServletException - { - super.init(config); - if (!WebEnv.initWeb(config)) - throw new ServletException("RegistrationServlet.init"); - } // init - - /** - * Get Servlet information - * @return Info - */ - public String getServletInfo() - { - return "Adempiere Web Registration Servlet"; - } // getServletInfo - - /** - * Clean up resources - */ - public void destroy() - { - log.fine(""); - } // destroy - - /*************************************************************************/ - - public static final String P_REGISTRATION_ID = "A_Registration_ID"; - - /** Thanks Msg */ - private String THANKS = "Thank you for your registration!"; - /** Problem Msg */ - private String PROBLEM = "Thank you for your registration - We experienced a problem - please let us know!"; - - /************************************************************************** - * Process the HTTP Get request. - * If not System registration - forward to registration.jsp - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - if (!processSystemRegistration(request, response)) - { - log.info("Forward to registration.jsp"); - if (!response.isCommitted ()) - response.sendRedirect("registration.jsp"); - } - } // doGet - - /** - * Process System Registration - * @param request request - * @param response response - * @return true if System Registration - */ - private boolean processSystemRegistration (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - // System Info - String name = WebUtil.getParameter (request, "Name"); - String userName = WebUtil.getParameter (request, "UserName"); - String password = WebUtil.getParameter (request, "Password"); - // Not a System registration - if ((name == null || name.length() == 0)&& (userName == null || userName.length() == 0) && (password == null || password.length() == 0)) - return false; - if (log.isLoggable(Level.INFO)) log.info ("Name=" + name + ", User=" + userName); - // Registration Info - String description = WebUtil.getParameter (request, "Description"); - boolean inProduction = WebUtil.getParameterAsBoolean(request, "IsInProduction", "Y"); - Timestamp startDate = WebUtil.getParameterAsDate (request, "StartProductionDate"); - if (startDate == null) - startDate = new Timestamp(System.currentTimeMillis()); - boolean allowPublish = WebUtil.getParameterAsBoolean (request, "IsAllowPublish", "Y"); - @SuppressWarnings("unused") - boolean registered = WebUtil.getParameterAsBoolean (request, "IsRegistered", "Y"); - int Record_ID = WebUtil.getParameterAsInt(request, "Record_ID"); - - // Find User - Properties ctx = JSPEnv.getCtx(request); - MUser user = null; - int AD_User_ID = DB.getSQLValue(null, - "SELECT AD_User_ID FROM AD_User WHERE EMail=?", userName); - if (AD_User_ID > 0) - user = MUser.get(ctx, AD_User_ID); - else - log.warning("User Not found=" + userName); - - // Registration - MRegistration reg = null; - if (Record_ID > 0) - { - reg = new MRegistration (ctx, Record_ID, null); - if (reg.get_ID() != Record_ID) - { - log.warning("Registration Not found=" + Record_ID); - reg = null; - } - else if (user != null) - { - if (reg.getC_BPartner_ID() != user.getC_BPartner_ID()) - { - log.warning("Registration for different BP - AD_User_ID=" - + AD_User_ID + "(" + user.getEMail() - + "), BP RegistrationBP=" + reg.getC_BPartner_ID() - + "<>UserBP=" + user.getC_BPartner_ID()); - reg = null; - } - if (!password.equals(user.getPassword())) - { - log.warning("Password does not match - AD_User_ID=" - + AD_User_ID + "(" + user.getEMail() + ")"); - // ?? - } - } - } - if (reg == null) - { - log.fine("New Registration"); - reg = new MRegistration (ctx, name, allowPublish, inProduction, startDate, null); - Record_ID = 0; - } - // Common Update - reg.setDescription(description); - reg.setRemote_Addr(request.getRemoteAddr()); - reg.setRemote_Host(request.getRemoteHost()); - // User - if (user != null) - { - reg.setAD_User_ID(user.getAD_User_ID()); - reg.setC_BPartner_ID(user.getC_BPartner_ID()); - } - if (reg.save()) - { - if (Record_ID == 0) - reg.loadAttributeValues(request); // new - else - reg.updateAttributeValues(request); // existing - sendAnswer (response, THANKS + " Record_ID=" + reg.getA_Registration_ID()); - } - else - { - log.log(Level.SEVERE, "Registration not saved"); - sendAnswer (response, PROBLEM + " Record_ID=0"); - } - return true; - } // processSystemRegistration - - /** - * Send Answer - * @param response response - * @param answer answer - * @throws IOException - */ - private void sendAnswer (HttpServletResponse response, String answer) - throws IOException - { - response.setHeader("Cache-Control", "no-cache"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); // with character encoding support - out.print(answer); - out.flush(); - } // sendAnswer - - /************************************************************************** - * Process the HTTP Post request - * - * @param request request - * @param response response - * @throws ServletException - * @throws IOException - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException - { - if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); - - // Get Session attributes - HttpSession session = request.getSession(true); - session.removeAttribute(WebSessionCtx.HDR_MESSAGE); - // - Properties ctx = JSPEnv.getCtx(request); - WebUser wu = (WebUser)session.getAttribute(WebUser.NAME); - if (wu == null) - { - log.warning("No web user"); - response.sendRedirect("loginServlet?ForwardTo=registration.jsp"); // entry - return; - } - int A_Registration_ID = WebUtil.getParameterAsInt(request, P_REGISTRATION_ID); - MRegistration reg = null; - if (A_Registration_ID > 0) - reg = new MRegistration (ctx, A_Registration_ID, null); - if (reg == null) - { - reg = new MRegistration (ctx, 0, null); - A_Registration_ID = 0; - } - // - String name = WebUtil.getParameter (request, "Name"); - if (name == null || name.length() == 0) - { - WebUtil.createForwardPage(response, "Name is Mandatory", "registrations.jsp", 4); - return; - } - reg.setC_BPartner_ID(wu.getBpartnerID()); - reg.setName(name); - String description = WebUtil.getParameter (request, "Description"); - if (description != null && description.length() > 0) - reg.setDescription(description); - boolean isInProduction = WebUtil.getParameterAsBoolean (request, "IsInProduction"); - reg.setIsInProduction(isInProduction); - Timestamp assetServiceDate = WebUtil.getParameterAsDate (request, "AssetServiceDate"); - if (assetServiceDate == null) - assetServiceDate = new Timestamp(System.currentTimeMillis()); - reg.setAssetServiceDate(assetServiceDate); - boolean isAllowPublish = WebUtil.getParameterAsBoolean (request, "IsAllowPublish"); - reg.setIsAllowPublish(isAllowPublish); - if (reg.save()) - { - if (A_Registration_ID == 0) - reg.loadAttributeValues(request); // new - else - reg.updateAttributeValues(request); // existing - WebUtil.createForwardPage(response, THANKS, "registrations.jsp", 3); - } - else - { - log.log(Level.SEVERE, "Registration not saved"); - WebUtil.createForwardPage(response, PROBLEM, "registrations.jsp", 3); - } - } // doPost - -} // RegistrationSerlet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestOrderRefTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestOrderRefTag.java deleted file mode 100644 index 3828a6c6a5..0000000000 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestOrderRefTag.java +++ /dev/null @@ -1,159 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.wstore; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Properties; -import java.util.logging.Level; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.apache.ecs.xhtml.option; -import org.apache.ecs.xhtml.select; -import org.apache.taglibs.standard.tag.el.core.ExpressionUtil; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.Util; - -/** - * Request Order Reference Tag - *
- *	
- *	
- * - * @author Jorg Janke - * @version $Id: RequestOrderRefTag.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $ - */ -public class RequestOrderRefTag extends TagSupport -{ - /** - * - */ - private static final long serialVersionUID = 3277546457746182498L; - - /** Logger */ - private static CLogger log = CLogger.getCLogger (RequestOrderRefTag.class); - - /** Business Partner Parameter */ - private String m_bpartnerID_el = null; - - /** - * Set B.Partner parameter - * @param bpartnerID_el region info - */ - public void setBpartnerID (String bpartnerID_el) - { - m_bpartnerID_el = bpartnerID_el; - } // setBPartner - - /** - * Start Tag - * @return SKIP_BODY - */ - public int doStartTag() - { - // Parameter - int C_BPartner_ID = 0; - try - { - String info = (String)ExpressionUtil.evalNotNull ("requestOrder", "bpartnerID", - m_bpartnerID_el, String.class, this, pageContext); - if (info != null && info.length () != 0) - C_BPartner_ID = Integer.parseInt (info); - } - catch (Exception e) - { - log.severe ("BPartner - " + e); - } - - JspWriter out = pageContext.getOut(); - select select = getRefOrders(C_BPartner_ID); - select.output(out); - // - return (SKIP_BODY); - } // doStartTag - - /** - * Create Select List - * @param C_BPartner_ID b partner - * @return select list - */ - private select getRefOrders(int C_BPartner_ID) - { - select select = new select(RequestServlet.P_REF_ORDER_ID, getOrders(C_BPartner_ID)); - select.setID("ID_" + RequestServlet.P_REF_ORDER_ID); - return select; - } // getRequestType - - /** - * Get the Request Type options - * @param C_BPartner_ID b partner - * @return array of options - */ - private option[] getOrders(int C_BPartner_ID) - { - @SuppressWarnings("unused") - Properties ctx = JSPEnv.getCtx((HttpServletRequest)pageContext.getRequest()); - ArrayList