Class BaseProcessActionHandler
- java.lang.Object
-
- org.openbravo.client.kernel.BaseActionHandler
-
- org.openbravo.client.application.process.BaseProcessActionHandler
-
- All Implemented Interfaces:
ActionHandler
- Direct Known Subclasses:
AddMultiplePaymentsHandler
,AddPaymentActionHandler
,AddProductsToChValue
,AddTransactionActionHandler
,CancelAndReplaceSalesOrder
,ChangeInventoryStatusActionHandler
,CheckConnectivity
,ConfirmCancelAndReplaceSalesOrder
,CopyFromOrdersActionHandler
,CopyProcessPlanVersion
,CostingRuleProcessActionHandler
,CreateInvoiceLinesFromInOutLines
,CreateInvoiceLinesFromOrderLines
,DefaultsProcessActionHandler
,DoubtFulDebtPickEditLines
,FileExportActionHandler
,FixBackdatedTransactionsProcess
,FundsTransferActionHandler
,GrantPortalAccessProcess
,InvoiceFromShipmentActionHandler
,KillProcess
,LCCostMatchFromInvoiceHandler
,LogManagementActionHandler
,ManagePrereservationActionHandler
,ManageReservationActionHandler
,ManageVariants
,MatchStatementActionHandler
,ModifyPaymentPlanActionHandler
,OfferPickAndExecBaseActionHandler
,OrderCreatePOLines
,PaymentProposalPickEditLines
,PriceDifferenceByDateProcess
,ProcessImportEntriesProcessActionHandler
,ReferencedInventoryBoxHandler
,RegisterModuleActionHandler
,RelateProductCatTaxToServiceProduct
,RelateProductCatToServiceProduct
,RelateProductsToServiceProduct
,ReservedGoodMovementActionHandler
,ResetAccountingHandler
,ResetStockValuation
,ResetValuedStockAggregated
,RMInOutPickEditLines
,RMShipmentPickEditLines
,ServiceOrderLineRelate
,ServicesModifyTaxCopyConfiguration
,SetNewBPCurrency
,SRMOPickEditLines
,ValidateUserPasswordActionHandler
public abstract class BaseProcessActionHandler extends BaseActionHandler
- Author:
- iperdomo
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
PARAM_FILE_CONTENT
protected static String
PARAM_FILE_NAME
protected static String
PARAM_FILE_SIZE
protected static String
PARAM_MULTIPART_VALUES
-
Constructor Summary
Constructors Constructor Description BaseProcessActionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract org.codehaus.jettison.json.JSONObject
doExecute(Map<String,Object> parameters, String content)
protected org.codehaus.jettison.json.JSONObject
execute(Map<String,Object> parameters, String content)
Needs to be implemented by a subclass.protected Map<String,Object>
extractParametersFromRequest(javax.servlet.http.HttpServletRequest request)
Overrides the base implementation to support extracting the parameters from a multipart requestprotected String
extractRequestContent(javax.servlet.http.HttpServletRequest request, Map<String,Object> requestParameters)
Overrides the base implementation to support extracting the content object in a multipart request, that is stored in the PARAM_MULTIPART_VALUES parameterprotected Map<String,String>
fixRequestMap(Map<String,Object> parameters)
Deprecated.protected static ResponseActionsBuilder
getResponseBuilder()
static boolean
hasAccess(Process processDefinition, Map<String,Object> parameters)
Permissions to processes can be given in 2 ways:-
Methods inherited from class org.openbravo.client.kernel.BaseActionHandler
execute, fixRequestMap, writeResponse
-
-
-
-
Field Detail
-
PARAM_MULTIPART_VALUES
protected static final String PARAM_MULTIPART_VALUES
- See Also:
- Constant Field Values
-
PARAM_FILE_CONTENT
protected static final String PARAM_FILE_CONTENT
- See Also:
- Constant Field Values
-
PARAM_FILE_NAME
protected static final String PARAM_FILE_NAME
- See Also:
- Constant Field Values
-
PARAM_FILE_SIZE
protected static final String PARAM_FILE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
protected final org.codehaus.jettison.json.JSONObject execute(Map<String,Object> parameters, String content)
Description copied from class:BaseActionHandler
Needs to be implemented by a subclass.- Specified by:
execute
in classBaseActionHandler
- Parameters:
parameters
- the parameters obtained from the request. Note that the request object and the session object are also present in this map, resp. as the constantsKernelConstants.HTTP_REQUEST
andKernelConstants.HTTP_SESSION
.content
- the request content (if any)- Returns:
- the return should be a JSONObject, this is passed back to the caller on the client.
-
extractParametersFromRequest
protected Map<String,Object> extractParametersFromRequest(javax.servlet.http.HttpServletRequest request)
Overrides the base implementation to support extracting the parameters from a multipart request- Overrides:
extractParametersFromRequest
in classBaseActionHandler
- Parameters:
request
- The request- Returns:
- A map with key the name of the parameter and an Object as the value
-
extractRequestContent
protected String extractRequestContent(javax.servlet.http.HttpServletRequest request, Map<String,Object> requestParameters) throws IOException
Overrides the base implementation to support extracting the content object in a multipart request, that is stored in the PARAM_MULTIPART_VALUES parameter- Overrides:
extractRequestContent
in classBaseActionHandler
- Parameters:
request
- The requestrequestParameters
- The map of parameters extracted from the request- Returns:
- The request content as an String
- Throws:
IOException
- when there is an error reading the request InputStream
-
hasAccess
public static boolean hasAccess(Process processDefinition, Map<String,Object> parameters)
Permissions to processes can be given in 2 ways:Explicit grant to process definition access:
- whenever the process is directly executed from menu
- in case the process is marked as "Requires Explicit Access Permission"
- in case there is a "Secured Process" preference for current window
Inherited from window access in case it is invoked from a window button and none of the previous conditions is satisfied.
-
fixRequestMap
@Deprecated protected Map<String,String> fixRequestMap(Map<String,Object> parameters)
Deprecated.The request map is <String, Object> because includes the HTTP request and HTTP session, is not required to handle process parameters
-
getResponseBuilder
protected static ResponseActionsBuilder getResponseBuilder()
-
-