Examples of PentahoMetadataFileInfo


Examples of org.pentaho.platform.plugin.services.importexport.PentahoMetadataFileInfo

    return inputStream2;
  }

  private void processLocaleFile( final IPlatformImportBundle bundle, String domainId ) throws PlatformImportException {
    final String fullFilename = RepositoryFilenameUtils.concat( "/", bundle.getName() );
    final PentahoMetadataFileInfo info = new PentahoMetadataFileInfo( fullFilename );

    if ( domainId == null ) {
      // try to resolve domainId from bundle
      domainId = (String) bundle.getProperty( "domain-id" );

    }
    if ( domainId == null ) {
      throw new PlatformImportException( "Bundle missing required domain-id property" );
    }
    try {
      log.debug( "Importing [" + info.getPath() + "] as properties - [domain=" + domainId + " : locale="
          + info.getLocale() + "]" );
      metadataRepositoryImporter.addLocalizationFile( domainId, info.getLocale(), bundle.getInputStream(), true );

    } catch ( Exception e ) {
      final String errorMessage =
          messages.getErrorString( "MetadataImportHandler.ERROR_0002_IMPORTING_LOCALE_FILE", info.getPath(), domainId,
              info.getLocale(), e.getLocalizedMessage() );
      log.error( errorMessage, e );
      throw new PlatformImportException( errorMessage, e );
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.