Class Field

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Field​(FieldType type, java.lang.String key, java.lang.String label)
      Creates the field instance
      protected Field​(FieldType type, java.lang.String key, java.lang.String label, boolean valueSavable)
      Creates the field instance with the possibility to define whether the setting will be stored in the definition or not.
      protected Field​(java.lang.String type, java.lang.String key, java.lang.String label)
      Creates the field instance
      protected Field​(java.lang.String type, java.lang.String key, java.lang.String label, boolean valueSavable)
      Creates the field instance with the possibility to define whether the setting will be stored in the definition or not.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<FieldCondition> getConditions()
      Returns the fields for the condition
      java.lang.String getKey()
      Returns the key that is stored in the definition
      java.lang.String getLabel()
      Returns the label to be should in front of the component
      java.lang.String getPlaceholder()
      Returns the placeholder text that is displayed if the field is left empty
      java.lang.String getType()
      Returns the type of the field which defines how the field is displayed
      java.lang.String getValue()
      Returns the current value of the field
      boolean isUpdateValuesOnChange()
      Returns whether the whole values of the fields in the current dialog should be updated if the value of the current field changes
      protected boolean isValueSavable()
      Returns whether the value should be stored
      java.lang.String patchResultPlaceholderInValue​(java.lang.String value, java.util.List<JobResultContainer> results)
      Override to replace the placeholders with the values from the results
      java.lang.String patchSeriesPlaceholderInValue​(java.lang.String value, java.util.Map<java.lang.String,​java.lang.String> seriesProperties)
      Override to replace the placeholders with the values from the series
      protected java.lang.String replaceSeriesPlaceholders​(java.lang.String value, java.util.Map<java.lang.String,​java.lang.String> properties)
      Replace placeholders in given string with values in given properties.
      void setConditions​(java.util.List<FieldCondition> conditions)
      Sets the fields for the condition
      void setKey​(java.lang.String key)
      Sets the key that is stored in the definition
      void setLabel​(java.lang.String label)
      Sets the label to be should in front of the component
      void setPlaceholder​(java.lang.String placeholder)
      Sets the placeholder text that is displayed if the field is left empty
      void setType​(FieldType type)
      Sets the type of the field which defines how the field is displayed
      void setType​(java.lang.String type)
      Sets the type of the field which defines how the field is displayed
      void setUpdateValuesOnChange​(boolean updateValuesOnChange)
      Sets whether the whole values of the fields in the current dialog should be updated if the value of the current field changes
      void setValue​(java.lang.String value)
      Sets the current value of the field
      protected void setValueSavable​(boolean valueSavable)
      Sets whether the value should be stored
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Field

        protected Field​(FieldType type,
                        java.lang.String key,
                        java.lang.String label)
        Creates the field instance
        Parameters:
        type - the type of the field
        key - the key that is stored in the definition
        label - the label to be should in front of the component
        Since:
        taskplanner 3.0
      • Field

        protected Field​(java.lang.String type,
                        java.lang.String key,
                        java.lang.String label)
        Creates the field instance
        Parameters:
        type - the type of the field
        key - the key that is stored in the definition
        label - the label to be should in front of the component
        Since:
        taskplanner 3.0
      • Field

        protected Field​(FieldType type,
                        java.lang.String key,
                        java.lang.String label,
                        boolean valueSavable)
        Creates the field instance with the possibility to define whether the setting will be stored in the definition or not.
        Parameters:
        type - the type of the field
        key - the key that is stored in the definition
        label - the label to be should in front of the component
        valueSavable - true if the value should be stored, false otherwise
        Since:
        taskplanner 3.0
      • Field

        protected Field​(java.lang.String type,
                        java.lang.String key,
                        java.lang.String label,
                        boolean valueSavable)
        Creates the field instance with the possibility to define whether the setting will be stored in the definition or not.
        Parameters:
        type - the type of the field
        key - the key that is stored in the definition
        label - the label to be should in front of the component
        valueSavable - true if the value should be stored, false otherwise
        Since:
        taskplanner 3.0
    • Method Detail

      • getConditions

        public java.util.List<FieldCondition> getConditions()
        Returns the fields for the condition
        Returns:
        the fields for the condition
        Since:
        taskplanner 3.0
      • setConditions

        public void setConditions​(java.util.List<FieldCondition> conditions)
        Sets the fields for the condition
        Parameters:
        conditions - the fields for the condition
        Since:
        taskplanner 3.0
      • getType

        public java.lang.String getType()
        Returns the type of the field which defines how the field is displayed
        Returns:
        the type of the field
        Since:
        taskplanner 3.0
      • setType

        public void setType​(FieldType type)
        Sets the type of the field which defines how the field is displayed
        Parameters:
        type - the type of the field
        Since:
        taskplanner 3.0
      • setType

        public void setType​(java.lang.String type)
        Sets the type of the field which defines how the field is displayed
        Parameters:
        type - the type of the field
        Since:
        taskplanner 3.0
      • getKey

        public java.lang.String getKey()
        Returns the key that is stored in the definition
        Returns:
        the key that is stored in the definition
        Since:
        taskplanner 3.0
      • setKey

        public void setKey​(java.lang.String key)
        Sets the key that is stored in the definition
        Parameters:
        key - the key that is stored in the definition
        Since:
        taskplanner 3.0
      • getLabel

        public java.lang.String getLabel()
        Returns the label to be should in front of the component
        Returns:
        the label to be should in front of the component
        Since:
        taskplanner 3.0
      • setLabel

        public void setLabel​(java.lang.String label)
        Sets the label to be should in front of the component
        Parameters:
        label - the label to be should in front of the component
        Since:
        taskplanner 3.0
      • getPlaceholder

        public java.lang.String getPlaceholder()
        Returns the placeholder text that is displayed if the field is left empty
        Returns:
        the placeholder text
        Since:
        taskplanner 3.0
      • setPlaceholder

        public void setPlaceholder​(java.lang.String placeholder)
        Sets the placeholder text that is displayed if the field is left empty
        Parameters:
        placeholder - the placeholder text
        Since:
        taskplanner 3.0
      • getValue

        public java.lang.String getValue()
        Returns the current value of the field
        Returns:
        the current value of the field
        Since:
        taskplanner 3.0
      • setValue

        public void setValue​(java.lang.String value)
        Sets the current value of the field
        Parameters:
        value - the current value of the field
        Since:
        taskplanner 3.0
      • isValueSavable

        protected boolean isValueSavable()
        Returns whether the value should be stored
        Returns:
        true if the value should be stored, false otherwise
        Since:
        taskplanner 3.0
      • setValueSavable

        protected void setValueSavable​(boolean valueSavable)
        Sets whether the value should be stored
        Parameters:
        valueSavable - true if the value should be stored, false otherwise
        Since:
        taskplanner 3.0
      • isUpdateValuesOnChange

        public boolean isUpdateValuesOnChange()
        Returns whether the whole values of the fields in the current dialog should be updated if the value of the current field changes
        Returns:
        true if the values should be updated, false otherwise
        Since:
        taskplanner 3.0
      • setUpdateValuesOnChange

        public void setUpdateValuesOnChange​(boolean updateValuesOnChange)
        Sets whether the whole values of the fields in the current dialog should be updated if the value of the current field changes
        Parameters:
        updateValuesOnChange - true if the values should be updated, false otherwise
        Since:
        taskplanner 3.0
      • patchSeriesPlaceholderInValue

        public java.lang.String patchSeriesPlaceholderInValue​(@Nullable
                                                              java.lang.String value,
                                                              @Nonnull
                                                              java.util.Map<java.lang.String,​java.lang.String> seriesProperties)
        Override to replace the placeholders with the values from the series
        Parameters:
        value - the value to be patched
        seriesProperties - properties from the current series set
        Returns:
        the new value with replaced placeholders
        Since:
        taskplanner 3.0
      • patchResultPlaceholderInValue

        public java.lang.String patchResultPlaceholderInValue​(@Nullable
                                                              java.lang.String value,
                                                              @Nonnull
                                                              java.util.List<JobResultContainer> results)
        Override to replace the placeholders with the values from the results
        Parameters:
        value - the value to be patched
        results - the results that contain the meta properties that are replaced
        Returns:
        the new value with replaced placeholders
        Since:
        taskplanner 3.0
      • replaceSeriesPlaceholders

        protected final java.lang.String replaceSeriesPlaceholders​(java.lang.String value,
                                                                   java.util.Map<java.lang.String,​java.lang.String> properties)
        Replace placeholders in given string with values in given properties. Placeholders of missing values will be removed.
        Parameters:
        value - the value to replace
        properties - the properties with what to replace
        Returns:
        the replaced String.
        Since:
        taskplanner 3.0