Class AbstractService

java.lang.Object
org.idempiere.webservices.AbstractService
Direct Known Subclasses:
ModelADServiceImpl

public class AbstractService extends Object
Author:
Deepak Pansheriya
  • Field Details

    • ROLE_TYPES_WEBSERVICE

      public static final String 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

      protected CompiereService getCompiereService()
      Returns:
      Compiere Service object for current request
    • getWebServiceType

      protected MWebServiceType getWebServiceType()
      Returns:
    • getRequestCtx

      protected Map<String,Object> 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 AdempiereException
      Parse variables inside SQL
      Parameters:
      sql -
      sqlParas -
      po -
      requestCtx -
      Returns:
      Throws:
      AdempiereException
    • parseVariable

      protected Object parseVariable(String varName, PO po, POInfo poInfo, Map<String,Object> requestCtx)
      Resolving context variable into object
      Parameters:
      varName -
      po -
      requestCtx -
      Returns:
    • convertToObj

      protected Object convertToObj(String strValue, Class<?> columnClass, String colName)
      Parameters:
      strValue -
      columnClass -
      colName -
      Returns:
    • getVariableType

      protected Class<?> getVariableType(String columnName, int displayType)
      Retrieve variable data type
      Parameters:
      columnName -
      displayType -
      Returns:
    • getValidators

      public static List<IWSValidator> getValidators(String serviceType)
      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: