Package org.openbravo.base.secureApp
Class HttpSecureAppServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.openbravo.base.HttpBaseServlet
-
- org.openbravo.base.secureApp.HttpSecureAppServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,ConnectionProvider
- Direct Known Subclasses:
About
,Account
,AccountElementValue
,ActionButton_Responser
,ActionButtonJava_Responser
,ApplyModules
,AttributeSetInstance
,AuditTrailPopup
,BaseKernelServlet
,BatchPaymentExecution
,BusinessPartner
,BusinessPartnerMultiple
,CallAcctServer
,CalloutHelper
,CashBankOperations
,ChangeAudit
,CopyFromGLJournal
,CopyFromInvoice
,CopyFromOrder
,CopyFromSettlement
,CreateAccountingReport
,CreateCashFlowStatement
,CreateFrom
,CreateRegFactAcct
,CreateTaxReport
,CreateVatRegisters
,DebtPayment
,DeleteClient
,DisplayHelp
,DisplayJasper
,DocTypeMultiple
,DownloadReport
,DropRegFactAcct
,DynamicJS
,EditCCPMeasureValues
,ErrorConnection
,ExecutePayments
,ExpenseAPInvoice
,ExpenseSOrder
,ExportReferenceData
,GeneralAccountingReports
,GenerateInvoicesmanual
,GenerateShipmentsmanual
,GenericTreeServlet
,Heartbeat
,ImageInfoBLOB
,ImportBankFile
,InitialClientSetup
,InitialOrgSetup
,InsertAcces
,InstanceManagement
,InstancePurpose
,Invoice
,InvoiceLine
,Location
,Locator
,LocatorMultiple
,Logout
,MaterialReceiptPending
,Menu
,MessageJS
,MInOutTraceReports
,ModuleManagement
,PaymentReport
,PoolStatus
,PopupLoading
,Posted
,PriceListCreateAll
,PrintController
,PrinterReports
,PrintJR
,ProcessGoods
,ProcessInvoice
,ProcessPaymentProposal
,ProcessUploadedFile
,Product
,ProductComplete
,ProductMultiple
,Project
,ProjectClose
,ProjectCopyFrom
,ProjectMultiple
,ProjectSetType
,Reconciliation
,ReferencedLink
,ReportAcctRedirectUtility
,ReportAgingBalance
,ReportAnnualCertification
,ReportAssetDepreciationSchedule
,ReportBankJR
,ReportBudgetExportExcel
,ReportBudgetGenerateExcel
,ReportCashflowForecast
,ReportCashJR
,ReportDebtPayment
,ReportDebtPaymentTrack
,ReportExpense
,ReportGeneralLedger
,ReportGeneralLedgerJournal
,ReportGeneralLedgerJournalDetail
,ReportGuaranteeDateJR
,ReportInvoiceCustomerDimensionalAnalysesJR
,ReportInvoiceCustomerJR
,ReportInvoiceDiscountJR
,ReportInvoicesJR
,ReportInvoiceVendorDimensionalAnalysesJR
,ReportInvoiceVendorJR
,ReportMaterialDimensionalAnalysesJR
,ReportMaterialTransactionEditionJR
,ReportNotPosted
,ReportOffer
,ReportOrderNotInvoiceJR
,ReportOrderNotShipped
,ReportParetoProduct
,ReportPendingProductionJr
,ReportProductionCost
,ReportProductionJR
,ReportProductionRunJR
,ReportProductMovement
,ReportProjectBuildingSiteJR
,ReportProjectProfitabilityJR
,ReportProjectProgress
,ReportPurchaseDimensionalAnalysesJR
,ReportReconciliation
,ReportSalesDimensionalAnalyzeJR
,ReportSalesOrderInvoicedJasper
,ReportSalesOrderJR
,ReportSalesOrderProvidedJR
,ReportShipmentDimensionalAnalyzeJR
,ReportShipmentEditionJR
,ReportShipper
,ReportStandardCostJR
,ReportTaxInvoiceJR
,ReportTaxPaymentJR
,ReportTotalProductTemplate
,ReportTrialBalance
,ReportTrialBalanceDetail
,ReportValuationStock
,ReportVatRegisterJR
,ReportWarehouseControl
,ReportWarehousePartnerJR
,ReportWorkRequirementDaily
,ReportWorkRequirementJR
,RequisitionToOrder
,RptC_Bpartner
,RptC_ProposalJr
,RptC_Remittance
,RptM_RefInventoryPrintSeqLabel
,RptM_Requisition
,RptMA_ProcessPlan
,SalesOrder
,SalesOrderLine
,ScheduleProcess
,ShipmentReceipt
,ShipmentReceiptLine
,ShowImage
,ShowSessionPreferences
,ShowSessionVariables
,SL_MInOutTraceReports
,SQLExecutor
,StaticCommunityBranding
,TabAttachments
,TestHeartbeat
,Translation
,UnscheduleProcess
,UpdateMaintenanceScheduled
,UpdateReferenceData
,UsedByLink
,UserSessionSetter
,VerticalMenu
public class HttpSecureAppServlet extends HttpBaseServlet
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
boolHist
protected ClassInfoData
classInfo
-
Fields inherited from class org.openbravo.base.HttpBaseServlet
globalParameters, log4j, myPool, strDefaultServlet, strDireccion, strReplaceWith, strReplaceWithFull, xmlEngine
-
-
Constructor Summary
Constructors Constructor Description HttpSecureAppServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
advise(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTipo, String strTitulo, String strTexto)
protected void
advisePopUp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTitulo, String strTexto)
protected void
advisePopUp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTipo, String strTitulo, String strTexto)
protected void
advisePopUpRefresh(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strType, String strTitle, String strText)
Creates a pop up that when closed, will refresh the parent window.protected void
bdError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strCode, String strLanguage)
protected void
bdErrorAjax(javax.servlet.http.HttpServletResponse response, String strType, String strTitle, String strText)
protected void
bdErrorConnection(javax.servlet.http.HttpServletResponse response)
protected void
bdErrorGeneralPopUp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTitle, String strText)
protected void
bdErrorHidden(javax.servlet.http.HttpServletResponse response, String strType, String strTitle, String strText)
String
getServletInfo()
protected boolean
hasGeneralAccess(VariablesSecureApp vars, String type, String id)
Cheks access passing all the parametersvoid
init(javax.servlet.ServletConfig config)
Loads basic configuration settings that this class and all that extend it require to function properly.protected void
invalidateSession(javax.servlet.http.HttpServletRequest request)
protected boolean
isBackOfficeAccessRequired()
protected void
licenseError(String type, String id, ActivationKey.FeatureRestriction featureRestriction, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, VariablesSecureApp vars, boolean isPopup)
protected void
logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
pageError(javax.servlet.http.HttpServletResponse response)
protected void
pageErrorCallOut(javax.servlet.http.HttpServletResponse response)
protected void
pageErrorPopUp(javax.servlet.http.HttpServletResponse response)
protected void
printPageClosePopUp(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars)
protected void
printPageClosePopUp(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars, String path)
protected void
printPageClosePopUp(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars, String path, String tabTitle)
protected void
printPageClosePopUpAndRefreshParent(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars)
protected void
printPagePopUpDownload(javax.servlet.ServletOutputStream os, String fileName)
protected void
printPagePopUpDownloadAndRefresh(javax.servlet.ServletOutputStream os, String fileName)
protected void
readNumberFormat(VariablesSecureApp vars, String strFormatFile)
protected void
readProperties(VariablesSecureApp vars)
Reads some configuration properties from Openbravo.properties and sets them in sessionprotected void
renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strFileName, String strOutputType, HashMap<String,Object> designParameters, FieldProvider[] data, Map<Object,Object> exportParameters)
protected void
renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strFileName, String strOutputType, HashMap<String,Object> designParameters, FieldProvider[] data, Map<Object,Object> exportParameters, boolean forceRefresh)
protected void
renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strFileName, String strOutputType, HashMap<String,Object> designParameters, ScrollableFieldProvider sfp, Map<Object,Object> exportParameters)
Render a jrxml based report using aScrollableFieldProvider
as its datasource.protected void
renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strOutputType, HashMap<String,Object> designParameters, FieldProvider[] data, Map<Object,Object> exportParameters)
void
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
A dispatcher method that calls the initialization upon every request to the servlet before it hands over the final dispatchment to the HttpServlet base class.protected void
setClassInfo(String type, String id, String module)
Sets information about the artifact the servlet is for.protected void
setHistoryCommand(javax.servlet.http.HttpServletRequest request, String strCommand)
protected void
whitePage(javax.servlet.http.HttpServletResponse response)
protected void
whitePage(javax.servlet.http.HttpServletResponse response, String strAlert)
-
Methods inherited from class org.openbravo.base.HttpBaseServlet
doGet, doGetCall, doPostCall, getBaseDesignPath, getCallableStatement, getCallableStatement, getCallableStatement, getConnection, getPoolStatus, getPreparedStatement, getPreparedStatement, getPreparedStatement, getRDBMS, getStatement, getStatement, getStatement, getStatus, getTransactionConnection, initialize, releaseCallableStatement, releaseCommitConnection, releasePreparedStatement, releaseRollbackConnection, releaseStatement, releaseTransactionalPreparedStatement, releaseTransactionalStatement, serviceInitialized
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openbravo.database.ConnectionProvider
destroy
-
-
-
-
Field Detail
-
boolHist
protected boolean boolHist
-
classInfo
protected ClassInfoData classInfo
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config)
Description copied from class:HttpBaseServlet
Loads basic configuration settings that this class and all that extend it require to function properly. Also instantiates XmlEngine object. This method is called upon load of the class, which is configured to be loaded upon start of the application server. See also web.xml (load-on-startup).- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classHttpBaseServlet
-
setClassInfo
protected void setClassInfo(String type, String id, String module)
Sets information about the artifact the servlet is for. This method is called from generated 2.50 windows to set tab and module, before calling this init, so it is not needed to query database to retrieve this info.
-
service
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
Description copied from class:HttpBaseServlet
A dispatcher method that calls the initialization upon every request to the servlet before it hands over the final dispatchment to the HttpServlet base class.- Overrides:
service
in classHttpBaseServlet
- Parameters:
request
- HttpServletRequest object where details of the HTTP request are.response
- HttpServletResponse object where the response will be written and returned to the user.- Throws:
IOException
javax.servlet.ServletException
-
isBackOfficeAccessRequired
protected boolean isBackOfficeAccessRequired()
- Returns:
- true if the default role to be selected for the service execution needs to have access to the back office or false if a role without access to the back office can be used.
-
hasGeneralAccess
protected boolean hasGeneralAccess(VariablesSecureApp vars, String type, String id)
Cheks access passing all the parameters- Parameters:
vars
-type
- type of elementid
- id for the element- Returns:
- true in case it has access false if not
-
logout
protected void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
invalidateSession
protected void invalidateSession(javax.servlet.http.HttpServletRequest request)
-
setHistoryCommand
protected void setHistoryCommand(javax.servlet.http.HttpServletRequest request, String strCommand)
-
advise
protected void advise(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTipo, String strTitulo, String strTexto) throws IOException
- Throws:
IOException
-
advisePopUp
protected void advisePopUp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTitulo, String strTexto) throws IOException
- Throws:
IOException
-
advisePopUp
protected void advisePopUp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTipo, String strTitulo, String strTexto) throws IOException
- Throws:
IOException
-
advisePopUpRefresh
protected void advisePopUpRefresh(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strType, String strTitle, String strText) throws IOException
Creates a pop up that when closed, will refresh the parent window.- Parameters:
response
- the HttpServletResponse objectstrType
- the type of message to be displayed (e.g. ERROR, SUCCESS)strTitle
- the title of the popup windowstrText
- the text to be displayed in the popup message area- Throws:
IOException
- if an error occurs writing to the output stream
-
bdError
protected void bdError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strCode, String strLanguage) throws IOException
- Throws:
IOException
-
bdErrorGeneralPopUp
protected void bdErrorGeneralPopUp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String strTitle, String strText) throws IOException
- Throws:
IOException
-
bdErrorConnection
protected void bdErrorConnection(javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
bdErrorAjax
protected void bdErrorAjax(javax.servlet.http.HttpServletResponse response, String strType, String strTitle, String strText) throws IOException
- Throws:
IOException
-
bdErrorHidden
protected void bdErrorHidden(javax.servlet.http.HttpServletResponse response, String strType, String strTitle, String strText) throws IOException
- Throws:
IOException
-
pageError
protected void pageError(javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
pageErrorPopUp
protected void pageErrorPopUp(javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
whitePage
protected void whitePage(javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
licenseError
protected void licenseError(String type, String id, ActivationKey.FeatureRestriction featureRestriction, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, VariablesSecureApp vars, boolean isPopup) throws IOException
- Throws:
IOException
-
whitePage
protected void whitePage(javax.servlet.http.HttpServletResponse response, String strAlert) throws IOException
- Throws:
IOException
-
printPageClosePopUp
protected void printPageClosePopUp(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars, String path) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
printPageClosePopUp
protected void printPageClosePopUp(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars, String path, String tabTitle) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
printPageClosePopUp
protected void printPageClosePopUp(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
printPagePopUpDownload
protected void printPagePopUpDownload(javax.servlet.ServletOutputStream os, String fileName) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
printPagePopUpDownloadAndRefresh
protected void printPagePopUpDownloadAndRefresh(javax.servlet.ServletOutputStream os, String fileName) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
printPageClosePopUpAndRefreshParent
protected void printPageClosePopUpAndRefreshParent(javax.servlet.http.HttpServletResponse response, VariablesSecureApp vars) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
pageErrorCallOut
protected void pageErrorCallOut(javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
readProperties
protected void readProperties(VariablesSecureApp vars)
Reads some configuration properties from Openbravo.properties and sets them in session
-
readNumberFormat
protected void readNumberFormat(VariablesSecureApp vars, String strFormatFile)
-
renderJR
protected void renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strOutputType, HashMap<String,Object> designParameters, FieldProvider[] data, Map<Object,Object> exportParameters) throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
-
renderJR
protected void renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strFileName, String strOutputType, HashMap<String,Object> designParameters, FieldProvider[] data, Map<Object,Object> exportParameters) throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
-
renderJR
protected void renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strFileName, String strOutputType, HashMap<String,Object> designParameters, FieldProvider[] data, Map<Object,Object> exportParameters, boolean forceRefresh) throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
-
renderJR
protected void renderJR(VariablesSecureApp variables, javax.servlet.http.HttpServletResponse response, String strReportName, String strFileName, String strOutputType, HashMap<String,Object> designParameters, ScrollableFieldProvider sfp, Map<Object,Object> exportParameters) throws javax.servlet.ServletException
Render a jrxml based report using aScrollableFieldProvider
as its datasource.- Throws:
javax.servlet.ServletException
- See Also:
renderJR(VariablesSecureApp, HttpServletResponse, String, String, String, HashMap, JRDataSource, Map, boolean)
-
getServletInfo
public String getServletInfo()
- Specified by:
getServletInfo
in interfacejavax.servlet.Servlet
- Overrides:
getServletInfo
in classHttpBaseServlet
-
-