it.tidalwave.bluebill.mobile.android.taxonomy.browser.TaxonomyFooterController Maven / Gradle / Ivy
/***********************************************************************************************************************
* To change this template, choose Tools | Templates
* and open the template in the editor.
**********************************************************************************************************************/
package it.tidalwave.bluebill.mobile.android.taxonomy.browser;
import it.tidalwave.bluebill.mobile.taxonomy.TaxonomyPreferences;
import it.tidalwave.netbeans.util.Locator;
import java.util.Locale;
import javax.annotation.Nonnull;
/***********************************************************************************************************************
*
* @author Fabrizio Giudici
* @version $Id: $
*
**********************************************************************************************************************/
public class TaxonomyFooterController
{
private final TaxonomyPreferences taxonomyPreferences = Locator.find(TaxonomyPreferences.class);
@Nonnull
public String getTaxonomyDisplayName()
{
return taxonomyPreferences.getTaxonomy().getDisplayName();
}
@Nonnull
public String getTaxonLanguages()
{
final StringBuilder buffer = new StringBuilder();
String separator = "";
for (final Locale locale : taxonomyPreferences.getTaxonomyLocales())
{
buffer.append(separator).append(locale.toString());
separator = ", ";
}
return buffer.toString();
}
}