Java convert user input to a specific value
<p>I have a method that takes a user's input in this case "%YEAR%" and converts
that input into the current year. The getCopyrightProperty method takes a property
entered by the user and displays its output. Which works fine. But how would
I take if the user input %YEAR% and display the actually year to it along with also
displaying the user output.</p>

<pre><code>private static final String COPYRIGHT_PROPERTY = "copyright-message";
private static final String SHOWYEAR = "" + Calendar.getInstance().get(Calendar.YEAR);

public String getCopyrightProperty(){                
    return (this.properties != null) ? this.properties.get(COPYRIGHT_PROPERTY, "") : null;
}

public String getSubstituteCurrYear(String in){                
    return in.replaceAll("%YEAR%", SHOWYEAR);            
}
</code></pre>

<p>Sample input would be "<strong>%YEAR% input some placeholder text</strong>" and ideally the output should be "<strong>2013 input some placeholder text</strong>"</p>

<p>properties.get is a sling method that gathers user input from a specific property</p>
