paypal / butterfly

Application transformation tool
https://paypal.github.io/butterfly/
MIT License
48 stars 50 forks source link

Offer transformation request properties during Definition time #309

Open fabiocarvalho777 opened 5 years ago

fabiocarvalho777 commented 5 years ago

Transformation request properties should be made available to the application, not just during Transformation time (already covered in #167), but in Definition time as well.

Properties should be accessible via the following methods in the TransformationTemplate class:


    /**
     * Return the property value associated with the given property name.
     * Properties are optional and transformation request specific.
     * Null is returned if this property doesn't exist.
     *
     * @param propertyName the property name
     * @return the property value or null, if property doesn't exist
     */
    protected String getProperty(String propertyName) {
        // TODO
        return null;
    }

    /**
     * Return the property value associated with the given property name.
     * Properties are optional and transformation request specific.
     * The specified default value is returned if this property doesn't exist.
     *
     * @param propertyName the property name
     * @return the property value or the default value, if property doesn't exist
     */
    protected String getProperty(String propertyName, String defaultValue) {
        // TODO
        return null;
    }