Class ModelService

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map<java.lang.String,​java.lang.Object>

    public class ModelService
    extends java.util.AbstractMap<java.lang.String,​java.lang.Object>
    implements java.io.Serializable
    Generic Service Model Class
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addParam​(ModelParam param)
      Adds a parameter definition to this service; puts on list in order added then sorts by order if specified.
      void addParamClone​(ModelParam param)
      Adds a clone of a parameter definition to this service
      boolean containsPermissions()
      Contains permissions boolean.
      java.lang.String debugInfo()
      Debug info string.
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()  
      void evalNotifications​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context, java.util.Map<java.lang.String,​java.lang.Object> result)
      Evaluates notifications
      java.util.Map<java.lang.String,​java.lang.Object> evalPermission​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Evaluates permission-service for this service.
      java.util.Map<java.lang.String,​java.lang.Object> evalPermissions​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Evaluates permissions for a service.
      java.lang.Object get​(java.lang.Object name)  
      java.lang.String getAction()
      Gets action.
      java.util.Set<java.lang.String> getAllParamNames()
      Gets all param names.
      java.util.Map<java.lang.String,​ModelParam> getContextInfo()
      Gets context info.
      java.util.List<ModelParam> getContextParamList()
      Gets context param list.
      java.lang.String getDefaultEntityName()
      Gets default entity name.
      int getDefinedInCount()
      Gets defined in count.
      int getDefinedOutCount()
      only returns number of defined parameters (not internal)
      java.lang.String getDefinitionLocation()
      Gets definition location.
      java.lang.String getDeprecatedReason()
      Gets deprecated reason.
      java.lang.String getDeprecatedSince()
      Gets deprecated since.
      java.lang.String getDeprecatedUseInstead()
      Gets deprecated use instead.
      java.lang.String getDescription()
      Gets description.
      java.lang.String getEngineName()
      Gets engine name.
      java.lang.String getFromLoader()
      Gets from loader.
      java.util.Set<ModelServiceIface> getImplServices()
      Gets impl services.
      java.util.List<ModelParam> getInModelParamList()
      Returns a list of ModelParam objects in the order they were defined when the service was created.
      java.util.List<java.lang.Object> getInParameterSequence​(java.util.Map<java.lang.String,​? extends java.lang.Object> source)
      Gets a list of required IN parameters in sequence.
      java.util.Set<java.lang.String> getInParamNames()
      Gets in param names.
      java.util.Map<java.lang.String,​java.lang.String> getInParamNamesMap()
      Creates a map of service IN parameters using Name as key and Type as value.
      GroupModel getInternalGroup()
      Gets internal group.
      java.lang.String getInvoke()
      Gets invoke.
      java.lang.String getLocation()
      Gets location.
      int getMaxRetry()
      Gets max retry.
      Metrics getMetrics()
      Gets metrics.
      java.util.List<ModelParam> getModelParamList()
      Returns a list of ModelParam objects in the order they were defined when the service was created.
      ModelPermission getModelPermission()
      Gets model permission.
      java.lang.String getName()
      Gets name.
      java.lang.String getNameSpace()
      Gets name space.
      java.util.List<ModelNotification> getNotifications()
      Gets notifications.
      java.util.Set<java.lang.String> getOutParamNames()
      Gets out param names.
      java.util.Map<java.lang.String,​java.lang.String> getOutParamNamesMap()
      Creates a map of service OUT parameters using Name as key and Type as value.
      java.util.Set<ModelParam> getOverrideParameters()
      Gets override parameters.
      ModelParam getParam​(java.lang.String name)
      Gets the ModelParam by name
      java.util.List<java.lang.String> getParameterNames​(java.lang.String mode, boolean optional)
      Gets parameter names.
      java.util.List<java.lang.String> getParameterNames​(java.lang.String mode, boolean optional, boolean internal)
      Gets the parameter names of the specified mode (IN/OUT/INOUT).
      java.util.List<ModelPermGroup> getPermissionGroups()
      Gets permission groups.
      java.lang.String getSemaphore()
      Gets semaphore.
      int getSemaphoreSleep()
      Gets semaphore sleep.
      int getSemaphoreWait()
      Gets semaphore wait.
      int getTransactionTimeout()
      Gets transaction timeout.
      javax.wsdl.Types getTypes​(org.w3c.dom.Document document, javax.wsdl.Definition def)
      Gets types.
      void getWSDL​(javax.wsdl.Definition def, java.lang.String locationURI)
      Gets wsdl.
      void informIfDeprecated()
      if the service is declare as deprecated, create a log warning with the reason
      boolean inheritedParameters()
      Test if we have already inherited our interface parameters
      void interfaceUpdate​(DispatchContext dctx)
      Run the interface update and inherit all interface parameters
      boolean isAuth()
      Is auth boolean.
      boolean isDebug()
      Is debug boolean.
      boolean isExport()
      Is export boolean.
      boolean isHideResultInLog()
      Is hide result in log boolean.
      boolean isInheritedParameters()
      Is inherited parameters boolean.
      boolean isRequireNewTransaction()
      Is require new transaction boolean.
      boolean isUseTransaction()
      Is use transaction boolean.
      boolean isValid​(java.util.Map<java.lang.String,​java.lang.Object> context, java.util.Locale locale)
      Check a Map against the IN parameter information, uses the validate() method for that Always called with only IN_PARAM, so to be called before the service is called with the passed context
      boolean isValidate()
      Is validate boolean.
      java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source, java.lang.String mode)
      Creates a new Map based from an existing map with just valid parameters.
      java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source, java.lang.String mode, boolean includeInternal, java.util.List<java.lang.Object> errorMessages)
      Creates a new Map based from an existing map with just valid parameters.
      java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source, java.lang.String mode, boolean includeInternal, java.util.List<java.lang.Object> errorMessages, java.util.Locale locale)
      Creates a new Map based from an existing map with just valid parameters.
      java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source, java.lang.String mode, boolean includeInternal, java.util.List<java.lang.Object> errorMessages, java.util.TimeZone timeZone, java.util.Locale locale)
      Creates a new Map based from an existing map with just valid parameters.
      java.lang.Object put​(java.lang.String o1, java.lang.Object o2)  
      void setAction​(java.lang.String action)
      Sets action.
      void setAuth​(boolean auth)
      Sets auth.
      void setContextInfo​(java.util.Map<java.lang.String,​ModelParam> contextInfo)
      Sets context info.
      void setContextParamList​(java.util.List<ModelParam> contextParamList)
      Sets context param list.
      void setDebug​(boolean debug)
      Sets debug.
      void setDefaultEntityName​(java.lang.String defaultEntityName)
      Sets default entity name.
      void setDefinitionLocation​(java.lang.String definitionLocation)
      Sets definition location.
      void setDeprecatedReason​(java.lang.String deprecatedReason)
      Sets deprecated reason.
      void setDeprecatedSince​(java.lang.String deprecatedSince)
      Sets deprecated since.
      void setDeprecatedUseInstead​(java.lang.String deprecatedUseInstead)
      Sets deprecated use instead.
      void setDescription​(java.lang.String description)
      Sets description.
      void setEngineName​(java.lang.String engineName)
      Sets engine name.
      void setExport​(boolean export)
      Sets export.
      void setFromLoader​(java.lang.String fromLoader)
      Sets from loader.
      void setHideResultInLog​(boolean hideResultInLog)
      Sets hide result in log.
      void setImplServices​(java.util.Set<ModelServiceIface> implServices)
      Sets impl services.
      void setInheritedParameters​(boolean inheritedParameters)
      Sets inherited parameters.
      void setInternalGroup​(GroupModel internalGroup)
      Sets internal group.
      void setInvoke​(java.lang.String invoke)
      Sets invoke.
      void setLocation​(java.lang.String location)
      Sets location.
      void setMaxRetry​(int maxRetry)
      Sets max retry.
      void setMetrics​(Metrics metrics)
      Sets metrics.
      void setModelPermission​(ModelPermission modelPermission)
      Sets model permission.
      void setName​(java.lang.String name)
      Sets name.
      void setNameSpace​(java.lang.String nameSpace)
      Sets name space.
      void setNotifications​(java.util.List<ModelNotification> notifications)
      Sets notifications.
      void setOverrideParameters​(java.util.Set<ModelParam> overrideParameters)
      Sets override parameters.
      void setPermissionGroups​(java.util.List<ModelPermGroup> permissionGroups)
      Sets permission groups.
      void setRequireNewTransaction​(boolean requireNewTransaction)
      Sets require new transaction.
      void setSemaphore​(java.lang.String semaphore)
      Sets semaphore.
      void setSemaphoreSleep​(int semaphoreSleep)
      Sets semaphore sleep.
      void setSemaphoreWait​(int semaphoreWait)
      Sets semaphore wait.
      void setTransactionTimeout​(int transactionTimeout)
      Sets transaction timeout.
      void setUseTransaction​(boolean useTransaction)
      Sets use transaction.
      void setValidate​(boolean validate)
      Sets validate.
      java.lang.String toString()  
      org.w3c.dom.Document toWSDL​(java.lang.String locationURI)
      To wsdl document.
      static boolean typeValidate​(org.apache.ofbiz.service.ModelParam.ModelParamValidator vali, java.lang.Object testValue)  
      void updateDefaultValues​(java.util.Map<java.lang.String,​java.lang.Object> context, java.lang.String mode)
      Update default values.
      void validate​(java.util.Map<java.lang.String,​java.lang.Object> context, java.lang.String mode, java.util.Locale locale)
      Validates a Map against the IN or OUT parameter information
      static void validate​(java.util.Map<java.lang.String,​java.lang.String> info, java.util.Map<java.lang.String,​? extends java.lang.Object> test, boolean reverse, ModelService model, java.lang.String mode, java.util.Locale locale)
      Validates a map of name, object types to a map of name, objects
      • Methods inherited from class java.util.AbstractMap

        clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • ModelService

        public ModelService()
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Sets name.
        Parameters:
        name - the name
      • setDefinitionLocation

        public void setDefinitionLocation​(java.lang.String definitionLocation)
        Sets definition location.
        Parameters:
        definitionLocation - the definition location
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets description.
        Parameters:
        description - the description
      • setEngineName

        public void setEngineName​(java.lang.String engineName)
        Sets engine name.
        Parameters:
        engineName - the engine name
      • setNameSpace

        public void setNameSpace​(java.lang.String nameSpace)
        Sets name space.
        Parameters:
        nameSpace - the name space
      • setAction

        public void setAction​(java.lang.String action)
        Sets action.
        Parameters:
        action - the action
      • setLocation

        public void setLocation​(java.lang.String location)
        Sets location.
        Parameters:
        location - the location
      • setInvoke

        public void setInvoke​(java.lang.String invoke)
        Sets invoke.
        Parameters:
        invoke - the invoke
      • setDefaultEntityName

        public void setDefaultEntityName​(java.lang.String defaultEntityName)
        Sets default entity name.
        Parameters:
        defaultEntityName - the default entity name
      • setFromLoader

        public void setFromLoader​(java.lang.String fromLoader)
        Sets from loader.
        Parameters:
        fromLoader - the from loader
      • setAuth

        public void setAuth​(boolean auth)
        Sets auth.
        Parameters:
        auth - the auth
      • setExport

        public void setExport​(boolean export)
        Sets export.
        Parameters:
        export - the export
      • setDebug

        public void setDebug​(boolean debug)
        Sets debug.
        Parameters:
        debug - the debug
      • setValidate

        public void setValidate​(boolean validate)
        Sets validate.
        Parameters:
        validate - the validate
      • setUseTransaction

        public void setUseTransaction​(boolean useTransaction)
        Sets use transaction.
        Parameters:
        useTransaction - the use transaction
      • setRequireNewTransaction

        public void setRequireNewTransaction​(boolean requireNewTransaction)
        Sets require new transaction.
        Parameters:
        requireNewTransaction - the require new transaction
      • setTransactionTimeout

        public void setTransactionTimeout​(int transactionTimeout)
        Sets transaction timeout.
        Parameters:
        transactionTimeout - the transaction timeout
      • setMaxRetry

        public void setMaxRetry​(int maxRetry)
        Sets max retry.
        Parameters:
        maxRetry - the max retry
      • setModelPermission

        public void setModelPermission​(ModelPermission modelPermission)
        Sets model permission.
        Parameters:
        modelPermission - the model permission
      • setSemaphore

        public void setSemaphore​(java.lang.String semaphore)
        Sets semaphore.
        Parameters:
        semaphore - the semaphore
      • setSemaphoreWait

        public void setSemaphoreWait​(int semaphoreWait)
        Sets semaphore wait.
        Parameters:
        semaphoreWait - the semaphore wait
      • setSemaphoreSleep

        public void setSemaphoreSleep​(int semaphoreSleep)
        Sets semaphore sleep.
        Parameters:
        semaphoreSleep - the semaphore sleep
      • setHideResultInLog

        public void setHideResultInLog​(boolean hideResultInLog)
        Sets hide result in log.
        Parameters:
        hideResultInLog - the hide result in log
      • getDefinitionLocation

        public java.lang.String getDefinitionLocation()
        Gets definition location.
        Returns:
        the definition location
      • setImplServices

        public void setImplServices​(java.util.Set<ModelServiceIface> implServices)
        Sets impl services.
        Parameters:
        implServices - the impl services
      • setOverrideParameters

        public void setOverrideParameters​(java.util.Set<ModelParam> overrideParameters)
        Sets override parameters.
        Parameters:
        overrideParameters - the override parameters
      • setPermissionGroups

        public void setPermissionGroups​(java.util.List<ModelPermGroup> permissionGroups)
        Sets permission groups.
        Parameters:
        permissionGroups - the permission groups
      • setNotifications

        public void setNotifications​(java.util.List<ModelNotification> notifications)
        Sets notifications.
        Parameters:
        notifications - the notifications
      • setInternalGroup

        public void setInternalGroup​(GroupModel internalGroup)
        Sets internal group.
        Parameters:
        internalGroup - the internal group
      • setDeprecatedUseInstead

        public void setDeprecatedUseInstead​(java.lang.String deprecatedUseInstead)
        Sets deprecated use instead.
        Parameters:
        deprecatedUseInstead - the deprecated use instead
      • setDeprecatedSince

        public void setDeprecatedSince​(java.lang.String deprecatedSince)
        Sets deprecated since.
        Parameters:
        deprecatedSince - the deprecated since
      • setDeprecatedReason

        public void setDeprecatedReason​(java.lang.String deprecatedReason)
        Sets deprecated reason.
        Parameters:
        deprecatedReason - the deprecated reason
      • setContextInfo

        public void setContextInfo​(java.util.Map<java.lang.String,​ModelParam> contextInfo)
        Sets context info.
        Parameters:
        contextInfo - the context info
      • setContextParamList

        public void setContextParamList​(java.util.List<ModelParam> contextParamList)
        Sets context param list.
        Parameters:
        contextParamList - the context param list
      • setInheritedParameters

        public void setInheritedParameters​(boolean inheritedParameters)
        Sets inherited parameters.
        Parameters:
        inheritedParameters - the inherited parameters
      • setMetrics

        public void setMetrics​(Metrics metrics)
        Sets metrics.
        Parameters:
        metrics - the metrics
      • getDescription

        public java.lang.String getDescription()
        Gets description.
        Returns:
        the description
      • getNameSpace

        public java.lang.String getNameSpace()
        Gets name space.
        Returns:
        the name space
      • getAction

        public java.lang.String getAction()
        Gets action.
        Returns:
        the action
      • getDefaultEntityName

        public java.lang.String getDefaultEntityName()
        Gets default entity name.
        Returns:
        the default entity name
      • getFromLoader

        public java.lang.String getFromLoader()
        Gets from loader.
        Returns:
        the from loader
      • isExport

        public boolean isExport()
        Is export boolean.
        Returns:
        the boolean
      • getSemaphoreWait

        public int getSemaphoreWait()
        Gets semaphore wait.
        Returns:
        the semaphore wait
      • getSemaphoreSleep

        public int getSemaphoreSleep()
        Gets semaphore sleep.
        Returns:
        the semaphore sleep
      • getImplServices

        public java.util.Set<ModelServiceIface> getImplServices()
        Gets impl services.
        Returns:
        the impl services
      • getOverrideParameters

        public java.util.Set<ModelParam> getOverrideParameters()
        Gets override parameters.
        Returns:
        the override parameters
      • getPermissionGroups

        public java.util.List<ModelPermGroup> getPermissionGroups()
        Gets permission groups.
        Returns:
        the permission groups
      • getNotifications

        public java.util.List<ModelNotification> getNotifications()
        Gets notifications.
        Returns:
        the notifications
      • getInternalGroup

        public GroupModel getInternalGroup()
        Gets internal group.
        Returns:
        the internal group
      • getDeprecatedUseInstead

        public java.lang.String getDeprecatedUseInstead()
        Gets deprecated use instead.
        Returns:
        the deprecated use instead
      • getDeprecatedSince

        public java.lang.String getDeprecatedSince()
        Gets deprecated since.
        Returns:
        the deprecated since
      • getDeprecatedReason

        public java.lang.String getDeprecatedReason()
        Gets deprecated reason.
        Returns:
        the deprecated reason
      • getContextInfo

        public java.util.Map<java.lang.String,​ModelParam> getContextInfo()
        Gets context info.
        Returns:
        the context info
      • getContextParamList

        public java.util.List<ModelParam> getContextParamList()
        Gets context param list.
        Returns:
        the context param list
      • isInheritedParameters

        public boolean isInheritedParameters()
        Is inherited parameters boolean.
        Returns:
        the boolean
      • getName

        public java.lang.String getName()
        Gets name.
        Returns:
        the name
      • getInvoke

        public java.lang.String getInvoke()
        Gets invoke.
        Returns:
        the invoke
      • isHideResultInLog

        public boolean isHideResultInLog()
        Is hide result in log boolean.
        Returns:
        the boolean
      • getMetrics

        public Metrics getMetrics()
        Gets metrics.
        Returns:
        the metrics
      • isAuth

        public boolean isAuth()
        Is auth boolean.
        Returns:
        the boolean
      • isValidate

        public boolean isValidate()
        Is validate boolean.
        Returns:
        the boolean
      • getModelPermission

        public ModelPermission getModelPermission()
        Gets model permission.
        Returns:
        the model permission
      • isUseTransaction

        public boolean isUseTransaction()
        Is use transaction boolean.
        Returns:
        the boolean
      • isRequireNewTransaction

        public boolean isRequireNewTransaction()
        Is require new transaction boolean.
        Returns:
        the boolean
      • getTransactionTimeout

        public int getTransactionTimeout()
        Gets transaction timeout.
        Returns:
        the transaction timeout
      • getMaxRetry

        public int getMaxRetry()
        Gets max retry.
        Returns:
        the max retry
      • getEngineName

        public java.lang.String getEngineName()
        Gets engine name.
        Returns:
        the engine name
      • getLocation

        public java.lang.String getLocation()
        Gets location.
        Returns:
        the location
      • isDebug

        public boolean isDebug()
        Is debug boolean.
        Returns:
        the boolean
      • getSemaphore

        public java.lang.String getSemaphore()
        Gets semaphore.
        Returns:
        the semaphore
      • get

        public java.lang.Object get​(java.lang.Object name)
        Specified by:
        get in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        get in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.String,​java.lang.Object>
        Specified by:
        entrySet in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • put

        public java.lang.Object put​(java.lang.String o1,
                                    java.lang.Object o2)
        Specified by:
        put in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        put in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • debugInfo

        public java.lang.String debugInfo()
        Debug info string.
        Returns:
        the string
      • inheritedParameters

        public boolean inheritedParameters()
        Test if we have already inherited our interface parameters
        Returns:
        boolean
      • getParam

        public ModelParam getParam​(java.lang.String name)
        Gets the ModelParam by name
        Parameters:
        name - The name of the parameter to get
        Returns:
        ModelParam object with the specified name
      • addParam

        public void addParam​(ModelParam param)
        Adds a parameter definition to this service; puts on list in order added then sorts by order if specified.
      • addParamClone

        public void addParamClone​(ModelParam param)
        Adds a clone of a parameter definition to this service
      • getAllParamNames

        public java.util.Set<java.lang.String> getAllParamNames()
        Gets all param names.
        Returns:
        the all param names
      • getInParamNames

        public java.util.Set<java.lang.String> getInParamNames()
        Gets in param names.
        Returns:
        the in param names
      • getInParamNamesMap

        public java.util.Map<java.lang.String,​java.lang.String> getInParamNamesMap()
        Creates a map of service IN parameters using Name as key and Type as value. Skips internal parameters
        Returns:
        Map of IN parameters
      • getOutParamNamesMap

        public java.util.Map<java.lang.String,​java.lang.String> getOutParamNamesMap()
        Creates a map of service OUT parameters using Name as key and Type as value. Skips internal parameters
        Returns:
        Map of OUT parameters
      • getDefinedInCount

        public int getDefinedInCount()
        Gets defined in count.
        Returns:
        the defined in count
      • getOutParamNames

        public java.util.Set<java.lang.String> getOutParamNames()
        Gets out param names.
        Returns:
        the out param names
      • getDefinedOutCount

        public int getDefinedOutCount()
        only returns number of defined parameters (not internal)
      • updateDefaultValues

        public void updateDefaultValues​(java.util.Map<java.lang.String,​java.lang.Object> context,
                                        java.lang.String mode)
        Update default values.
        Parameters:
        context - the context
        mode - the mode
      • validate

        public void validate​(java.util.Map<java.lang.String,​java.lang.Object> context,
                             java.lang.String mode,
                             java.util.Locale locale)
                      throws ServiceValidationException
        Validates a Map against the IN or OUT parameter information
        Parameters:
        context - the context
        mode - Test either mode IN or mode OUT
        locale - the actual locale to use
        Throws:
        ServiceValidationException
      • isValid

        public boolean isValid​(java.util.Map<java.lang.String,​java.lang.Object> context,
                               java.util.Locale locale)
        Check a Map against the IN parameter information, uses the validate() method for that Always called with only IN_PARAM, so to be called before the service is called with the passed context
        Parameters:
        context - the passed context
        locale - the actual locale to use
        Returns:
        boolean True is the service called with these IN_PARAM is valid
      • validate

        public static void validate​(java.util.Map<java.lang.String,​java.lang.String> info,
                                    java.util.Map<java.lang.String,​? extends java.lang.Object> test,
                                    boolean reverse,
                                    ModelService model,
                                    java.lang.String mode,
                                    java.util.Locale locale)
                             throws ServiceValidationException
        Validates a map of name, object types to a map of name, objects
        Parameters:
        info - The map of name, object types
        test - The map to test its value types.
        reverse - Test the maps in reverse.
        Throws:
        ServiceValidationException
      • typeValidate

        public static boolean typeValidate​(org.apache.ofbiz.service.ModelParam.ModelParamValidator vali,
                                           java.lang.Object testValue)
                                    throws GeneralException
        Throws:
        GeneralException
      • getParameterNames

        public java.util.List<java.lang.String> getParameterNames​(java.lang.String mode,
                                                                  boolean optional,
                                                                  boolean internal)
        Gets the parameter names of the specified mode (IN/OUT/INOUT). The parameters will be returned in the order specified in the file. Note: IN and OUT will also contains INOUT parameters.
        Parameters:
        mode - The mode (IN/OUT/INOUT)
        optional - True if to include optional parameters
        internal - True to include internal parameters
        Returns:
        List of parameter names
      • getParameterNames

        public java.util.List<java.lang.String> getParameterNames​(java.lang.String mode,
                                                                  boolean optional)
        Gets parameter names.
        Parameters:
        mode - the mode
        optional - the optional
        Returns:
        the parameter names
      • makeValid

        public java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source,
                                                                                java.lang.String mode)
        Creates a new Map based from an existing map with just valid parameters. Tries to convert parameters to required type.
        Parameters:
        source - The source map
        mode - The mode which to build the new map
      • makeValid

        public java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source,
                                                                                java.lang.String mode,
                                                                                boolean includeInternal,
                                                                                java.util.List<java.lang.Object> errorMessages)
        Creates a new Map based from an existing map with just valid parameters. Tries to convert parameters to required type.
        Parameters:
        source - The source map
        mode - The mode which to build the new map
        includeInternal - When false will exclude internal fields
      • makeValid

        public java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source,
                                                                                java.lang.String mode,
                                                                                boolean includeInternal,
                                                                                java.util.List<java.lang.Object> errorMessages,
                                                                                java.util.Locale locale)
        Creates a new Map based from an existing map with just valid parameters. Tries to convert parameters to required type.
        Parameters:
        source - The source map
        mode - The mode which to build the new map
        includeInternal - When false will exclude internal fields
        locale - Locale to use to do some type conversion
      • makeValid

        public java.util.Map<java.lang.String,​java.lang.Object> makeValid​(java.util.Map<java.lang.String,​? extends java.lang.Object> source,
                                                                                java.lang.String mode,
                                                                                boolean includeInternal,
                                                                                java.util.List<java.lang.Object> errorMessages,
                                                                                java.util.TimeZone timeZone,
                                                                                java.util.Locale locale)
        Creates a new Map based from an existing map with just valid parameters. Tries to convert parameters to required type.
        Parameters:
        source - The source map
        mode - The mode which to build the new map
        includeInternal - When false will exclude internal fields
        errorMessages - the list of error messages
        timeZone - TimeZone to use to do some type conversion
        locale - Locale to use to do some type conversion
      • containsPermissions

        public boolean containsPermissions()
        Contains permissions boolean.
        Returns:
        the boolean
      • evalPermission

        public java.util.Map<java.lang.String,​java.lang.Object> evalPermission​(DispatchContext dctx,
                                                                                     java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Evaluates permission-service for this service.
        Parameters:
        dctx - DispatchContext from the invoked service
        context - Map containing userLogin and context information
        Returns:
        result of permission service invocation
      • evalNotifications

        public void evalNotifications​(DispatchContext dctx,
                                      java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                      java.util.Map<java.lang.String,​java.lang.Object> result)
        Evaluates notifications
      • evalPermissions

        public java.util.Map<java.lang.String,​java.lang.Object> evalPermissions​(DispatchContext dctx,
                                                                                      java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Evaluates permissions for a service.
        Parameters:
        dctx - DispatchContext from the invoked service
        context - Map containing userLogin information
        Returns:
        Map if all permissions evaluate return success else return the error message list.
      • getInParameterSequence

        public java.util.List<java.lang.Object> getInParameterSequence​(java.util.Map<java.lang.String,​? extends java.lang.Object> source)
        Gets a list of required IN parameters in sequence.
        Returns:
        A list of required IN parameters in the order which they were defined.
      • getModelParamList

        public java.util.List<ModelParam> getModelParamList()
        Returns a list of ModelParam objects in the order they were defined when the service was created.
      • getInModelParamList

        public java.util.List<ModelParam> getInModelParamList()
        Returns a list of ModelParam objects in the order they were defined when the service was created.
      • informIfDeprecated

        public void informIfDeprecated()
        if the service is declare as deprecated, create a log warning with the reason
      • toWSDL

        public org.w3c.dom.Document toWSDL​(java.lang.String locationURI)
                                    throws javax.wsdl.WSDLException
        To wsdl document.
        Parameters:
        locationURI - the location uri
        Returns:
        the document
        Throws:
        javax.wsdl.WSDLException - the wsdl exception
      • getWSDL

        public void getWSDL​(javax.wsdl.Definition def,
                            java.lang.String locationURI)
                     throws javax.wsdl.WSDLException
        Gets wsdl.
        Parameters:
        def - the def
        locationURI - the location uri
        Throws:
        javax.wsdl.WSDLException - the wsdl exception
      • getTypes

        public javax.wsdl.Types getTypes​(org.w3c.dom.Document document,
                                         javax.wsdl.Definition def)
        Gets types.
        Parameters:
        document - the document
        def - the def
        Returns:
        the types