• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java BuildVersion类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.di.version.BuildVersion的典型用法代码示例。如果您正苦于以下问题:Java BuildVersion类的具体用法?Java BuildVersion怎么用?Java BuildVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BuildVersion类属于org.pentaho.di.version包,在下文中一共展示了BuildVersion类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: Variables

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public Variables()
{
    properties  = new Hashtable<String,String>();
    parent      = null;
    injection   = null;
    initialized = false;
    
    // The Kettle version
    properties.put(Const.INTERNAL_VARIABLE_KETTLE_VERSION, Const.VERSION);

    // The Kettle build version
    properties.put(Const.INTERNAL_VARIABLE_KETTLE_BUILD_VERSION, BuildVersion.getInstance().getRevision() );

    // The Kettle build date
    properties.put(Const.INTERNAL_VARIABLE_KETTLE_BUILD_DATE, BuildVersion.getInstance().getBuildDate() );
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:Variables.java


示例2: Variables

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public Variables()
{
    properties  = new Hashtable<String,String>();
    parent      = null;
    injection   = null;
    initialized = false;
    
    // The Kettle version
    properties.put(Const.INTERNAL_VARIABLE_KETTLE_VERSION, Const.VERSION);

    // The Kettle build version
    String revision = BuildVersion.getInstance().getRevision();
    if(revision == null) revision = "";
    properties.put(Const.INTERNAL_VARIABLE_KETTLE_BUILD_VERSION, revision);

    // The Kettle build date
    String buildDate = BuildVersion.getInstance().getBuildDate();
    if(buildDate == null) buildDate = "";
    properties.put(Const.INTERNAL_VARIABLE_KETTLE_BUILD_DATE, buildDate);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:21,代码来源:Variables.java


示例3: getKettlePropertiesFileHeader

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public static String getKettlePropertiesFileHeader() {
  StringBuilder out = new StringBuilder();

  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line01", BuildVersion
    .getInstance().getVersion() )
    + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line02" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line03" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line04" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line05" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line06" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line07" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line08" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line09" ) + CR );
  out.append( BaseMessages.getString( PKG, "Props.Kettle.Properties.Sample.Line10" ) + CR );

  return out.toString();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:Const.java


