Search in sources :

Example 6 with LocaleMapDto

use of org.pentaho.platform.repository2.unified.webservices.LocaleMapDto in project pentaho-platform by pentaho.

the class ZipExportProcessor method getAvailableLocales.

/**
 * lookup the list of available locale values
 *
 * @param fileId
 * @return
 */
private List<LocaleMapDto> getAvailableLocales(Serializable fileId) {
    List<LocaleMapDto> availableLocales = new ArrayList<LocaleMapDto>();
    List<Locale> locales = getUnifiedRepository().getAvailableLocalesForFileById(fileId);
    if (locales != null && !locales.isEmpty()) {
        for (Locale locale : locales) {
            availableLocales.add(new LocaleMapDto(locale.toString(), null));
        }
    }
    return availableLocales;
}
Also used : Locale(java.util.Locale) LocaleMapDto(org.pentaho.platform.api.repository2.unified.webservices.LocaleMapDto) ArrayList(java.util.ArrayList)

Aggregations

LocaleMapDto (org.pentaho.platform.api.repository2.unified.webservices.LocaleMapDto)6 ArrayList (java.util.ArrayList)3 Properties (java.util.Properties)3 FileNotFoundException (java.io.FileNotFoundException)2 IOException (java.io.IOException)2 IllegalSelectorException (java.nio.channels.IllegalSelectorException)2 GeneralSecurityException (java.security.GeneralSecurityException)2 InvalidParameterException (java.security.InvalidParameterException)2 PentahoAccessControlException (org.pentaho.platform.api.engine.PentahoAccessControlException)2 UnifiedRepositoryAccessDeniedException (org.pentaho.platform.api.repository2.unified.UnifiedRepositoryAccessDeniedException)2 RepositoryFileDto (org.pentaho.platform.api.repository2.unified.webservices.RepositoryFileDto)2 StringKeyStringValueDto (org.pentaho.platform.api.repository2.unified.webservices.StringKeyStringValueDto)2 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 Serializable (java.io.Serializable)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Locale (java.util.Locale)1 Map (java.util.Map)1 ZipEntry (java.util.zip.ZipEntry)1 ZipOutputStream (java.util.zip.ZipOutputStream)1