Class ModelParam

  • All Implemented Interfaces:
    java.io.Serializable

    public class ModelParam
    extends java.lang.Object
    implements java.io.Serializable
    Generic Service Model Parameter
    See Also:
    Serialized Form
    • Constructor Detail

      • ModelParam

        public ModelParam()
      • ModelParam

        public ModelParam​(ModelParam param)
    • Method Detail

      • addValidator

        public void addValidator​(java.lang.String className,
                                 java.lang.String methodName,
                                 java.lang.String failMessage)
        Add validator.
        Parameters:
        className - the class name
        methodName - the method name
        failMessage - the fail message
      • addValidator

        public void addValidator​(java.lang.String className,
                                 java.lang.String methodName,
                                 java.lang.String failResource,
                                 java.lang.String failProperty)
        Add validator.
        Parameters:
        className - the class name
        methodName - the method name
        failResource - the fail resource
        failProperty - the fail property
      • getPrimaryFailMessage

        public java.lang.String getPrimaryFailMessage​(java.util.Locale locale)
        Gets primary fail message.
        Parameters:
        locale - the locale
        Returns:
        the primary fail message
      • getShortDisplayDescription

        public java.lang.String getShortDisplayDescription()
        Gets short display description.
        Returns:
        the short display description
      • getName

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

        public void setMode​(java.lang.String mode)
        Sets mode.
        Parameters:
        mode - the mode
      • getValidators

        public java.util.List<org.apache.ofbiz.service.ModelParam.ModelParamValidator> getValidators()
        Gets validators.
        Returns:
        the validators
      • setFormDisplay

        public void setFormDisplay​(boolean formDisplay)
        Sets form display.
        Parameters:
        formDisplay - the form display
      • setDescription

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

        public void setOverrideOptional​(boolean overrideOptional)
        Sets override optional.
        Parameters:
        overrideOptional - the override optional
      • setOverrideFormDisplay

        public void setOverrideFormDisplay​(boolean overrideFormDisplay)
        Sets override form display.
        Parameters:
        overrideFormDisplay - the override form display
      • setValidators

        public void setValidators​(java.util.List<org.apache.ofbiz.service.ModelParam.ModelParamValidator> validators)
        Sets validators.
        Parameters:
        validators - the validators
      • setInternal

        public void setInternal​(boolean internal)
        Sets internal.
        Parameters:
        internal - the internal
      • setRequestAttributeName

        public void setRequestAttributeName​(java.lang.String requestAttributeName)
        Sets request attribute name.
        Parameters:
        requestAttributeName - the request attribute name
      • setSessionAttributeName

        public void setSessionAttributeName​(java.lang.String sessionAttributeName)
        Sets session attribute name.
        Parameters:
        sessionAttributeName - the session attribute name
      • setStringMapPrefix

        public void setStringMapPrefix​(java.lang.String stringMapPrefix)
        Sets string map prefix.
        Parameters:
        stringMapPrefix - the string map prefix
      • setStringListSuffix

        public void setStringListSuffix​(java.lang.String stringListSuffix)
        Sets string list suffix.
        Parameters:
        stringListSuffix - the string list suffix
      • setName

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

        public void setAllowHtml​(java.lang.String allowHtml)
        Sets allow html.
        Parameters:
        allowHtml - the allow html
      • getAllowHtml

        public java.lang.String getAllowHtml()
        Gets allow html.
        Returns:
        the allow html
      • getRequestAttributeName

        public java.lang.String getRequestAttributeName()
        Gets request attribute name.
        Returns:
        the request attribute name
      • getSessionAttributeName

        public java.lang.String getSessionAttributeName()
        Gets session attribute name.
        Returns:
        the session attribute name
      • isOverrideOptional

        public boolean isOverrideOptional()
        Is override optional boolean.
        Returns:
        the boolean
      • isFormDisplay

        public boolean isFormDisplay()
        Is form display boolean.
        Returns:
        the boolean
      • isOverrideFormDisplay

        public boolean isOverrideFormDisplay()
        Is override form display boolean.
        Returns:
        the boolean
      • setType

        public void setType​(java.lang.String type)
        Sets type.
        Parameters:
        type - the type
      • setFormLabel

        public void setFormLabel​(java.lang.String formLabel)
        Sets form label.
        Parameters:
        formLabel - the form label
      • setEntityName

        public void setEntityName​(java.lang.String entityName)
        Sets entity name.
        Parameters:
        entityName - the entity name
      • setFieldName

        public void setFieldName​(java.lang.String fieldName)
        Sets field name.
        Parameters:
        fieldName - the field name
      • isInternal

        public boolean isInternal()
        Is internal boolean.
        Returns:
        the boolean
      • setOptional

        public void setOptional​(boolean optional)
        Sets optional.
        Parameters:
        optional - the optional
      • getStringMapPrefix

        public java.lang.String getStringMapPrefix()
        Gets string map prefix.
        Returns:
        the string map prefix
      • getStringListSuffix

        public java.lang.String getStringListSuffix()
        Gets string list suffix.
        Returns:
        the string list suffix
      • getFormLabel

        public java.lang.String getFormLabel()
        Gets form label.
        Returns:
        the form label
      • getType

        public java.lang.String getType()
        Gets type.
        Returns:
        the type
      • getMode

        public java.lang.String getMode()
        Gets mode.
        Returns:
        the mode
      • getEntityName

        public java.lang.String getEntityName()
        Gets entity name.
        Returns:
        the entity name
      • getFieldName

        public java.lang.String getFieldName()
        Gets field name.
        Returns:
        the field name
      • getInternal

        public boolean getInternal()
        Gets internal.
        Returns:
        the internal
      • isIn

        public boolean isIn()
        Is in boolean.
        Returns:
        the boolean
      • isOut

        public boolean isOut()
        Is out boolean.
        Returns:
        the boolean
      • isOptional

        public boolean isOptional()
        Is optional boolean.
        Returns:
        the boolean
      • getDefaultValue

        public FlexibleStringExpander getDefaultValue()
        Gets default value.
        Returns:
        the default value
      • getDefaultValue

        public java.lang.Object getDefaultValue​(java.util.Map<java.lang.String,​java.lang.Object> context)
        Gets default value.
        Parameters:
        context - the context
        Returns:
        the default value
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
        Sets default value.
        Parameters:
        defaultValue - the default value
      • getChildren

        public java.util.ArrayList<ModelParam> getChildren()
        Returns:
        the children of the attribute
      • copyDefaultValue

        public void copyDefaultValue​(ModelParam param)
        Copy default value.
        Parameters:
        param - the param
      • equals

        public boolean equals​(ModelParam model)
        Equals boolean.
        Parameters:
        model - the model
        Returns:
        the boolean
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getWSDLPart

        public javax.wsdl.Part getWSDLPart​(javax.wsdl.Definition def)
        Gets wsdl part.
        Parameters:
        def - the def
        Returns:
        the wsdl part
      • java2wsdlType

        protected java.lang.String java2wsdlType()
        Java 2 wsdl type string.
        Returns:
        the string