Class LocaleFilesProcessor
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importer.LocaleFilesProcessor
-
public class LocaleFilesProcessor extends Object
this class is used to handle .properties files that are XACTION or URL files that contain the metadata used for localization. These files may contain additional information that will allow the properties file to be stored and used by XACTION and URL as well as localize the title and description.- Author:
- tband /ezequiel / tkafalas
-
-
Constructor Summary
Constructors Constructor Description LocaleFilesProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createLocaleEntry(String filePath, String name, String title, String description, org.pentaho.platform.api.repository2.unified.RepositoryFile file, InputStream is)
boolean
createLocaleEntry(String filePath, String name, String title, String description, org.pentaho.platform.api.repository2.unified.RepositoryFile file, InputStream is, int sourceVersion)
boolean
isLocaleFile(ImportSource.IRepositoryFileBundle file, String parentPath, byte[] bytes)
Properties
loadProperties(InputStream inputStream)
protected void
proceed(IPlatformImporter importer, RepositoryFileImportBundle.Builder bundleBuilder, String mimeType, LocaleFileDescriptor localeFile)
void
processLocaleFiles(IPlatformImporter importer)
-
-
-
Method Detail
-
isLocaleFile
public boolean isLocaleFile(ImportSource.IRepositoryFileBundle file, String parentPath, byte[] bytes) throws IOException
- Parameters:
file
-parentPath
-bytes
-- Returns:
- false - means discard the file extension type
- Throws:
IOException
-
loadProperties
public Properties loadProperties(InputStream inputStream) throws IOException
- Throws:
IOException
-
createLocaleEntry
public boolean createLocaleEntry(String filePath, String name, String title, String description, org.pentaho.platform.api.repository2.unified.RepositoryFile file, InputStream is) throws IOException
- Throws:
IOException
-
createLocaleEntry
public boolean createLocaleEntry(String filePath, String name, String title, String description, org.pentaho.platform.api.repository2.unified.RepositoryFile file, InputStream is, int sourceVersion) throws IOException
- Throws:
IOException
-
processLocaleFiles
public void processLocaleFiles(IPlatformImporter importer) throws PlatformImportException
- Throws:
PlatformImportException
-
proceed
protected void proceed(IPlatformImporter importer, RepositoryFileImportBundle.Builder bundleBuilder, String mimeType, LocaleFileDescriptor localeFile) throws PlatformImportException
- Throws:
PlatformImportException
-
-