示例4: Variables

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public Variables() {
  properties = new ConcurrentHashMap<>();
  parent = null;
  injection = null;
  initialized = false;

  // The Kettle version
  properties.put( Const.INTERNAL_VARIABLE_KETTLE_VERSION, BuildVersion.getInstance().getVersion() );

  // The Kettle build version
  String revision = BuildVersion.getInstance().getRevision();
  if ( revision == null ) {
    revision = "";
  }
  properties.put( Const.INTERNAL_VARIABLE_KETTLE_BUILD_VERSION, revision );

  // The Kettle build date
  String buildDate = BuildVersion.getInstance().getBuildDate();
  if ( buildDate == null ) {
    buildDate = "";
  }
  properties.put( Const.INTERNAL_VARIABLE_KETTLE_BUILD_DATE, buildDate );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:Variables.java


示例5: helpAbout

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public void helpAbout() {
	MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION | SWT.CENTER);
	String mess = Messages.getString("System.ProductInfo") + Const.VERSION + Const.CR + Const.CR;
	mess += Messages.getString("System.CompanyInfo") + Const.CR;
	mess += Const.CR + "         " + Messages.getString("System.ProductWebsiteUrl") + Const.CR;
	mess += "         Build version : " + BuildVersion.getInstance().getVersion() + Const.CR;
	mess += "         Build date    : " + BuildVersion.getInstance().getBuildDate() + Const.CR;

	mb.setMessage(mess);
	mb.setText(APP_NAME);
	mb.open();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:Spoon.java


示例6: addInternalVariables

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
/**
 * Add a number of internal variables to the Kettle Variables at the root.
 * @param variables
 */
public static void addInternalVariables(Properties prop)
{
    // Add a bunch of internal variables
    
    // The Kettle version
    prop.put(Const.INTERNAL_VARIABLE_KETTLE_VERSION, Const.VERSION);

    // The Kettle build version
    prop.put(Const.INTERNAL_VARIABLE_KETTLE_BUILD_VERSION, BuildVersion.getInstance().getVersion());

    // The Kettle build date
    prop.put(Const.INTERNAL_VARIABLE_KETTLE_BUILD_DATE, BuildVersion.getInstance().getBuildDate() );
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:18,代码来源:EnvUtil.java


示例7: start

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public void start( CommandLineOption[] options ) throws KettleException {

    // Read the start option parameters
    //
    handleStartOptions( options );

    // Enable menus based on whether user was able to login or not
    //
    enableMenus();

    // enable perspective switching
    SpoonPerspectiveManager.getInstance().setForcePerspective( false );

    if ( splash != null ) {
      splash.dispose();
      splash = null;
    }

    // If we are a MILESTONE or RELEASE_CANDIDATE
    if ( !ValueMetaString.convertStringToBoolean( System.getProperty( "KETTLE_HIDE_DEVELOPMENT_VERSION_WARNING", "N" ) )
      && Const.RELEASE.equals( Const.ReleaseType.MILESTONE ) ) {

      // display the same warning message
      MessageBox dialog = new MessageBox( shell, SWT.ICON_WARNING );
      dialog.setText( BaseMessages.getString( PKG, "Spoon.Warning.DevelopmentRelease.Title" ) );
      dialog.setMessage( BaseMessages.getString(
        PKG, "Spoon.Warning.DevelopmentRelease.Message", Const.CR, BuildVersion.getInstance().getVersion() ) );
      dialog.open();
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:Spoon.java


示例8: addInternalVariables

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
/**
 * Add a number of internal variables to the Kettle Variables at the root.
 *
 * @param variables
 */
public static void addInternalVariables( Properties prop ) {
  // Add a bunch of internal variables

  // The Kettle version
  prop.put( Const.INTERNAL_VARIABLE_KETTLE_VERSION, BuildVersion.getInstance().getVersion() );

  // The Kettle build version
  prop.put( Const.INTERNAL_VARIABLE_KETTLE_BUILD_VERSION, BuildVersion.getInstance().getVersion() );

  // The Kettle build date
  prop.put( Const.INTERNAL_VARIABLE_KETTLE_BUILD_DATE, BuildVersion.getInstance().getBuildDate() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:EnvUtil.java


示例9: format

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public String format(LoggingEvent event)
{
    // OK, perhaps the logging information has multiple lines of data.
    // We need to split this up into different lines and all format these lines...
    StringBuffer line=new StringBuffer();
    
    String dateTimeString = "";
    if (timeAdded)
    {
        dateTimeString = ((SimpleDateFormat)LOCAL_SIMPLE_DATE_PARSER.get()).format(new Date(event.timeStamp))+" - ";
    }

    Object object = event.getMessage();
    if (object instanceof Log4jMessage)
    {
        Log4jMessage message = (Log4jMessage)object;

        String parts[] = message.getMessage().split(Const.CR);
        for (int i=0;i<parts.length;i++)
        {
            // Start every line of the output with a dateTimeString
            line.append(dateTimeString);
            
            // Include the subject too on every line...
            if (message.getSubject()!=null)
            {
                line.append(message.getSubject()).append(" - ");
            }
            
            if (message.isError())  
            {
                BuildVersion buildVersion = BuildVersion.getInstance();
                line.append(ERROR_STRING);
                line.append(" (version ");
                line.append(buildVersion.getVersion());
                if (!Const.isEmpty(buildVersion.getRevision())) {
                	line.append(", build ");
                	line.append(buildVersion.getRevision());
                }
                if (!Const.isEmpty(buildVersion.getBuildDate())) {
                 line.append(" from ");
                 line.append( buildVersion.getBuildDate() );
                }
                if (!Const.isEmpty(buildVersion.getBuildUser())) {
                	line.append(" by ");
                	line.append(buildVersion.getBuildUser());
                }
                line.append(") : ");                
             }
            
            line.append(parts[i]);
            if (i<parts.length-1) line.append(Const.CR); // put the CR's back in there!
        }
    }
    else
    {
        line.append(dateTimeString);
        line.append((object!=null?object.toString():"<null>"));
    }
    
    return line.toString();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:63,代码来源:Log4jKettleLayout.java


示例10: helpAbout

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public void helpAbout() {
  MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION | SWT.CENTER);

  //  resolve the release text
  String releaseText = "";
  if (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.PreviewRelease.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
      releaseText = BaseMessages.getString(PKG, "Spoon.Candidate.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.Milestone.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.STABLE)) {
        releaseText = BaseMessages.getString(PKG, "Spoon.Stable.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.GA)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.GA.HelpAboutText");
  }

  //  build a message
  StringBuilder messageBuilder = new StringBuilder();

  messageBuilder.append(BaseMessages.getString(PKG, "System.ProductInfo"));
  messageBuilder.append(releaseText);
  messageBuilder.append(" - ");
  messageBuilder.append(Const.VERSION);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(BaseMessages.getString(PKG, "System.CompanyInfo"));
  messageBuilder.append(Const.CR);
  messageBuilder.append("         ");
  messageBuilder.append(BaseMessages.getString(PKG, "System.ProductWebsiteUrl"));
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append("Build version : ");
  messageBuilder.append(BuildVersion.getInstance().getVersion());
  messageBuilder.append(Const.CR);
  messageBuilder.append("Build date    : ");
  messageBuilder.append(BuildVersion.getInstance().getBuildDate()); //  this should be the longest line of text
  messageBuilder.append("     "); //  so this is the right margin 
  messageBuilder.append(Const.CR);

  //  set the text in the message box
  mb.setMessage(messageBuilder.toString());
  mb.setText(APP_NAME);

  //  now open the message bx
  mb.open();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:51,代码来源:Spoon.java


示例11: format

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public String format(LoggingEvent event) {
  // OK, perhaps the logging information has multiple lines of data.
  // We need to split this up into different lines and all format these
  // lines...
  //
  StringBuffer line = new StringBuffer();

  String dateTimeString = "";
  if (timeAdded) {
    dateTimeString = ((SimpleDateFormat) LOCAL_SIMPLE_DATE_PARSER.get()).format(new Date(event.timeStamp)) + " - ";
  }

  Object object = event.getMessage();
  if (object instanceof LogMessage) {
    LogMessage message = (LogMessage) object;

    String parts[] = message.getMessage().split(Const.CR);
    for (int i = 0; i < parts.length; i++) {
      // Start every line of the output with a dateTimeString
      line.append(dateTimeString);

      // Include the subject too on every line...
      if (message.getSubject() != null) {
        line.append(message.getSubject());
        if (message.getCopy() != null) {
          line.append(".").append(message.getCopy());
        }
        line.append(" - ");
      }

      if (message.isError()) {
        BuildVersion buildVersion = BuildVersion.getInstance();
        line.append(ERROR_STRING);
        line.append(" (version ");
        line.append(buildVersion.getVersion());
        if (!Const.isEmpty(buildVersion.getRevision())) {
          line.append(", build ");
          line.append(buildVersion.getRevision());
        }
        if (!Const.isEmpty(buildVersion.getBuildDate())) {
          line.append(" from ");
          line.append(buildVersion.getBuildDate());
        }
        if (!Const.isEmpty(buildVersion.getBuildUser())) {
          line.append(" by ");
          line.append(buildVersion.getBuildUser());
        }
        line.append(") : ");
      }

      line.append(parts[i]);
      if (i < parts.length - 1)
        line.append(Const.CR); // put the CR's back in there!
    }
  } else {
    line.append(dateTimeString);
    line.append((object != null ? object.toString() : "<null>"));
  }

  return line.toString();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:62,代码来源:Log4jKettleLayout.java


示例12: helpAbout

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public void helpAbout() {
  MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION | SWT.CENTER);

  //  resolve the release text
  String releaseText = "";
  if (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.PreviewRelease.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
      releaseText = BaseMessages.getString(PKG, "Spoon.Candidate.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.Milestone.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.GA)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.GA.HelpAboutText");
  }

  //  build a message
  StringBuilder messageBuilder = new StringBuilder();

  messageBuilder.append(BaseMessages.getString(PKG, "System.ProductInfo"));
  messageBuilder.append(releaseText);
  messageBuilder.append(" - ");
  messageBuilder.append(Const.VERSION);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(BaseMessages.getString(PKG, "System.CompanyInfo", Const.COPYRIGHT_YEAR));
  messageBuilder.append(Const.CR);
  messageBuilder.append("         ");
  messageBuilder.append(BaseMessages.getString(PKG, "System.ProductWebsiteUrl"));
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append("Build version : ");
  messageBuilder.append(BuildVersion.getInstance().getVersion());
  messageBuilder.append(Const.CR);
  messageBuilder.append("Build date    : ");
  messageBuilder.append(BuildVersion.getInstance().getBuildDate()); //  this should be the longest line of text
  messageBuilder.append("     "); //  so this is the right margin 
  messageBuilder.append(Const.CR);

  //  set the text in the message box
  mb.setMessage(messageBuilder.toString());
  mb.setText(APP_NAME);

  //  now open the message bx
  mb.open();
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:49,代码来源:Spoon.java


示例13: helpAbout

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public void helpAbout() {
  MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION | SWT.CENTER | SWT.SHEET);
  

  //  resolve the release text
  String releaseText = "";
  if (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.PreviewRelease.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
      releaseText = BaseMessages.getString(PKG, "Spoon.Candidate.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.Milestone.HelpAboutText");
  } else if (Const.RELEASE.equals(Const.ReleaseType.GA)) {
    releaseText = BaseMessages.getString(PKG, "Spoon.GA.HelpAboutText");
  }

  //  build a message
  StringBuilder messageBuilder = new StringBuilder();

  messageBuilder.append(BaseMessages.getString(PKG, "System.ProductInfo"));
  messageBuilder.append(releaseText);
  messageBuilder.append(" - ");
  messageBuilder.append(Const.VERSION);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(BaseMessages.getString(PKG, "System.CompanyInfo", Const.COPYRIGHT_YEAR));
  messageBuilder.append(Const.CR);
  messageBuilder.append("         ");
  messageBuilder.append(BaseMessages.getString(PKG, "System.ProductWebsiteUrl"));
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append(Const.CR);
  messageBuilder.append("Build version : ");
  messageBuilder.append(BuildVersion.getInstance().getVersion());
  messageBuilder.append(Const.CR);
  messageBuilder.append("Build date    : ");
  messageBuilder.append(BuildVersion.getInstance().getBuildDate()); //  this should be the longest line of text
  messageBuilder.append("     "); //  so this is the right margin 
  messageBuilder.append(Const.CR);

  //  set the text in the message box
  mb.setMessage(messageBuilder.toString());
  mb.setText(APP_NAME);

  //  now open the message bx
  mb.open();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:50,代码来源:Spoon.java


示例14: format

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public String format(LoggingEvent event) {
  // OK, perhaps the logging information has multiple lines of data.
  // We need to split this up into different lines and all format these
  // lines...
  //
  StringBuffer line = new StringBuffer();

  String dateTimeString = "";
  if (timeAdded) {
    dateTimeString = ((SimpleDateFormat) LOCAL_SIMPLE_DATE_PARSER.get()).format(new Date(event.timeStamp)) + " - ";
  }

  Object object = event.getMessage();
  if (object instanceof LogMessage) {
    LogMessage message = (LogMessage) object;

    String parts[] = message.getMessage() == null ? new String[] {} : message.getMessage().split(Const.CR);
    for (int i = 0; i < parts.length; i++) {
      // Start every line of the output with a dateTimeString
      line.append(dateTimeString);

      // Include the subject too on every line...
      if (message.getSubject() != null) {
        line.append(message.getSubject());
        if (message.getCopy() != null) {
          line.append(".").append(message.getCopy());
        }
        line.append(" - ");
      }

      if (i==0 && message.isError()) {
        BuildVersion buildVersion = BuildVersion.getInstance();
        line.append(ERROR_STRING);
        line.append(" (version ");
        line.append(buildVersion.getVersion());
        if (!Const.isEmpty(buildVersion.getRevision())) {
          line.append(", build ");
          line.append(buildVersion.getRevision());
        }
        if (!Const.isEmpty(buildVersion.getBuildDate())) {
          line.append(" from ");
          line.append(buildVersion.getBuildDate());
        }
        if (!Const.isEmpty(buildVersion.getBuildUser())) {
          line.append(" by ");
          line.append(buildVersion.getBuildUser());
        }
        line.append(") : ");
      }

      line.append(parts[i]);
      if (i < parts.length - 1)
        line.append(Const.CR); // put the CR's back in there!
    }
  } else {
    line.append(dateTimeString);
    line.append((object != null ? object.toString() : "<null>"));
  }

  return line.toString();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:62,代码来源:Log4jKettleLayout.java


示例15: generateJarFile

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public static final void generateJarFile( TransMeta transMeta ) {
  log = new LogChannel( "Jar file generator" );
  KettleDependencies deps = new KettleDependencies( transMeta );

  File kar = new File( "kar" );
  if ( kar.exists() ) {
    log.logBasic( "Jar generator", "Removing directory: " + kar.getPath() );
    deleteDirectory( kar );
  }
  kar.mkdir();

  String filename = "kettle-engine-3.0.jar";
  if ( !Utils.isEmpty( transMeta.getFilename() ) ) {
    filename = Const.replace( transMeta.getFilename(), " ", "_" ).toLowerCase() + ".kar";
  }

  File karFile = new File( filename );

  try {
    // The manifest file
    String strManifest = "";
    strManifest += "Manifest-Version: 1.0" + Const.CR;
    strManifest += "Created-By: Kettle version " + BuildVersion.getInstance().getVersion() + Const.CR;
    strManifest += Attributes.Name.MAIN_CLASS.toString() + ": " + ( JarPan.class.getName() ) + Const.CR;

    // Create a new manifest file in the root.
    File manifestFile = new File( kar.getPath() + "/" + "manifest.mf" );
    FileOutputStream fos = new FileOutputStream( manifestFile );
    fos.write( strManifest.getBytes() );
    fos.close();
    log.logBasic( "Jar generator", "Wrote manifest file: " + manifestFile.getPath() );

    // The transformation, also in the kar directory...
    String strTrans = XMLHandler.getXMLHeader( Const.XML_ENCODING ) + transMeta.getXML();
    File transFile = new File( kar.getPath() + "/" + TRANSFORMATION_FILENAME );
    fos = new FileOutputStream( transFile );
    fos.write( strTrans.getBytes( Const.XML_ENCODING ) );
    fos.close();
    log.logBasic( "Jar generator", "Wrote transformation file: " + transFile.getPath() );

    // Execute the jar command...
    executeJarCommand( kar, karFile, new File( "manifest.mf" ), new File( TRANSFORMATION_FILENAME ), deps
      .getLibraryFiles() );
  } catch ( Exception e ) {
    log.logError( JarfileGenerator.class.getName(), "Error zipping files into archive ["
      + karFile.getPath() + "] : " + e.toString() );
    log.logError( JarfileGenerator.class.getName(), Const.getStackTracker( e ) );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:50,代码来源:JarfileGenerator.java


示例16: format

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public String format( KettleLoggingEvent event ) {
  // OK, perhaps the logging information has multiple lines of data.
  // We need to split this up into different lines and all format these
  // lines...
  //
  StringBuilder line = new StringBuilder();

  String dateTimeString = "";
  if ( timeAdded ) {
    dateTimeString = LOCAL_SIMPLE_DATE_PARSER.get().format( new Date( event.timeStamp ) ) + " - ";
  }

  Object object = event.getMessage();
  if ( object instanceof LogMessage ) {
    LogMessage message = (LogMessage) object;

    String[] parts = message.getMessage() == null ? new String[] {} : message.getMessage().split( Const.CR );
    for ( int i = 0; i < parts.length; i++ ) {
      // Start every line of the output with a dateTimeString
      line.append( dateTimeString );

      // Include the subject too on every line...
      if ( message.getSubject() != null ) {
        line.append( message.getSubject() );
        if ( message.getCopy() != null ) {
          line.append( "." ).append( message.getCopy() );
        }
        line.append( " - " );
      }

      if ( i == 0 && message.isError() ) {
        BuildVersion buildVersion = BuildVersion.getInstance();
        line.append( ERROR_STRING );
        line.append( " (version " );
        line.append( buildVersion.getVersion() );
        if ( !Utils.isEmpty( buildVersion.getRevision() ) ) {
          line.append( ", build " );
          line.append( buildVersion.getRevision() );
        }
        if ( !Utils.isEmpty( buildVersion.getBuildDate() ) ) {
          line.append( " from " );
          line.append( buildVersion.getBuildDate() );
        }
        if ( !Utils.isEmpty( buildVersion.getBuildUser() ) ) {
          line.append( " by " );
          line.append( buildVersion.getBuildUser() );
        }
        line.append( ") : " );
      }

      line.append( parts[i] );
      if ( i < parts.length - 1 ) {
        line.append( Const.CR ); // put the CR's back in there!
      }
    }
  } else {
    line.append( dateTimeString );
    line.append( ( object != null ? object.toString() : "<null>" ) );
  }

  return line.toString();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:63,代码来源:KettleLogLayout.java


示例17: getFilename

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public String getFilename() {
  return Const.getKettleDirectory()
    + Const.FILE_SEPARATOR + "db.cache-" + BuildVersion.getInstance().getVersion();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:DBCache.java


示例18: format

import org.pentaho.di.version.BuildVersion; //导入依赖的package包/类
public String format( LoggingEvent event ) {
  // OK, perhaps the logging information has multiple lines of data.
  // We need to split this up into different lines and all format these
  // lines...
  //
  StringBuffer line = new StringBuffer();

  String dateTimeString = "";
  if ( timeAdded ) {
    dateTimeString = LOCAL_SIMPLE_DATE_PARSER.get().format( new Date( event.timeStamp ) ) + " - ";
  }

  Object object = event.getMessage();
  if ( object instanceof LogMessage ) {
    LogMessage message = (LogMessage) object;

    String[] parts = message.getMessage().split( Const.CR );
    for ( int i = 0; i < parts.length; i++ ) {
      // Start every line of the output with a dateTimeString
      line.append( dateTimeString );

      // Include the subject too on every line...
      if ( message.getSubject() != null ) {
        line.append( message.getSubject() );
        if ( message.getCopy() != null ) {
          line.append( "." ).append( message.getCopy() );
        }
        line.append( " - " );
      }

      if ( message.isError() ) {
        BuildVersion buildVersion = BuildVersion.getInstance();
        line.append( ERROR_STRING );
        line.append( " (version " );
        line.append( buildVersion.getVersion() );
        if ( !Utils.isEmpty( buildVersion.getRevision() ) ) {
          line.append( ", build " );
          line.append( buildVersion.getRevision() );
        }
        if ( !Utils.isEmpty( buildVersion.getBuildDate() ) ) {
          line.append( " from " );
          line.append( buildVersion.getBuildDate() );
        }
        if ( !Utils.isEmpty( buildVersion.getBuildUser() ) ) {
          line.append( " by " );
          line.append( buildVersion.getBuildUser() );
        }
        line.append( ") : " );
      }

      line.append( parts[i] );
      if ( i < parts.length - 1 ) {
        line.append( Const.CR ); // put the CR's back in there!
      }
    }
  } else {
    line.append( dateTimeString );
    line.append( ( object != null ? object.toString() : "<null>" ) );
  }

  return line.toString();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:63,代码来源:Log4jKettleLayout.java



注:本文中的org.pentaho.di.version.BuildVersion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SetTopicAttributesRequest类代码示例发布时间:2022-05-22
下一篇:
Java SignatureHelpOptions类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap