Class FormalParameterImpl

  • All Implemented Interfaces:
    FormalParameter

    public class FormalParameterImpl
    extends java.lang.Object
    implements FormalParameter
    FormalParameterImpl implements the FormalParameter interface and defines the structure of a single formal parameter.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • name

        protected java.lang.String name
    • Constructor Detail

      • FormalParameterImpl

        public FormalParameterImpl​(java.lang.String name,
                                   int type)
        Constructor of FormalparameterImpl class.
        Parameters:
        name - the name of the FormalParameter object.
        type - the type of the FormalParameter object.
      • FormalParameterImpl

        public FormalParameterImpl​(java.lang.String name,
                                   int type,
                                   FormalParameterAnnotation annotation)
        Since:
        MicroStrategy Web 8.0.0
    • Method Detail

      • checkValue

        public void checkValue​(java.lang.Object value)
                        throws java.lang.IllegalArgumentException
        Verifies that the value correspons to the type of the FormalParameter object.
        Specified by:
        checkValue in interface FormalParameter
        Parameters:
        value - the value wanted to be checked.
        Throws:
        java.lang.IllegalArgumentException - thrown if the default value is null or does not correspond to the data type of the FormalParameter object.
      • getDefaultValue

        public java.lang.Object getDefaultValue()
        Returns the default value of the FormalParameter object.
        Specified by:
        getDefaultValue in interface FormalParameter
        Returns:
        default value of FormalParameter object.
      • getDescription

        public java.lang.String getDescription()
        Returns the textual description of the FormalParameter object
        Specified by:
        getDescription in interface FormalParameter
        Returns:
        description of the FormalParameter object
      • getName

        public java.lang.String getName()
        Returns the name of the FormalParameter object.
        Specified by:
        getName in interface FormalParameter
        Returns:
        name of the FormalParameter object.
      • getType

        public int getType()
        Returns the data type of the FormalParameter object.
        Specified by:
        getType in interface FormalParameter
        Returns:
        data type of FormalParameter object.
      • getValue

        public java.lang.Object getValue()
        Returns the actual value of the FormalParameter object. If the actual value is null, then it will return the default value.
        Specified by:
        getValue in interface FormalParameter
        Returns:
        actual value of FormalParameter object.
      • getValue

        public java.lang.Object getValue​(boolean returnDefault)
        Returns the actual value of the FormalParameter object. If it is null and the parameter is set to True, then it will return the default value.
        Parameters:
        returnDefault - specifies whether it will return the default value in case the actual value is null.
        Returns:
        the actual value or default value of FormalParameter object.
      • isRequired

        public boolean isRequired()
        Returns whether the FormalParameter object is required by the transform.
        Specified by:
        isRequired in interface FormalParameter
        Returns:
        whether the FormalParamber object is required or not.
      • paramTypeToString

        public java.lang.String paramTypeToString​(int paramType)
        Returns the type of the FormalParamber object as string.
        Specified by:
        paramTypeToString in interface FormalParameter
        Parameters:
        paramType - the type of the FormalParameter object.
        Returns:
        string that specifies the type of the FormalParameter object.
      • setDefaultValue

        public void setDefaultValue​(java.lang.Object defaultValue)
                             throws java.lang.IllegalArgumentException
        Sets the default value of the FormalParameter object.
        Parameters:
        defaultValue - the default value of the FormalParameter object.
        Throws:
        java.lang.IllegalArgumentException - thrown if the default value is null or does not correspond to the data type of the FormalParameter object.
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description of the FormalParameter object.
        Parameters:
        description - the description of the FromalParameter object.
      • setValue

        public void setValue​(java.lang.Object value)
                      throws java.lang.IllegalArgumentException
        Sets the actual value of the FormalParameter object.
        Specified by:
        setValue in interface FormalParameter
        Parameters:
        value - the actual value of the FormalParameter ojbect.
        Throws:
        java.lang.IllegalArgumentException - thrown if the actual value is null or does not correspond to the data type of the FormalParameter object.
      • setRequired

        public void setRequired​(boolean required)
        Sets the FormalParameter object as required.
        Parameters:
        required - whether you want to set the FormalParameter as required or not.
      • getStringKey

        public java.lang.String getStringKey()
        Since:
        MicroStrategy Web 8.0.0