Package org.idempiere.webservices
Class AbstractService
java.lang.Object
org.idempiere.webservices.AbstractService
- Direct Known Subclasses:
ModelADServiceImpl
- Author:
- Deepak Pansheriya
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.cxf.jaxrs.ext.MessageContext
protected javax.xml.ws.WebServiceContext
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
authenticate
(String webServiceValue, String methodValue, String serviceTypeValue, CompiereService m_cs) Authenticate user for requested service typeprotected Object
convertToObj
(String strValue, Class<?> columnClass, String colName) protected CompiereService
Get request Ctxstatic List<IWSValidator>
getValidators
(String serviceType) retrieve web service Validatorsprotected Class<?>
getVariableType
(String columnName, int displayType) Retrieve variable data typeprotected MWebServiceType
static String
invokeLoginValidator
(org.idempiere.adInterface.x10.ADLoginRequest loginRequest, Properties ctx, MWebServiceType m_webserviceType, int time) Invoke web Service Login Validatorstatic org.idempiere.adInterface.x10.StandardResponseDocument
invokeWSValidator
(MWebServiceType m_WebServiceType, int time, PO po, org.idempiere.adInterface.x10.DataField[] fields, Trx trx, Map<String, Object> requestCtx, org.idempiere.adInterface.x10.StandardResponse resp, org.idempiere.adInterface.x10.StandardResponseDocument ret) Invoke webservice Validatorprotected String
login
(org.idempiere.adInterface.x10.ADLoginRequest loginRequest, String webService, String method, String serviceType) Login to web Servicesprotected String
parseSQL
(String sql, ArrayList<Object> sqlParas, PO po, POInfo poInfo, Map<String, Object> requestCtx) Parse variables inside SQLprotected Object
Resolving context variable into objectprotected static org.idempiere.adInterface.x10.StandardResponseDocument
rollbackAndSetError
(Trx trx, org.idempiere.adInterface.x10.StandardResponse resp, org.idempiere.adInterface.x10.StandardResponseDocument ret, boolean isError, String string) Rollback and set error on standard responseprotected void
setOuputFields
(org.idempiere.adInterface.x10.StandardResponse resp, MWebServiceType m_webservicetype, PO po, POInfo poInfo)
-
Field Details
-
ROLE_TYPES_WEBSERVICE
- See Also:
-
jaxwsContext
protected javax.xml.ws.WebServiceContext jaxwsContext -
jaxrsContext
@Context protected org.apache.cxf.jaxrs.ext.MessageContext jaxrsContext
-
-
Constructor Details
-
AbstractService
public AbstractService()
-
-
Method Details
-
login
protected String login(org.idempiere.adInterface.x10.ADLoginRequest loginRequest, String webService, String method, String serviceType) Login to web Services- Parameters:
loginRequest
-webService
-method
-serviceType
-- Returns:
-
authenticate
protected String authenticate(String webServiceValue, String methodValue, String serviceTypeValue, CompiereService m_cs) Authenticate user for requested service type- Parameters:
webServiceValue
-methodValue
-serviceTypeValue
-m_cs
-- Returns:
-
rollbackAndSetError
protected static org.idempiere.adInterface.x10.StandardResponseDocument rollbackAndSetError(Trx trx, org.idempiere.adInterface.x10.StandardResponse resp, org.idempiere.adInterface.x10.StandardResponseDocument ret, boolean isError, String string) Rollback and set error on standard response- Parameters:
trx
-resp
-ret
-isError
-string
-- Returns:
-
getCompiereService
- Returns:
- Compiere Service object for current request
-
getWebServiceType
- Returns:
-
getRequestCtx
Get request Ctx- Returns:
-
setOuputFields
protected void setOuputFields(org.idempiere.adInterface.x10.StandardResponse resp, MWebServiceType m_webservicetype, PO po, POInfo poInfo) - Parameters:
resp
-m_webservicetype
-
-
parseSQL
protected String parseSQL(String sql, ArrayList<Object> sqlParas, PO po, POInfo poInfo, Map<String, Object> requestCtx) throws AdempiereExceptionParse variables inside SQL- Parameters:
sql
-sqlParas
-po
-requestCtx
-- Returns:
- Throws:
AdempiereException
-
parseVariable
Resolving context variable into object- Parameters:
varName
-po
-requestCtx
-- Returns:
-
convertToObj
- Parameters:
strValue
-columnClass
-colName
-- Returns:
-
getVariableType
Retrieve variable data type- Parameters:
columnName
-displayType
-- Returns:
-
getValidators
retrieve web service Validators- Parameters:
serviceType
-- Returns:
-
invokeWSValidator
public static org.idempiere.adInterface.x10.StandardResponseDocument invokeWSValidator(MWebServiceType m_WebServiceType, int time, PO po, org.idempiere.adInterface.x10.DataField[] fields, Trx trx, Map<String, Object> requestCtx, org.idempiere.adInterface.x10.StandardResponse resp, org.idempiere.adInterface.x10.StandardResponseDocument ret) Invoke webservice Validator- Parameters:
m_WebServiceType
-time
-po
-fields
-trx
-requestCtx
-resp
-ret
-- Returns:
-
invokeLoginValidator
public static String invokeLoginValidator(org.idempiere.adInterface.x10.ADLoginRequest loginRequest, Properties ctx, MWebServiceType m_webserviceType, int time) Invoke web Service Login Validator- Parameters:
loginRequest
-ctx
-m_webserviceType
-time
-- Returns:
-