target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testToString() throws Exception { LogMessage msg = new LogMessage( "Log message", "Channel 01", LogLevel.DEBUG ); msg.setSubject( "Simple" ); assertEquals( "Simple - Log message", msg.toString( ) ); }
@Override @Deprecated public String toString() { if ( message == null ) { return subject; } if ( arguments != null && arguments.length > 0 ) { return subject + " - " + MessageFormat.format( message, arguments ); } else { return subject + " - " + message; } }
LogMessage implements LogMessageInterface { @Override @Deprecated public String toString() { if ( message == null ) { return subject; } if ( arguments != null && arguments.length > 0 ) { return subject + " - " + MessageFormat.format( message, arguments ); } else { return subject + " - " + message; } } }
LogMessage implements LogMessageInterface { @Override @Deprecated public String toString() { if ( message == null ) { return subject; } if ( arguments != null && arguments.length > 0 ) { return subject + " - " + MessageFormat.format( message, arguments ); } else { return subject + " - " + message; } } LogMessage( Strin...
LogMessage implements LogMessageInterface { @Override @Deprecated public String toString() { if ( message == null ) { return subject; } if ( arguments != null && arguments.length > 0 ) { return subject + " - " + MessageFormat.format( message, arguments ); } else { return subject + " - " + message; } } LogMessage( Strin...
LogMessage implements LogMessageInterface { @Override @Deprecated public String toString() { if ( message == null ) { return subject; } if ( arguments != null && arguments.length > 0 ) { return subject + " - " + MessageFormat.format( message, arguments ); } else { return subject + " - " + message; } } LogMessage( Strin...
@Test public void testFormat() throws Exception { LogMessage mcg = new LogMessage( "Log message for {0}", "Channel 01", new String[]{ "Test" }, LogLevel.DEBUG ); mcg.setSubject( "Subject" ); KettleLoggingEvent event = new KettleLoggingEvent( mcg, 0, LogLevel.BASIC ); KettleLogLayout layout = new KettleLogLayout(); fina...
public String format( KettleLoggingEvent event ) { 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 ) { LogMessag...
KettleLogLayout { public String format( KettleLoggingEvent event ) { 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 LogMes...
KettleLogLayout { public String format( KettleLoggingEvent event ) { 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 LogMes...
KettleLogLayout { public String format( KettleLoggingEvent event ) { 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 LogMes...
KettleLogLayout { public String format( KettleLoggingEvent event ) { 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 LogMes...
@Test public void testEquals() throws Exception { LoggingObjectInterface parent = new LoggingObject( new SimpleLoggingObject( "parent", LoggingObjectType.JOB, null ) ); LoggingObject loggingObject1 = new LoggingObject( "test" ); loggingObject1.setFilename( "fileName" ); loggingObject1.setParent( parent ); loggingObject...
@Override public boolean equals( Object obj ) { if ( !( obj instanceof LoggingObject ) ) { return false; } if ( obj == this ) { return true; } try { LoggingObject loggingObject = (LoggingObject) obj; boolean sameCarteFamily = ( getContainerObjectId() == null && loggingObject.getContainerObjectId() == null ) || ( getCon...
LoggingObject implements LoggingObjectInterface { @Override public boolean equals( Object obj ) { if ( !( obj instanceof LoggingObject ) ) { return false; } if ( obj == this ) { return true; } try { LoggingObject loggingObject = (LoggingObject) obj; boolean sameCarteFamily = ( getContainerObjectId() == null && loggingO...
LoggingObject implements LoggingObjectInterface { @Override public boolean equals( Object obj ) { if ( !( obj instanceof LoggingObject ) ) { return false; } if ( obj == this ) { return true; } try { LoggingObject loggingObject = (LoggingObject) obj; boolean sameCarteFamily = ( getContainerObjectId() == null && loggingO...
LoggingObject implements LoggingObjectInterface { @Override public boolean equals( Object obj ) { if ( !( obj instanceof LoggingObject ) ) { return false; } if ( obj == this ) { return true; } try { LoggingObject loggingObject = (LoggingObject) obj; boolean sameCarteFamily = ( getContainerObjectId() == null && loggingO...
LoggingObject implements LoggingObjectInterface { @Override public boolean equals( Object obj ) { if ( !( obj instanceof LoggingObject ) ) { return false; } if ( obj == this ) { return true; } try { LoggingObject loggingObject = (LoggingObject) obj; boolean sameCarteFamily = ( getContainerObjectId() == null && loggingO...
@Test( timeout = 2000 ) public void testConcurrencySnap() throws Exception { ExecutorService service = Executors.newFixedThreadPool( threadCount ); for ( int i = 0; i < threadCount; i++ ) { service.submit( new ConcurrentPutIfAbsent( logIds.get( i % 20 ) ) ); } countDownLatch.countDown(); service.shutdown(); while ( !se...
public Map<String, Queue<MetricsSnapshotInterface>> getSnapshotLists() { return snapshotLists; }
MetricsRegistry { public Map<String, Queue<MetricsSnapshotInterface>> getSnapshotLists() { return snapshotLists; } }
MetricsRegistry { public Map<String, Queue<MetricsSnapshotInterface>> getSnapshotLists() { return snapshotLists; } private MetricsRegistry(); }
MetricsRegistry { public Map<String, Queue<MetricsSnapshotInterface>> getSnapshotLists() { return snapshotLists; } private MetricsRegistry(); static MetricsRegistry getInstance(); void addSnapshot( LogChannelInterface logChannel, MetricsSnapshotInterface snapshot ); Map<String, Queue<MetricsSnapshotInterface>> getSnap...
MetricsRegistry { public Map<String, Queue<MetricsSnapshotInterface>> getSnapshotLists() { return snapshotLists; } private MetricsRegistry(); static MetricsRegistry getInstance(); void addSnapshot( LogChannelInterface logChannel, MetricsSnapshotInterface snapshot ); Map<String, Queue<MetricsSnapshotInterface>> getSnap...
@Test public void testInitJNDI() throws Exception { final String factoryInitialKey = "java.naming.factory.initial"; final String factoryInitialBak = System.getProperty( factoryInitialKey ); final String sjRootKey = "org.osjava.sj.root"; final String sjRootBak = System.getProperty( sjRootKey ); final String sjDelimiterK...
public static void initJNDI() throws KettleException { String path = Const.JNDI_DIRECTORY; if ( path == null || path.equals( "" ) ) { try { File file = new File( "simple-jndi" ); path = file.getCanonicalPath(); } catch ( Exception e ) { throw new KettleException( "Error initializing JNDI", e ); } Const.JNDI_DIRECTORY =...
JndiUtil { public static void initJNDI() throws KettleException { String path = Const.JNDI_DIRECTORY; if ( path == null || path.equals( "" ) ) { try { File file = new File( "simple-jndi" ); path = file.getCanonicalPath(); } catch ( Exception e ) { throw new KettleException( "Error initializing JNDI", e ); } Const.JNDI_...
JndiUtil { public static void initJNDI() throws KettleException { String path = Const.JNDI_DIRECTORY; if ( path == null || path.equals( "" ) ) { try { File file = new File( "simple-jndi" ); path = file.getCanonicalPath(); } catch ( Exception e ) { throw new KettleException( "Error initializing JNDI", e ); } Const.JNDI_...
JndiUtil { public static void initJNDI() throws KettleException { String path = Const.JNDI_DIRECTORY; if ( path == null || path.equals( "" ) ) { try { File file = new File( "simple-jndi" ); path = file.getCanonicalPath(); } catch ( Exception e ) { throw new KettleException( "Error initializing JNDI", e ); } Const.JNDI_...
JndiUtil { public static void initJNDI() throws KettleException { String path = Const.JNDI_DIRECTORY; if ( path == null || path.equals( "" ) ) { try { File file = new File( "simple-jndi" ); path = file.getCanonicalPath(); } catch ( Exception e ) { throw new KettleException( "Error initializing JNDI", e ); } Const.JNDI_...
@Test public void testStringConversion() throws Exception { row = new RowMetaAndData( rowsMeta, "text", null, null ); assertEquals( "text", row.getAsJavaType( "str", String.class, converter ) ); row = new RowMetaAndData( rowsMeta, "7", null, null ); assertEquals( 7, row.getAsJavaType( "str", int.class, converter ) ); a...
public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMetaInterface metaType = rowMeta.getValue...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
@Test public void testBooleanConversion() throws Exception { row = new RowMetaAndData( rowsMeta, null, true, null ); assertEquals( true, row.getAsJavaType( "bool", boolean.class, converter ) ); assertEquals( true, row.getAsJavaType( "bool", Boolean.class, converter ) ); assertEquals( 1, row.getAsJavaType( "bool", int.c...
public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMetaInterface metaType = rowMeta.getValue...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
@Test public void testOperationHasHandlerFalseOp() throws KettleException { addHandlers( operationMessageEvent, messageEventHandler, messageEventHandler2 ); assertFalse( messageEventService.hasHandlers( otherOpMessageEvent ) ); }
public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); }
MessageEventService { public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); } }
MessageEventService { public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); } MessageEventService(); }
MessageEventService { public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); } MessageEventService(); void fireEvent( final Message event ); final void addHandler( final Message eventType, final MessageEventHandler handler ); final boolean hasHandlers( final Message eventT...
MessageEventService { public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); } MessageEventService(); void fireEvent( final Message event ); final void addHandler( final Message eventType, final MessageEventHandler handler ); final boolean hasHandlers( final Message eventT...
@Test public void testIntegerConversion() throws Exception { row = new RowMetaAndData( rowsMeta, null, null, 7L ); assertEquals( true, row.getAsJavaType( "int", boolean.class, converter ) ); assertEquals( true, row.getAsJavaType( "int", Boolean.class, converter ) ); assertEquals( 7, row.getAsJavaType( "int", int.class,...
public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMetaInterface metaType = rowMeta.getValue...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
RowMetaAndData implements Cloneable { public Object getAsJavaType( String valueName, Class<?> destinationType, InjectionTypeConverter converter ) throws KettleValueException { int idx = rowMeta.indexOfValue( valueName ); if ( idx < 0 ) { throw new KettleValueException( "Unknown column '" + valueName + "'" ); } ValueMet...
@Test public void addExtensionPointTest() throws KettlePluginException { ExtensionPointMap.getInstance().addExtensionPoint( pluginInterface ); assertEquals( ExtensionPointMap.getInstance().getTableValue( TEST_NAME, "testID" ), extensionPoint ); assertEquals( ExtensionPointMap.getInstance().getTableValue( TEST_NAME, "te...
public void addExtensionPoint( PluginInterface extensionPointPlugin ) { lock.writeLock().lock(); try { for ( String id : extensionPointPlugin.getIds() ) { extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) ); } } finally { lock.writeLock().unlock(); } }
ExtensionPointMap { public void addExtensionPoint( PluginInterface extensionPointPlugin ) { lock.writeLock().lock(); try { for ( String id : extensionPointPlugin.getIds() ) { extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) ); } } finally { lock.writeLock().unloc...
ExtensionPointMap { public void addExtensionPoint( PluginInterface extensionPointPlugin ) { lock.writeLock().lock(); try { for ( String id : extensionPointPlugin.getIds() ) { extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) ); } } finally { lock.writeLock().unloc...
ExtensionPointMap { public void addExtensionPoint( PluginInterface extensionPointPlugin ) { lock.writeLock().lock(); try { for ( String id : extensionPointPlugin.getIds() ) { extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) ); } } finally { lock.writeLock().unloc...
ExtensionPointMap { public void addExtensionPoint( PluginInterface extensionPointPlugin ) { lock.writeLock().lock(); try { for ( String id : extensionPointPlugin.getIds() ) { extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) ); } } finally { lock.writeLock().unloc...
@Test public void callExtensionPointTest() throws Exception { PluginMockInterface pluginInterface = mock( PluginMockInterface.class ); when( pluginInterface.getName() ).thenReturn( TEST_NAME ); when( pluginInterface.getMainType() ).thenReturn( (Class) ExtensionPointInterface.class ); when( pluginInterface.getIds() ).th...
public static void callExtensionPoint( final LogChannelInterface log, final String id, final Object object ) throws KettleException { ExtensionPointMap.getInstance().callExtensionPoint( log, id, object ); }
ExtensionPointHandler { public static void callExtensionPoint( final LogChannelInterface log, final String id, final Object object ) throws KettleException { ExtensionPointMap.getInstance().callExtensionPoint( log, id, object ); } }
ExtensionPointHandler { public static void callExtensionPoint( final LogChannelInterface log, final String id, final Object object ) throws KettleException { ExtensionPointMap.getInstance().callExtensionPoint( log, id, object ); } }
ExtensionPointHandler { public static void callExtensionPoint( final LogChannelInterface log, final String id, final Object object ) throws KettleException { ExtensionPointMap.getInstance().callExtensionPoint( log, id, object ); } static void callExtensionPoint( final LogChannelInterface log, final String id, final Ob...
ExtensionPointHandler { public static void callExtensionPoint( final LogChannelInterface log, final String id, final Object object ) throws KettleException { ExtensionPointMap.getInstance().callExtensionPoint( log, id, object ); } static void callExtensionPoint( final LogChannelInterface log, final String id, final Ob...
@Test public void testEncryptPassword() throws KettleValueException { String encryption; encryption = Encr.encryptPassword( null ); assertTrue( "".equals( encryption ) ); encryption = Encr.encryptPassword( "" ); assertTrue( "".equals( encryption ) ); encryption = Encr.encryptPassword( " " ); assertTrue( "2be98afc86aa7f...
public static final String encryptPassword( String password ) { return encoder.encode( password, false ); }
Encr { public static final String encryptPassword( String password ) { return encoder.encode( password, false ); } }
Encr { public static final String encryptPassword( String password ) { return encoder.encode( password, false ); } Encr(); }
Encr { public static final String encryptPassword( String password ) { return encoder.encode( password, false ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static final String getS...
Encr { public static final String encryptPassword( String password ) { return encoder.encode( password, false ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static final String getS...
@Test public void testDecryptPassword() throws KettleValueException { String encryption; String decryption; encryption = Encr.encryptPassword( null ); decryption = Encr.decryptPassword( encryption ); assertTrue( "".equals( decryption ) ); encryption = Encr.encryptPassword( "" ); decryption = Encr.decryptPassword( encry...
public static final String decryptPassword( String encrypted ) { return encoder.decode( encrypted ); }
Encr { public static final String decryptPassword( String encrypted ) { return encoder.decode( encrypted ); } }
Encr { public static final String decryptPassword( String encrypted ) { return encoder.decode( encrypted ); } Encr(); }
Encr { public static final String decryptPassword( String encrypted ) { return encoder.decode( encrypted ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static final String getSignat...
Encr { public static final String decryptPassword( String encrypted ) { return encoder.decode( encrypted ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static final String getSignat...
@Test public void testEncryptPasswordIfNotUsingVariables() throws KettleValueException { String encryption; encryption = Encr.encryptPasswordIfNotUsingVariables( null ); assertTrue( "Encrypted ".equals( encryption ) ); encryption = Encr.encryptPasswordIfNotUsingVariables( "" ); assertTrue( "Encrypted ".equals( encrypti...
public static final String encryptPasswordIfNotUsingVariables( String password ) { return encoder.encode( password, true ); }
Encr { public static final String encryptPasswordIfNotUsingVariables( String password ) { return encoder.encode( password, true ); } }
Encr { public static final String encryptPasswordIfNotUsingVariables( String password ) { return encoder.encode( password, true ); } Encr(); }
Encr { public static final String encryptPasswordIfNotUsingVariables( String password ) { return encoder.encode( password, true ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static...
Encr { public static final String encryptPasswordIfNotUsingVariables( String password ) { return encoder.encode( password, true ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static...
@Test public void testRandomSessionKeyGeneration() throws Exception { Key key = CertificateGenEncryptUtil.generateSingleKey(); Key key1 = CertificateGenEncryptUtil.generateSingleKey(); assertFalse( key.equals( key1 ) ); assertFalse( Arrays.equals( key.getEncoded(), key1.getEncoded() ) ); }
public static Key generateSingleKey() throws NoSuchAlgorithmException { Key key = KeyGenerator.getInstance( SINGLE_KEY_ALGORITHM ).generateKey(); return key; }
CertificateGenEncryptUtil { public static Key generateSingleKey() throws NoSuchAlgorithmException { Key key = KeyGenerator.getInstance( SINGLE_KEY_ALGORITHM ).generateKey(); return key; } }
CertificateGenEncryptUtil { public static Key generateSingleKey() throws NoSuchAlgorithmException { Key key = KeyGenerator.getInstance( SINGLE_KEY_ALGORITHM ).generateKey(); return key; } }
CertificateGenEncryptUtil { public static Key generateSingleKey() throws NoSuchAlgorithmException { Key key = KeyGenerator.getInstance( SINGLE_KEY_ALGORITHM ).generateKey(); return key; } static KeyPair generateKeyPair(); static Key generateSingleKey(); static byte[] encodeKeyForTransmission( Key encodingKey, Key keyT...
CertificateGenEncryptUtil { public static Key generateSingleKey() throws NoSuchAlgorithmException { Key key = KeyGenerator.getInstance( SINGLE_KEY_ALGORITHM ).generateKey(); return key; } static KeyPair generateKeyPair(); static Key generateSingleKey(); static byte[] encodeKeyForTransmission( Key encodingKey, Key keyT...
@Test public void testEncode1() throws KettleValueException { KettleTwoWayPasswordEncoder encoder = new KettleTwoWayPasswordEncoder(); String encryption; encryption = encoder.encode( null, false ); assertTrue( "".equals( encryption ) ); encryption = encoder.encode( "", false ); assertTrue( "".equals( encryption ) ); en...
@Override public String encode( String rawPassword ) { return encode( rawPassword, true ); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassword, boolean i...
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassword, boolean i...
@Test public void testEncode2() throws KettleValueException { KettleTwoWayPasswordEncoder encoder = new KettleTwoWayPasswordEncoder(); String encryption; encryption = encoder.encode( null ); assertTrue( "Encrypted ".equals( encryption ) ); encryption = encoder.encode( "" ); assertTrue( "Encrypted ".equals( encryption )...
@Override public String encode( String rawPassword ) { return encode( rawPassword, true ); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassword, boolean i...
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassword, boolean i...
@Test public void testPutRow() throws Exception { rowSet.putRow( new RowMeta(), row ); assertSame( row, rowSet.getRow() ); }
@Override public boolean putRow( RowMetaInterface rowMeta, Object[] rowData ) { this.rowMeta = rowMeta; buffer.add( rowData ); return true; }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRow( RowMetaInterface rowMeta, Object[] rowData ) { this.rowMeta = rowMeta; buffer.add( rowData ); return true; } }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRow( RowMetaInterface rowMeta, Object[] rowData ) { this.rowMeta = rowMeta; buffer.add( rowData ); return true; } QueueRowSet(); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRow( RowMetaInterface rowMeta, Object[] rowData ) { this.rowMeta = rowMeta; buffer.add( rowData ); return true; } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRow...
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRow( RowMetaInterface rowMeta, Object[] rowData ) { this.rowMeta = rowMeta; buffer.add( rowData ); return true; } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRow...
@Test( expected = HandlerRegistrationException.class ) public void testMsgEventTypeNull() throws KettleException { messageEventService.addHandler( null, messageEventHandler ); }
public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + " eventType: " + event...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
@Test public void testPutRowWait() throws Exception { rowSet.putRowWait( new RowMeta(), row, 1, TimeUnit.SECONDS ); assertSame( row, rowSet.getRowWait( 1, TimeUnit.SECONDS ) ); }
@Override public boolean putRowWait( RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu ) { return putRow( rowMeta, rowData ); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRowWait( RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu ) { return putRow( rowMeta, rowData ); } }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRowWait( RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu ) { return putRow( rowMeta, rowData ); } QueueRowSet(); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRowWait( RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu ) { return putRow( rowMeta, rowData ); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] get...
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRowWait( RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu ) { return putRow( rowMeta, rowData ); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] get...
@Test public void testGetRowImmediate() throws Exception { rowSet.putRow( new RowMeta(), row ); assertSame( row, rowSet.getRowImmediate() ); }
@Override public Object[] getRowImmediate() { return getRow(); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public Object[] getRowImmediate() { return getRow(); } }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public Object[] getRowImmediate() { return getRow(); } QueueRowSet(); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public Object[] getRowImmediate() { return getRow(); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRowWait( long timeout, TimeUnit tu ); @Override boolean putRow( RowMetaInterface...
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public Object[] getRowImmediate() { return getRow(); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRowWait( long timeout, TimeUnit tu ); @Override boolean putRow( RowMetaInterface...
@Test public void testSize() throws Exception { assertEquals( 0, rowSet.size() ); rowSet.putRow( new RowMeta(), row ); assertEquals( 1, rowSet.size() ); rowSet.putRow( new RowMeta(), row ); assertEquals( 2, rowSet.size() ); rowSet.clear(); assertEquals( 0, rowSet.size() ); }
@Override public int size() { return buffer.size(); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public int size() { return buffer.size(); } }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public int size() { return buffer.size(); } QueueRowSet(); }
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public int size() { return buffer.size(); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRowWait( long timeout, TimeUnit tu ); @Override boolean putRow( RowMetaInterface rowMeta, O...
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public int size() { return buffer.size(); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRowWait( long timeout, TimeUnit tu ); @Override boolean putRow( RowMetaInterface rowMeta, O...
@Test public void testGetValueMetaList() { List<ValueMetaInterface> list = rowMeta.getValueMetaList(); assertTrue( list.contains( string ) ); assertTrue( list.contains( integer ) ); assertTrue( list.contains( date ) ); }
@Override public List<ValueMetaInterface> getValueMetaList() { List<ValueMetaInterface> copy; lock.readLock().lock(); try { copy = new ArrayList<ValueMetaInterface>( valueMetaList ); } finally { lock.readLock().unlock(); } return Collections.unmodifiableList( copy ); }
RowMeta implements RowMetaInterface { @Override public List<ValueMetaInterface> getValueMetaList() { List<ValueMetaInterface> copy; lock.readLock().lock(); try { copy = new ArrayList<ValueMetaInterface>( valueMetaList ); } finally { lock.readLock().unlock(); } return Collections.unmodifiableList( copy ); } }
RowMeta implements RowMetaInterface { @Override public List<ValueMetaInterface> getValueMetaList() { List<ValueMetaInterface> copy; lock.readLock().lock(); try { copy = new ArrayList<ValueMetaInterface>( valueMetaList ); } finally { lock.readLock().unlock(); } return Collections.unmodifiableList( copy ); } RowMeta(); p...
RowMeta implements RowMetaInterface { @Override public List<ValueMetaInterface> getValueMetaList() { List<ValueMetaInterface> copy; lock.readLock().lock(); try { copy = new ArrayList<ValueMetaInterface>( valueMetaList ); } finally { lock.readLock().unlock(); } return Collections.unmodifiableList( copy ); } RowMeta(); p...
RowMeta implements RowMetaInterface { @Override public List<ValueMetaInterface> getValueMetaList() { List<ValueMetaInterface> copy; lock.readLock().lock(); try { copy = new ArrayList<ValueMetaInterface>( valueMetaList ); } finally { lock.readLock().unlock(); } return Collections.unmodifiableList( copy ); } RowMeta(); p...
@Test public void testSetValueMetaList() throws KettlePluginException { List<ValueMetaInterface> setList = this.generateVList( new String[]{ "alpha", "bravo" }, new int[]{ 2, 2 } ); rowMeta.setValueMetaList( setList ); assertTrue( setList.contains( rowMeta.searchValueMeta( "alpha" ) ) ); assertTrue( setList.contains( r...
@Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList.get( i ); cache.storeMapping( valueMet...
RowMeta implements RowMetaInterface { @Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList....
RowMeta implements RowMetaInterface { @Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList....
RowMeta implements RowMetaInterface { @Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList....
RowMeta implements RowMetaInterface { @Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList....
@Test public void testExists() { assertTrue( rowMeta.exists( string ) ); assertTrue( rowMeta.exists( date ) ); assertTrue( rowMeta.exists( integer ) ); }
@Override public boolean exists( ValueMetaInterface meta ) { return ( meta != null ) && searchValueMeta( meta.getName() ) != null; }
RowMeta implements RowMetaInterface { @Override public boolean exists( ValueMetaInterface meta ) { return ( meta != null ) && searchValueMeta( meta.getName() ) != null; } }
RowMeta implements RowMetaInterface { @Override public boolean exists( ValueMetaInterface meta ) { return ( meta != null ) && searchValueMeta( meta.getName() ) != null; } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCac...
RowMeta implements RowMetaInterface { @Override public boolean exists( ValueMetaInterface meta ) { return ( meta != null ) && searchValueMeta( meta.getName() ) != null; } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCac...
RowMeta implements RowMetaInterface { @Override public boolean exists( ValueMetaInterface meta ) { return ( meta != null ) && searchValueMeta( meta.getName() ) != null; } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCac...
@Test public void testGetValueMeta() { assertTrue( rowMeta.getValueMeta( 1 ).equals( integer ) ); }
@Override public ValueMetaInterface getValueMeta( int index ) { lock.readLock().lock(); try { if ( ( index >= 0 ) && ( index < valueMetaList.size() ) ) { return valueMetaList.get( index ); } else { return null; } } finally { lock.readLock().unlock(); } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface getValueMeta( int index ) { lock.readLock().lock(); try { if ( ( index >= 0 ) && ( index < valueMetaList.size() ) ) { return valueMetaList.get( index ); } else { return null; } } finally { lock.readLock().unlock(); } } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface getValueMeta( int index ) { lock.readLock().lock(); try { if ( ( index >= 0 ) && ( index < valueMetaList.size() ) ) { return valueMetaList.get( index ); } else { return null; } } finally { lock.readLock().unlock(); } } RowMeta(); private RowMeta...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface getValueMeta( int index ) { lock.readLock().lock(); try { if ( ( index >= 0 ) && ( index < valueMetaList.size() ) ) { return valueMetaList.get( index ); } else { return null; } } finally { lock.readLock().unlock(); } } RowMeta(); private RowMeta...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface getValueMeta( int index ) { lock.readLock().lock(); try { if ( ( index >= 0 ) && ( index < valueMetaList.size() ) ) { return valueMetaList.get( index ); } else { return null; } } finally { lock.readLock().unlock(); } } RowMeta(); private RowMeta...
@Test public void testSetValueMeta() throws KettlePluginException { rowMeta.setValueMeta( 1, charly ); assertEquals( 1, rowMeta.getValueMetaList().indexOf( charly ) ); assertEquals( "There is still 3 elements:", 3, rowMeta.size() ); assertEquals( -1, rowMeta.indexOfValue( "integer" ) ); }
@Override public void setValueMeta( int index, ValueMetaInterface valueMeta ) { if ( valueMeta != null ) { lock.writeLock().lock(); try { ValueMetaInterface old = valueMetaList.get( index ); ValueMetaInterface newMeta = valueMeta; int existsIndex = indexOfValue( valueMeta.getName() ); if ( existsIndex >= 0 && existsInd...
RowMeta implements RowMetaInterface { @Override public void setValueMeta( int index, ValueMetaInterface valueMeta ) { if ( valueMeta != null ) { lock.writeLock().lock(); try { ValueMetaInterface old = valueMetaList.get( index ); ValueMetaInterface newMeta = valueMeta; int existsIndex = indexOfValue( valueMeta.getName()...
RowMeta implements RowMetaInterface { @Override public void setValueMeta( int index, ValueMetaInterface valueMeta ) { if ( valueMeta != null ) { lock.writeLock().lock(); try { ValueMetaInterface old = valueMetaList.get( index ); ValueMetaInterface newMeta = valueMeta; int existsIndex = indexOfValue( valueMeta.getName()...
RowMeta implements RowMetaInterface { @Override public void setValueMeta( int index, ValueMetaInterface valueMeta ) { if ( valueMeta != null ) { lock.writeLock().lock(); try { ValueMetaInterface old = valueMetaList.get( index ); ValueMetaInterface newMeta = valueMeta; int existsIndex = indexOfValue( valueMeta.getName()...
RowMeta implements RowMetaInterface { @Override public void setValueMeta( int index, ValueMetaInterface valueMeta ) { if ( valueMeta != null ) { lock.writeLock().lock(); try { ValueMetaInterface old = valueMetaList.get( index ); ValueMetaInterface newMeta = valueMeta; int existsIndex = indexOfValue( valueMeta.getName()...
@Test public void testIndexOfValue() { List<ValueMetaInterface> list = rowMeta.getValueMetaList(); assertEquals( 0, list.indexOf( string ) ); assertEquals( 1, list.indexOf( integer ) ); assertEquals( 2, list.indexOf( date ) ); }
@Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName.equalsIgnoreCase( valueMetaList.get( ...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
@Test public void testIndexOfNullValue() { assertEquals( -1, rowMeta.indexOfValue( null ) ); }
@Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName.equalsIgnoreCase( valueMetaList.get( ...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
RowMeta implements RowMetaInterface { @Override public int indexOfValue( String valueName ) { if ( valueName == null ) { return -1; } lock.readLock().lock(); try { Integer index = cache.findAndCompare( valueName, valueMetaList ); for ( int i = 0; ( index == null ) && ( i < valueMetaList.size() ); i++ ) { if ( valueName...
@Test( expected = HandlerRegistrationException.class ) public void testMsgHandlerNull() throws KettleException { messageEventService.addHandler( operationMessageEvent, null ); }
public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + " eventType: " + event...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
@Test public void testSearchValueMeta() { ValueMetaInterface vmi = rowMeta.searchValueMeta( "integer" ); assertEquals( integer, vmi ); vmi = rowMeta.searchValueMeta( "string" ); assertEquals( string, vmi ); vmi = rowMeta.searchValueMeta( "date" ); assertEquals( date, vmi ); }
@Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
@Test public void testAddRowMeta() throws KettlePluginException { List<ValueMetaInterface> list = this.generateVList( new String[]{ "alfa", "bravo", "charly", "delta" }, new int[]{ 2, 2, 3, 4 } ); RowMeta added = new RowMeta(); added.setValueMetaList( list ); rowMeta.addRowMeta( added ); assertEquals( 7, rowMeta.getVal...
@Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } }
RowMeta implements RowMetaInterface { @Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } } }
RowMeta implements RowMetaInterface { @Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, R...
RowMeta implements RowMetaInterface { @Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, R...
RowMeta implements RowMetaInterface { @Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, R...
@Test public void testMergeRowMeta() throws KettlePluginException { List<ValueMetaInterface> list = this.generateVList( new String[]{ "phobos", "demos", "mars" }, new int[]{ 6, 6, 6 } ); list.add( 1, integer ); RowMeta toMerge = new RowMeta(); toMerge.setValueMetaList( list ); rowMeta.mergeRowMeta( toMerge ); assertEqu...
@Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); }
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } }
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCache ); RowMeta( DataInputStream inputStream ); ...
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCache ); RowMeta( DataInputStream inputStream ); ...
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCache ); RowMeta( DataInputStream inputStream ); ...
@Test public void testLowerCaseNamesSearch() { assertNotNull( rowMeta.searchValueMeta( "Integer" ) ); assertNotNull( rowMeta.searchValueMeta( "string".toUpperCase() ) ); }
@Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
@Test public void testExternalValueMetaModification() { ValueMetaInterface vmi = rowMeta.searchValueMeta( "string" ); vmi.setName( "string2" ); assertNotNull( rowMeta.searchValueMeta( vmi.getName() ) ); }
@Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } }
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface searchValueMeta( String valueName ) { lock.readLock().lock(); try { Integer index = indexOfValue( valueName ); if ( index < 0 ) { return null; } return valueMetaList.get( index ); } finally { lock.readLock().unlock(); } } RowMeta(); private RowM...
@Test public void testGetFieldNames() { rowMeta.clear(); fillRowMeta(); String[] names = rowMeta.getFieldNames(); assertEquals( 10, names.length ); assertEquals( "sample", names[0] ); for ( int i = 1; i < names.length; i++ ) { assertEquals( "", names[i] ); } }
@Override public String[] getFieldNames() { lock.readLock().lock(); try { String[] retval = new String[ size() ]; for ( int i = 0; i < size(); i++ ) { String valueName = getValueMeta( i ).getName(); retval[i] = valueName == null ? "" : valueName; } return retval; } finally { lock.readLock().unlock(); } }
RowMeta implements RowMetaInterface { @Override public String[] getFieldNames() { lock.readLock().lock(); try { String[] retval = new String[ size() ]; for ( int i = 0; i < size(); i++ ) { String valueName = getValueMeta( i ).getName(); retval[i] = valueName == null ? "" : valueName; } return retval; } finally { lock.r...
RowMeta implements RowMetaInterface { @Override public String[] getFieldNames() { lock.readLock().lock(); try { String[] retval = new String[ size() ]; for ( int i = 0; i < size(); i++ ) { String valueName = getValueMeta( i ).getName(); retval[i] = valueName == null ? "" : valueName; } return retval; } finally { lock.r...
RowMeta implements RowMetaInterface { @Override public String[] getFieldNames() { lock.readLock().lock(); try { String[] retval = new String[ size() ]; for ( int i = 0; i < size(); i++ ) { String valueName = getValueMeta( i ).getName(); retval[i] = valueName == null ? "" : valueName; } return retval; } finally { lock.r...
RowMeta implements RowMetaInterface { @Override public String[] getFieldNames() { lock.readLock().lock(); try { String[] retval = new String[ size() ]; for ( int i = 0; i < size(); i++ ) { String valueName = getValueMeta( i ).getName(); retval[i] = valueName == null ? "" : valueName; } return retval; } finally { lock.r...
@Test public void testSetPreparedStatementValue() throws Exception { ValueMetaTimestamp vm = new ValueMetaTimestamp(); PreparedStatement ps = mock( PreparedStatement.class ); doAnswer( new Answer<Object>() { @Override public Object answer( InvocationOnMock invocationOnMock ) throws Throwable { Object ts = invocationOnM...
@Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { if ( data != null ) { preparedStatement.setTimestamp( index, getTimestamp( data ) ); } else { preparedStatement.setNull( index, java.sql.Types....
ValueMetaTimestamp extends ValueMetaDate { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { if ( data != null ) { preparedStatement.setTimestamp( index, getTimestamp( data ) ); } else { prepar...
ValueMetaTimestamp extends ValueMetaDate { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { if ( data != null ) { preparedStatement.setTimestamp( index, getTimestamp( data ) ); } else { prepar...
ValueMetaTimestamp extends ValueMetaDate { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { if ( data != null ) { preparedStatement.setTimestamp( index, getTimestamp( data ) ); } else { prepar...
ValueMetaTimestamp extends ValueMetaDate { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { if ( data != null ) { preparedStatement.setTimestamp( index, getTimestamp( data ) ); } else { prepar...
@Test public void testCompare() throws Exception { ValueMetaTimestamp vm = new ValueMetaTimestamp(); Timestamp earlier = Timestamp.valueOf( "2012-12-12 12:12:12.121212" ); Timestamp later = Timestamp.valueOf( "2013-12-12 12:12:12.121212" ); assertTrue( vm.isSortedAscending() ); assertFalse( vm.isSortedDescending() ); a...
public int compare( Object data1, Object data2 ) throws KettleValueException { Timestamp timestamp1 = getTimestamp( data1 ); Timestamp timestamp2 = getTimestamp( data2 ); int cmp = 0; if ( timestamp1 == null ) { if ( timestamp2 == null ) { cmp = 0; } else { cmp = -1; } } else if ( timestamp2 == null ) { cmp = 1; } else...
ValueMetaTimestamp extends ValueMetaDate { public int compare( Object data1, Object data2 ) throws KettleValueException { Timestamp timestamp1 = getTimestamp( data1 ); Timestamp timestamp2 = getTimestamp( data2 ); int cmp = 0; if ( timestamp1 == null ) { if ( timestamp2 == null ) { cmp = 0; } else { cmp = -1; } } else ...
ValueMetaTimestamp extends ValueMetaDate { public int compare( Object data1, Object data2 ) throws KettleValueException { Timestamp timestamp1 = getTimestamp( data1 ); Timestamp timestamp2 = getTimestamp( data2 ); int cmp = 0; if ( timestamp1 == null ) { if ( timestamp2 == null ) { cmp = 0; } else { cmp = -1; } } else ...
ValueMetaTimestamp extends ValueMetaDate { public int compare( Object data1, Object data2 ) throws KettleValueException { Timestamp timestamp1 = getTimestamp( data1 ); Timestamp timestamp2 = getTimestamp( data2 ); int cmp = 0; if ( timestamp1 == null ) { if ( timestamp2 == null ) { cmp = 0; } else { cmp = -1; } } else ...
ValueMetaTimestamp extends ValueMetaDate { public int compare( Object data1, Object data2 ) throws KettleValueException { Timestamp timestamp1 = getTimestamp( data1 ); Timestamp timestamp2 = getTimestamp( data2 ); int cmp = 0; if ( timestamp1 == null ) { if ( timestamp2 == null ) { cmp = 0; } else { cmp = -1; } } else ...
@Test public void testConvertStringToTimestamp() throws Exception { ValueMetaTimestamp valueMetaTimestamp = new ValueMetaTimestamp(); assertEquals( Timestamp.valueOf( "2012-04-05 04:03:02.123456" ), valueMetaTimestamp .convertStringToTimestamp( "2012/4/5 04:03:02.123456" ) ); assertEquals( Timestamp.valueOf( "2012-04-0...
protected synchronized Timestamp convertStringToTimestamp( String string ) throws KettleValueException { string = Const.trimToType( string, getTrimType() ); if ( Utils.isEmpty( string ) ) { return null; } Timestamp returnValue; try { returnValue = Timestamp.valueOf( string ); } catch ( IllegalArgumentException e ) { tr...
ValueMetaTimestamp extends ValueMetaDate { protected synchronized Timestamp convertStringToTimestamp( String string ) throws KettleValueException { string = Const.trimToType( string, getTrimType() ); if ( Utils.isEmpty( string ) ) { return null; } Timestamp returnValue; try { returnValue = Timestamp.valueOf( string ); ...
ValueMetaTimestamp extends ValueMetaDate { protected synchronized Timestamp convertStringToTimestamp( String string ) throws KettleValueException { string = Const.trimToType( string, getTrimType() ); if ( Utils.isEmpty( string ) ) { return null; } Timestamp returnValue; try { returnValue = Timestamp.valueOf( string ); ...
ValueMetaTimestamp extends ValueMetaDate { protected synchronized Timestamp convertStringToTimestamp( String string ) throws KettleValueException { string = Const.trimToType( string, getTrimType() ); if ( Utils.isEmpty( string ) ) { return null; } Timestamp returnValue; try { returnValue = Timestamp.valueOf( string ); ...
ValueMetaTimestamp extends ValueMetaDate { protected synchronized Timestamp convertStringToTimestamp( String string ) throws KettleValueException { string = Const.trimToType( string, getTrimType() ); if ( Utils.isEmpty( string ) ) { return null; } Timestamp returnValue; try { returnValue = Timestamp.valueOf( string ); ...
@Test public void testConvertTimestampToString() throws Exception { ValueMetaTimestamp valueMetaTimestamp = new ValueMetaTimestamp(); assertEquals( "2012/04/05 04:03:02.123456000", valueMetaTimestamp.convertTimestampToString( Timestamp .valueOf( "2012-04-05 04:03:02.123456" ) ) ); assertEquals( "2012/04/05 04:03:02.123...
protected synchronized String convertTimestampToString( Timestamp timestamp ) throws KettleValueException { if ( timestamp == null ) { return null; } return getDateFormat().format( timestamp ); }
ValueMetaTimestamp extends ValueMetaDate { protected synchronized String convertTimestampToString( Timestamp timestamp ) throws KettleValueException { if ( timestamp == null ) { return null; } return getDateFormat().format( timestamp ); } }
ValueMetaTimestamp extends ValueMetaDate { protected synchronized String convertTimestampToString( Timestamp timestamp ) throws KettleValueException { if ( timestamp == null ) { return null; } return getDateFormat().format( timestamp ); } ValueMetaTimestamp(); ValueMetaTimestamp( String name ); }
ValueMetaTimestamp extends ValueMetaDate { protected synchronized String convertTimestampToString( Timestamp timestamp ) throws KettleValueException { if ( timestamp == null ) { return null; } return getDateFormat().format( timestamp ); } ValueMetaTimestamp(); ValueMetaTimestamp( String name ); @Override boolean isDat...
ValueMetaTimestamp extends ValueMetaDate { protected synchronized String convertTimestampToString( Timestamp timestamp ) throws KettleValueException { if ( timestamp == null ) { return null; } return getDateFormat().format( timestamp ); } ValueMetaTimestamp(); ValueMetaTimestamp( String name ); @Override boolean isDat...
@Test( expected = HandlerRegistrationException.class ) public void testbothNull() throws KettleException { messageEventService.addHandler( null, null ); }
public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + " eventType: " + event...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters is null : " + ...
@Test public void testConvertDateToTimestamp() throws Exception { ValueMetaTimestamp valueMetaTimestamp = new ValueMetaTimestamp(); Date date = new Date(); assertEquals( valueMetaTimestamp.convertDateToTimestamp( date ).getTime(), date.getTime() ); Timestamp timestamp = Timestamp.valueOf( "2014-04-05 04:03:02.123456789...
public Timestamp convertDateToTimestamp( Date date ) throws KettleValueException { if ( date == null ) { return null; } Timestamp result = null; if ( date instanceof Timestamp ) { result = (Timestamp) date; } else { result = new Timestamp( date.getTime() ); } return result; }
ValueMetaTimestamp extends ValueMetaDate { public Timestamp convertDateToTimestamp( Date date ) throws KettleValueException { if ( date == null ) { return null; } Timestamp result = null; if ( date instanceof Timestamp ) { result = (Timestamp) date; } else { result = new Timestamp( date.getTime() ); } return result; } ...
ValueMetaTimestamp extends ValueMetaDate { public Timestamp convertDateToTimestamp( Date date ) throws KettleValueException { if ( date == null ) { return null; } Timestamp result = null; if ( date instanceof Timestamp ) { result = (Timestamp) date; } else { result = new Timestamp( date.getTime() ); } return result; } ...
ValueMetaTimestamp extends ValueMetaDate { public Timestamp convertDateToTimestamp( Date date ) throws KettleValueException { if ( date == null ) { return null; } Timestamp result = null; if ( date instanceof Timestamp ) { result = (Timestamp) date; } else { result = new Timestamp( date.getTime() ); } return result; } ...
ValueMetaTimestamp extends ValueMetaDate { public Timestamp convertDateToTimestamp( Date date ) throws KettleValueException { if ( date == null ) { return null; } Timestamp result = null; if ( date instanceof Timestamp ) { result = (Timestamp) date; } else { result = new Timestamp( date.getTime() ); } return result; } ...
@Test public void testCompare() throws UnknownHostException, KettleValueException { ValueMetaInternetAddress vm = new ValueMetaInternetAddress(); InetAddress smaller = InetAddress.getByName( "127.0.0.1" ); InetAddress larger = InetAddress.getByName( "127.0.1.1" ); assertTrue( vm.isSortedAscending() ); assertFalse( vm.i...
@Override public int compare( Object data1, Object data2 ) throws KettleValueException { InetAddress inet1 = getInternetAddress( data1 ); InetAddress inet2 = getInternetAddress( data2 ); int cmp = 0; if ( inet1 == null ) { if ( inet2 == null ) { cmp = 0; } else { cmp = -1; } } else if ( inet2 == null ) { cmp = 1; } els...
ValueMetaInternetAddress extends ValueMetaDate { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { InetAddress inet1 = getInternetAddress( data1 ); InetAddress inet2 = getInternetAddress( data2 ); int cmp = 0; if ( inet1 == null ) { if ( inet2 == null ) { cmp = 0; } else { cmp = -...
ValueMetaInternetAddress extends ValueMetaDate { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { InetAddress inet1 = getInternetAddress( data1 ); InetAddress inet2 = getInternetAddress( data2 ); int cmp = 0; if ( inet1 == null ) { if ( inet2 == null ) { cmp = 0; } else { cmp = -...
ValueMetaInternetAddress extends ValueMetaDate { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { InetAddress inet1 = getInternetAddress( data1 ); InetAddress inet2 = getInternetAddress( data2 ); int cmp = 0; if ( inet1 == null ) { if ( inet2 == null ) { cmp = 0; } else { cmp = -...
ValueMetaInternetAddress extends ValueMetaDate { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { InetAddress inet1 = getInternetAddress( data1 ); InetAddress inet2 = getInternetAddress( data2 ); int cmp = 0; if ( inet1 == null ) { if ( inet2 == null ) { cmp = 0; } else { cmp = -...
@Test public void testGetBinaryString() throws KettleValueException, UnknownHostException { ValueMetaInternetAddress vmInet = new ValueMetaInternetAddress(); final ValueMetaString vmString = new ValueMetaString(); vmInet.setStorageMetadata( vmString ); InetAddress inetAddress = InetAddress.getByName( "127.0.0.1" ); byt...
@Override public byte[] getBinaryString( Object object ) throws KettleValueException { if ( isStorageBinaryString() && identicalFormat ) { return (byte[]) object; } if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return convertStringToBinaryString( getString( object ) ); case S...
ValueMetaInternetAddress extends ValueMetaDate { @Override public byte[] getBinaryString( Object object ) throws KettleValueException { if ( isStorageBinaryString() && identicalFormat ) { return (byte[]) object; } if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return convertSt...
ValueMetaInternetAddress extends ValueMetaDate { @Override public byte[] getBinaryString( Object object ) throws KettleValueException { if ( isStorageBinaryString() && identicalFormat ) { return (byte[]) object; } if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return convertSt...
ValueMetaInternetAddress extends ValueMetaDate { @Override public byte[] getBinaryString( Object object ) throws KettleValueException { if ( isStorageBinaryString() && identicalFormat ) { return (byte[]) object; } if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return convertSt...
ValueMetaInternetAddress extends ValueMetaDate { @Override public byte[] getBinaryString( Object object ) throws KettleValueException { if ( isStorageBinaryString() && identicalFormat ) { return (byte[]) object; } if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return convertSt...
@Test public void testClone() throws KettleException { ValueMetaInterface original = new ValueMetaString(); original.setCollatorLocale( Locale.CANADA ); original.setCollatorStrength( 3 ); ValueMetaInterface cloned = ValueMetaFactory.cloneValueMeta( original ); assertNotNull( cloned ); assertNotSame( original, cloned );...
public static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ) throws KettlePluginException { return cloneValueMeta( source, source.getType() ); }
ValueMetaFactory { public static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ) throws KettlePluginException { return cloneValueMeta( source, source.getType() ); } }
ValueMetaFactory { public static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ) throws KettlePluginException { return cloneValueMeta( source, source.getType() ); } }
ValueMetaFactory { public static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ) throws KettlePluginException { return cloneValueMeta( source, source.getType() ); } static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ); static ValueMetaInterface createValueMeta( S...
ValueMetaFactory { public static ValueMetaInterface cloneValueMeta( ValueMetaInterface source ) throws KettlePluginException { return cloneValueMeta( source, source.getType() ); } static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ); static ValueMetaInterface createValueMeta( S...
@Test public void testCreateValueMeta() throws KettlePluginException { ValueMetaInterface testObject; try { testObject = ValueMetaFactory.createValueMeta( Integer.MIN_VALUE ); fail(); } catch ( KettlePluginException expected ) { } try { testObject = ValueMetaFactory.createValueMeta( null, Integer.MIN_VALUE ); fail(); }...
public static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ) throws KettlePluginException { PluginInterface stringPlugin = pluginRegistry.getPlugin( ValueMetaPluginType.class, String.valueOf( type ) ); if ( stringPlugin == null ) { throw new KettlePluginException( "Unable to loca...
ValueMetaFactory { public static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ) throws KettlePluginException { PluginInterface stringPlugin = pluginRegistry.getPlugin( ValueMetaPluginType.class, String.valueOf( type ) ); if ( stringPlugin == null ) { throw new KettlePluginExcepti...
ValueMetaFactory { public static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ) throws KettlePluginException { PluginInterface stringPlugin = pluginRegistry.getPlugin( ValueMetaPluginType.class, String.valueOf( type ) ); if ( stringPlugin == null ) { throw new KettlePluginExcepti...
ValueMetaFactory { public static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ) throws KettlePluginException { PluginInterface stringPlugin = pluginRegistry.getPlugin( ValueMetaPluginType.class, String.valueOf( type ) ); if ( stringPlugin == null ) { throw new KettlePluginExcepti...
ValueMetaFactory { public static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ) throws KettlePluginException { PluginInterface stringPlugin = pluginRegistry.getPlugin( ValueMetaPluginType.class, String.valueOf( type ) ); if ( stringPlugin == null ) { throw new KettlePluginExcepti...
@Test public void testGetValueMetaNames() { List<String> dataTypes = Arrays.<String>asList( ValueMetaFactory.getValueMetaNames() ); assertTrue( dataTypes.contains( "Number" ) ); assertTrue( dataTypes.contains( "String" ) ); assertTrue( dataTypes.contains( "Date" ) ); assertTrue( dataTypes.contains( "Boolean" ) ); asser...
public static String[] getValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { int id = Integer.valueOf( plugin.getIds()[0] ); if ( id > 0 && id != ValueMetaInterface.TYPE_SER...
ValueMetaFactory { public static String[] getValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { int id = Integer.valueOf( plugin.getIds()[0] ); if ( id > 0 && id != ValueMet...
ValueMetaFactory { public static String[] getValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { int id = Integer.valueOf( plugin.getIds()[0] ); if ( id > 0 && id != ValueMet...
ValueMetaFactory { public static String[] getValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { int id = Integer.valueOf( plugin.getIds()[0] ); if ( id > 0 && id != ValueMet...
ValueMetaFactory { public static String[] getValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { int id = Integer.valueOf( plugin.getIds()[0] ); if ( id > 0 && id != ValueMet...
@Test public void testGetAllValueMetaNames() { List<String> dataTypes = Arrays.<String>asList( ValueMetaFactory.getAllValueMetaNames() ); assertTrue( dataTypes.contains( "Number" ) ); assertTrue( dataTypes.contains( "String" ) ); assertTrue( dataTypes.contains( "Date" ) ); assertTrue( dataTypes.contains( "Boolean" ) );...
public static String[] getAllValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { String id = plugin.getIds()[0]; if ( !( "0".equals( id ) ) ) { strings.add( plugin.getName() ...
ValueMetaFactory { public static String[] getAllValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { String id = plugin.getIds()[0]; if ( !( "0".equals( id ) ) ) { strings.add...
ValueMetaFactory { public static String[] getAllValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { String id = plugin.getIds()[0]; if ( !( "0".equals( id ) ) ) { strings.add...
ValueMetaFactory { public static String[] getAllValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { String id = plugin.getIds()[0]; if ( !( "0".equals( id ) ) ) { strings.add...
ValueMetaFactory { public static String[] getAllValueMetaNames() { List<String> strings = new ArrayList<String>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { String id = plugin.getIds()[0]; if ( !( "0".equals( id ) ) ) { strings.add...
@Test public void testGetValueMetaName() { assertEquals( "-", ValueMetaFactory.getValueMetaName( Integer.MIN_VALUE ) ); assertEquals( "None", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_NONE ) ); assertEquals( "Number", ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_NUMBER ) ); assertEquals( ...
public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; } }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; } }
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; } static ValueMetaInterface createValueMeta( String na...
ValueMetaFactory { public static String getValueMetaName( int type ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) { return plugin.getName(); } } return "-"; } static ValueMetaInterface createValueMeta( String na...
@Test public void testGetIdForValueMeta() { assertEquals( ValueMetaInterface.TYPE_NONE, ValueMetaFactory.getIdForValueMeta( null ) ); assertEquals( ValueMetaInterface.TYPE_NONE, ValueMetaFactory.getIdForValueMeta( "" ) ); assertEquals( ValueMetaInterface.TYPE_NONE, ValueMetaFactory.getIdForValueMeta( "None" ) ); assert...
public static int getIdForValueMeta( String valueMetaName ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( valueMetaName != null && valueMetaName.equalsIgnoreCase( plugin.getName() ) ) { return Integer.valueOf( plugin.getIds()[0] ); } } return ValueMetaInterface.TYPE_NO...
ValueMetaFactory { public static int getIdForValueMeta( String valueMetaName ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( valueMetaName != null && valueMetaName.equalsIgnoreCase( plugin.getName() ) ) { return Integer.valueOf( plugin.getIds()[0] ); } } return ValueMe...
ValueMetaFactory { public static int getIdForValueMeta( String valueMetaName ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( valueMetaName != null && valueMetaName.equalsIgnoreCase( plugin.getName() ) ) { return Integer.valueOf( plugin.getIds()[0] ); } } return ValueMe...
ValueMetaFactory { public static int getIdForValueMeta( String valueMetaName ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( valueMetaName != null && valueMetaName.equalsIgnoreCase( plugin.getName() ) ) { return Integer.valueOf( plugin.getIds()[0] ); } } return ValueMe...
ValueMetaFactory { public static int getIdForValueMeta( String valueMetaName ) { for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) { if ( valueMetaName != null && valueMetaName.equalsIgnoreCase( plugin.getName() ) ) { return Integer.valueOf( plugin.getIds()[0] ); } } return ValueMe...
@Test public void testGetValueMetaPluginClasses() throws KettlePluginException { List<ValueMetaInterface> dataTypes = ValueMetaFactory.getValueMetaPluginClasses(); boolean numberExists = false; boolean stringExists = false; boolean dateExists = false; boolean booleanExists = false; boolean integerExists = false; boolea...
public static List<ValueMetaInterface> getValueMetaPluginClasses() throws KettlePluginException { List<ValueMetaInterface> list = new ArrayList<ValueMetaInterface>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { ValueMetaInterface val...
ValueMetaFactory { public static List<ValueMetaInterface> getValueMetaPluginClasses() throws KettlePluginException { List<ValueMetaInterface> list = new ArrayList<ValueMetaInterface>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { Val...
ValueMetaFactory { public static List<ValueMetaInterface> getValueMetaPluginClasses() throws KettlePluginException { List<ValueMetaInterface> list = new ArrayList<ValueMetaInterface>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { Val...
ValueMetaFactory { public static List<ValueMetaInterface> getValueMetaPluginClasses() throws KettlePluginException { List<ValueMetaInterface> list = new ArrayList<ValueMetaInterface>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { Val...
ValueMetaFactory { public static List<ValueMetaInterface> getValueMetaPluginClasses() throws KettlePluginException { List<ValueMetaInterface> list = new ArrayList<ValueMetaInterface>(); List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class ); for ( PluginInterface plugin : plugins ) { Val...
@Test( expected = MessageEventFireEventException.class ) public void testFireEventNull() throws KettleException { messageEventService.fireEvent( null ); }
public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException messageEventFireEvent...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
@Test public void testGuessValueMetaInterface() { assertTrue( ValueMetaFactory.guessValueMetaInterface( new BigDecimal( 1.0 ) ) instanceof ValueMetaBigNumber ); assertTrue( ValueMetaFactory.guessValueMetaInterface( new Double( 1.0 ) ) instanceof ValueMetaNumber ); assertTrue( ValueMetaFactory.guessValueMetaInterface( n...
public static ValueMetaInterface guessValueMetaInterface( Object object ) { if ( object instanceof Number ) { if ( object instanceof BigDecimal ) { return new ValueMetaBigNumber(); } else if ( object instanceof Double ) { return new ValueMetaNumber(); } else if ( object instanceof Long ) { return new ValueMetaInteger()...
ValueMetaFactory { public static ValueMetaInterface guessValueMetaInterface( Object object ) { if ( object instanceof Number ) { if ( object instanceof BigDecimal ) { return new ValueMetaBigNumber(); } else if ( object instanceof Double ) { return new ValueMetaNumber(); } else if ( object instanceof Long ) { return new...
ValueMetaFactory { public static ValueMetaInterface guessValueMetaInterface( Object object ) { if ( object instanceof Number ) { if ( object instanceof BigDecimal ) { return new ValueMetaBigNumber(); } else if ( object instanceof Double ) { return new ValueMetaNumber(); } else if ( object instanceof Long ) { return new...
ValueMetaFactory { public static ValueMetaInterface guessValueMetaInterface( Object object ) { if ( object instanceof Number ) { if ( object instanceof BigDecimal ) { return new ValueMetaBigNumber(); } else if ( object instanceof Double ) { return new ValueMetaNumber(); } else if ( object instanceof Long ) { return new...
ValueMetaFactory { public static ValueMetaInterface guessValueMetaInterface( Object object ) { if ( object instanceof Number ) { if ( object instanceof BigDecimal ) { return new ValueMetaBigNumber(); } else if ( object instanceof Double ) { return new ValueMetaNumber(); } else if ( object instanceof Long ) { return new...
@Test public void testGetDataXML() throws IOException { BigDecimal bigDecimal = BigDecimal.ONE; ValueMetaBase valueDoubleMetaBase = new ValueMetaBase( String.valueOf( bigDecimal ), ValueMetaInterface.TYPE_BIGNUMBER ); assertEquals( "<value-data>" + Encode.forXml( String.valueOf( bigDecimal ) ) + "</value-data>" + Syste...
@Override public String getDataXML( Object object ) throws IOException { StringBuilder xml = new StringBuilder(); String string; if ( object != null ) { try { switch ( storageType ) { case STORAGE_TYPE_NORMAL: switch ( getType() ) { case TYPE_STRING: string = (String) object; break; case TYPE_NUMBER: string = Double.to...
ValueMetaBase implements ValueMetaInterface { @Override public String getDataXML( Object object ) throws IOException { StringBuilder xml = new StringBuilder(); String string; if ( object != null ) { try { switch ( storageType ) { case STORAGE_TYPE_NORMAL: switch ( getType() ) { case TYPE_STRING: string = (String) objec...
ValueMetaBase implements ValueMetaInterface { @Override public String getDataXML( Object object ) throws IOException { StringBuilder xml = new StringBuilder(); String string; if ( object != null ) { try { switch ( storageType ) { case STORAGE_TYPE_NORMAL: switch ( getType() ) { case TYPE_STRING: string = (String) objec...
ValueMetaBase implements ValueMetaInterface { @Override public String getDataXML( Object object ) throws IOException { StringBuilder xml = new StringBuilder(); String string; if ( object != null ) { try { switch ( storageType ) { case STORAGE_TYPE_NORMAL: switch ( getType() ) { case TYPE_STRING: string = (String) objec...
ValueMetaBase implements ValueMetaInterface { @Override public String getDataXML( Object object ) throws IOException { StringBuilder xml = new StringBuilder(); String string; if ( object != null ) { try { switch ( storageType ) { case STORAGE_TYPE_NORMAL: switch ( getType() ) { case TYPE_STRING: string = (String) objec...
@Test public void testGetValueFromSQLTypeTypeOverride() throws Exception { final int varbinaryColumnIndex = 2; ValueMetaBase valueMetaBase = new ValueMetaBase(), valueMetaBaseSpy = Mockito.spy( valueMetaBase ); DatabaseMeta dbMeta = Mockito.mock( DatabaseMeta.class ); DatabaseInterface databaseInterface = Mockito.mock(...
@SuppressWarnings( "fallthrough" ) @Override public ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm, int index, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException { try { int length = -1; int precision = -1; int valtype = ValueMeta...
ValueMetaBase implements ValueMetaInterface { @SuppressWarnings( "fallthrough" ) @Override public ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm, int index, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException { try { int length = -...
ValueMetaBase implements ValueMetaInterface { @SuppressWarnings( "fallthrough" ) @Override public ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm, int index, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException { try { int length = -...
ValueMetaBase implements ValueMetaInterface { @SuppressWarnings( "fallthrough" ) @Override public ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm, int index, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException { try { int length = -...
ValueMetaBase implements ValueMetaInterface { @SuppressWarnings( "fallthrough" ) @Override public ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm, int index, boolean ignoreLength, boolean lazyConversion ) throws KettleDatabaseException { try { int length = -...
@Test public void testConvertStringToBoolean() { assertNull( ValueMetaBase.convertStringToBoolean( null ) ); assertNull( ValueMetaBase.convertStringToBoolean( "" ) ); assertTrue( ValueMetaBase.convertStringToBoolean( "Y" ) ); assertTrue( ValueMetaBase.convertStringToBoolean( "y" ) ); assertTrue( ValueMetaBase.convertSt...
public static Boolean convertStringToBoolean( String string ) { if ( Utils.isEmpty( string ) ) { return null; } return Boolean.valueOf( "Y".equalsIgnoreCase( string ) || "TRUE".equalsIgnoreCase( string ) || "YES".equalsIgnoreCase( string ) || "1".equals( string ) ); }
ValueMetaBase implements ValueMetaInterface { public static Boolean convertStringToBoolean( String string ) { if ( Utils.isEmpty( string ) ) { return null; } return Boolean.valueOf( "Y".equalsIgnoreCase( string ) || "TRUE".equalsIgnoreCase( string ) || "YES".equalsIgnoreCase( string ) || "1".equals( string ) ); } }
ValueMetaBase implements ValueMetaInterface { public static Boolean convertStringToBoolean( String string ) { if ( Utils.isEmpty( string ) ) { return null; } return Boolean.valueOf( "Y".equalsIgnoreCase( string ) || "TRUE".equalsIgnoreCase( string ) || "YES".equalsIgnoreCase( string ) || "1".equals( string ) ); } Value...
ValueMetaBase implements ValueMetaInterface { public static Boolean convertStringToBoolean( String string ) { if ( Utils.isEmpty( string ) ) { return null; } return Boolean.valueOf( "Y".equalsIgnoreCase( string ) || "TRUE".equalsIgnoreCase( string ) || "YES".equalsIgnoreCase( string ) || "1".equals( string ) ); } Value...
ValueMetaBase implements ValueMetaInterface { public static Boolean convertStringToBoolean( String string ) { if ( Utils.isEmpty( string ) ) { return null; } return Boolean.valueOf( "Y".equalsIgnoreCase( string ) || "TRUE".equalsIgnoreCase( string ) || "YES".equalsIgnoreCase( string ) || "1".equals( string ) ); } Value...
@Test public void testConvertDataFromStringToString() throws KettleValueException { ValueMetaBase inValueMetaString = new ValueMetaString(); ValueMetaBase outValueMetaString = new ValueMetaString(); String inputValueEmptyString = StringUtils.EMPTY; String inputValueNullString = null; String nullIf = null; String ifNull...
@Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter should not be equals to null" ); } String nul...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
@Test public void testConvertDataFromStringToDate() throws KettleValueException { ValueMetaBase inValueMetaString = new ValueMetaString(); ValueMetaBase outValueMetaDate = new ValueMetaDate(); String inputValueEmptyString = StringUtils.EMPTY; String nullIf = null; String ifNull = null; int trim_type = 0; Object result;...
@Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter should not be equals to null" ); } String nul...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
@Test( expected = KettleValueException.class ) public void testConvertDataFromStringForNullMeta() throws KettleValueException { ValueMetaBase valueMetaBase = new ValueMetaBase(); String inputValueEmptyString = StringUtils.EMPTY; ValueMetaInterface valueMetaInterface = null; String nullIf = null; String ifNull = null; i...
@Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter should not be equals to null" ); } String nul...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type ) throws KettleValueException { if ( convertMeta == null ) { throw new KettleValueException( "API coding error: convertMeta input parameter...
@Test( expected = KettleValueException.class ) public void testGetBigDecimalThrowsKettleValueException() throws KettleValueException { ValueMetaBase valueMeta = new ValueMetaBigNumber(); valueMeta.getBigNumber( "1234567890" ); }
@Override public BigDecimal getBigNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_BIGNUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (BigDecimal) object; case STORAGE_TYPE_BINARY_STRING: return (BigDecimal) convertBinaryS...
ValueMetaBase implements ValueMetaInterface { @Override public BigDecimal getBigNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_BIGNUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (BigDecimal) object; case STORAGE_TYPE_BIN...
ValueMetaBase implements ValueMetaInterface { @Override public BigDecimal getBigNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_BIGNUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (BigDecimal) object; case STORAGE_TYPE_BIN...
ValueMetaBase implements ValueMetaInterface { @Override public BigDecimal getBigNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_BIGNUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (BigDecimal) object; case STORAGE_TYPE_BIN...
ValueMetaBase implements ValueMetaInterface { @Override public BigDecimal getBigNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_BIGNUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (BigDecimal) object; case STORAGE_TYPE_BIN...
@Test( expected = KettleValueException.class ) public void testGetIntegerThrowsKettleValueException() throws KettleValueException { ValueMetaBase valueMeta = new ValueMetaInteger(); valueMeta.getInteger( "1234567890" ); }
@Override public Long getInteger( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_INTEGER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Long) object; case STORAGE_TYPE_BINARY_STRING: return (Long) convertBinaryStringToNativeType( (by...
ValueMetaBase implements ValueMetaInterface { @Override public Long getInteger( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_INTEGER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Long) object; case STORAGE_TYPE_BINARY_STRING: retu...
ValueMetaBase implements ValueMetaInterface { @Override public Long getInteger( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_INTEGER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Long) object; case STORAGE_TYPE_BINARY_STRING: retu...
ValueMetaBase implements ValueMetaInterface { @Override public Long getInteger( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_INTEGER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Long) object; case STORAGE_TYPE_BINARY_STRING: retu...
ValueMetaBase implements ValueMetaInterface { @Override public Long getInteger( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_INTEGER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Long) object; case STORAGE_TYPE_BINARY_STRING: retu...
@Test( expected = KettleValueException.class ) public void testGetNumberThrowsKettleValueException() throws KettleValueException { ValueMetaBase valueMeta = new ValueMetaNumber(); valueMeta.getNumber( "1234567890" ); }
@Override public Double getNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_NUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Double) object; case STORAGE_TYPE_BINARY_STRING: return (Double) convertBinaryStringToNativeType(...
ValueMetaBase implements ValueMetaInterface { @Override public Double getNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_NUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Double) object; case STORAGE_TYPE_BINARY_STRING: re...
ValueMetaBase implements ValueMetaInterface { @Override public Double getNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_NUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Double) object; case STORAGE_TYPE_BINARY_STRING: re...
ValueMetaBase implements ValueMetaInterface { @Override public Double getNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_NUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Double) object; case STORAGE_TYPE_BINARY_STRING: re...
ValueMetaBase implements ValueMetaInterface { @Override public Double getNumber( Object object ) throws KettleValueException { try { if ( isNull( object ) ) { return null; } switch ( type ) { case TYPE_NUMBER: switch ( storageType ) { case STORAGE_TYPE_NORMAL: return (Double) object; case STORAGE_TYPE_BINARY_STRING: re...
@Test public void testOperationFireEvent() throws KettleException { addHandlers( operationMessageEvent, messageEventHandler, messageEventHandler2 ); LogEvent logEvent = new LogEvent<>( new RemoteSource( ModelType.OPERATION, "Operation_ID" ), logEntry ); messageEventService.fireEvent( logEvent ); verify( messageEventHan...
public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException messageEventFireEvent...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
@Test public void testIsNumeric() { int[] numTypes = { ValueMetaInterface.TYPE_INTEGER, ValueMetaInterface.TYPE_NUMBER, ValueMetaInterface.TYPE_BIGNUMBER }; for ( int type : numTypes ) { assertTrue( Integer.toString( type ), ValueMetaBase.isNumeric( type ) ); } int[] notNumTypes = { ValueMetaInterface.TYPE_INET, ValueM...
@Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); }
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } }
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int type, int length, int precision ); ValueMetaBase( Node node...
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int type, int length, int precision ); ValueMetaBase( Node node...
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int type, int length, int precision ); ValueMetaBase( Node node...
@Test public void testGetAllTypes() { Assert.assertArrayEquals( ValueMetaBase.getAllTypes(), ValueMetaFactory.getAllValueMetaNames() ); }
public static final String[] getAllTypes() { return ValueMetaFactory.getAllValueMetaNames(); }
ValueMetaBase implements ValueMetaInterface { public static final String[] getAllTypes() { return ValueMetaFactory.getAllValueMetaNames(); } }
ValueMetaBase implements ValueMetaInterface { public static final String[] getAllTypes() { return ValueMetaFactory.getAllValueMetaNames(); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int type, int length, int precision ); ValueMetaBase( Node n...
ValueMetaBase implements ValueMetaInterface { public static final String[] getAllTypes() { return ValueMetaFactory.getAllValueMetaNames(); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int type, int length, int precision ); ValueMetaBase( Node n...
ValueMetaBase implements ValueMetaInterface { public static final String[] getAllTypes() { return ValueMetaFactory.getAllValueMetaNames(); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int type, int length, int precision ); ValueMetaBase( Node n...
@Test public void testGetTrimTypeByCode() { assertEquals( ValueMetaBase.getTrimTypeByCode( "none" ), ValueMetaInterface.TRIM_TYPE_NONE ); assertEquals( ValueMetaBase.getTrimTypeByCode( "left" ), ValueMetaInterface.TRIM_TYPE_LEFT ); assertEquals( ValueMetaBase.getTrimTypeByCode( "right" ), ValueMetaInterface.TRIM_TYPE_R...
public static final int getTrimTypeByCode( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeCode.length; i++ ) { if ( trimTypeCode[i].equalsIgnoreCase( tt ) ) { return i; } } return 0; }
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByCode( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeCode.length; i++ ) { if ( trimTypeCode[i].equalsIgnoreCase( tt ) ) { return i; } } return 0; } }
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByCode( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeCode.length; i++ ) { if ( trimTypeCode[i].equalsIgnoreCase( tt ) ) { return i; } } return 0; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBas...
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByCode( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeCode.length; i++ ) { if ( trimTypeCode[i].equalsIgnoreCase( tt ) ) { return i; } } return 0; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBas...
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByCode( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeCode.length; i++ ) { if ( trimTypeCode[i].equalsIgnoreCase( tt ) ) { return i; } } return 0; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBas...
@Test public void testGetTrimTypeCode() { assertEquals( ValueMetaBase.getTrimTypeCode( ValueMetaInterface.TRIM_TYPE_NONE ), "none" ); assertEquals( ValueMetaBase.getTrimTypeCode( ValueMetaInterface.TRIM_TYPE_LEFT ), "left" ); assertEquals( ValueMetaBase.getTrimTypeCode( ValueMetaInterface.TRIM_TYPE_RIGHT ), "right" ); ...
public static final String getTrimTypeCode( int i ) { if ( i < 0 || i >= trimTypeCode.length ) { return trimTypeCode[0]; } return trimTypeCode[i]; }
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeCode( int i ) { if ( i < 0 || i >= trimTypeCode.length ) { return trimTypeCode[0]; } return trimTypeCode[i]; } }
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeCode( int i ) { if ( i < 0 || i >= trimTypeCode.length ) { return trimTypeCode[0]; } return trimTypeCode[i]; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int typ...
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeCode( int i ) { if ( i < 0 || i >= trimTypeCode.length ) { return trimTypeCode[0]; } return trimTypeCode[i]; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int typ...
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeCode( int i ) { if ( i < 0 || i >= trimTypeCode.length ) { return trimTypeCode[0]; } return trimTypeCode[i]; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int typ...
@Test public void testGetTrimTypeByDesc() { assertEquals( ValueMetaBase.getTrimTypeByDesc( BaseMessages.getString( PKG, "ValueMeta.TrimType.None" ) ), ValueMetaInterface.TRIM_TYPE_NONE ); assertEquals( ValueMetaBase.getTrimTypeByDesc( BaseMessages.getString( PKG, "ValueMeta.TrimType.Left" ) ), ValueMetaInterface.TRIM_T...
public static final int getTrimTypeByDesc( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeDesc.length; i++ ) { if ( trimTypeDesc[i].equalsIgnoreCase( tt ) ) { return i; } } return getTrimTypeByCode( tt ); }
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByDesc( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeDesc.length; i++ ) { if ( trimTypeDesc[i].equalsIgnoreCase( tt ) ) { return i; } } return getTrimTypeByCode( tt ); } }
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByDesc( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeDesc.length; i++ ) { if ( trimTypeDesc[i].equalsIgnoreCase( tt ) ) { return i; } } return getTrimTypeByCode( tt ); } ValueMetaBase(); ValueMetaBase( String...
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByDesc( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeDesc.length; i++ ) { if ( trimTypeDesc[i].equalsIgnoreCase( tt ) ) { return i; } } return getTrimTypeByCode( tt ); } ValueMetaBase(); ValueMetaBase( String...
ValueMetaBase implements ValueMetaInterface { public static final int getTrimTypeByDesc( String tt ) { if ( tt == null ) { return 0; } for ( int i = 0; i < trimTypeDesc.length; i++ ) { if ( trimTypeDesc[i].equalsIgnoreCase( tt ) ) { return i; } } return getTrimTypeByCode( tt ); } ValueMetaBase(); ValueMetaBase( String...
@Test public void testGetTrimTypeDesc() { assertEquals( ValueMetaBase.getTrimTypeDesc( ValueMetaInterface.TRIM_TYPE_NONE ), BaseMessages.getString( PKG, "ValueMeta.TrimType.None" ) ); assertEquals( ValueMetaBase.getTrimTypeDesc( ValueMetaInterface.TRIM_TYPE_LEFT ), BaseMessages.getString( PKG, "ValueMeta.TrimType.Left"...
public static final String getTrimTypeDesc( int i ) { if ( i < 0 || i >= trimTypeDesc.length ) { return trimTypeDesc[0]; } return trimTypeDesc[i]; }
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeDesc( int i ) { if ( i < 0 || i >= trimTypeDesc.length ) { return trimTypeDesc[0]; } return trimTypeDesc[i]; } }
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeDesc( int i ) { if ( i < 0 || i >= trimTypeDesc.length ) { return trimTypeDesc[0]; } return trimTypeDesc[i]; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int typ...
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeDesc( int i ) { if ( i < 0 || i >= trimTypeDesc.length ) { return trimTypeDesc[0]; } return trimTypeDesc[i]; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int typ...
ValueMetaBase implements ValueMetaInterface { public static final String getTrimTypeDesc( int i ) { if ( i < 0 || i >= trimTypeDesc.length ) { return trimTypeDesc[0]; } return trimTypeDesc[i]; } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, int typ...
@Test public void testCompareIntegerToDouble() throws KettleValueException { ValueMetaBase intMeta = new ValueMetaBase( "int", ValueMetaInterface.TYPE_INTEGER ); Long int1 = new Long( 2L ); ValueMetaBase numberMeta = new ValueMetaBase( "number", ValueMetaInterface.TYPE_NUMBER ); Double double2 = new Double( 1.5 ); asse...
@Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending() ) { return -1; } else { return 1; } } if ( ...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
@Test public void testCompareDate() throws KettleValueException { ValueMetaBase dateMeta = new ValueMetaBase( "int", ValueMetaInterface.TYPE_DATE ); Date date1 = new Date( 6223372036854775804L ); Date date2 = new Date( -6223372036854775804L ); assertEquals( 1, dateMeta.compare( date1, date2 ) ); assertEquals( -1, dateM...
@Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending() ) { return -1; } else { return 1; } } if ( ...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
ValueMetaBase implements ValueMetaInterface { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { boolean n1 = isNull( data1 ); boolean n2 = isNull( data2 ); if ( n1 && !n2 ) { if ( isSortedDescending() ) { return 1; } else { return -1; } } if ( !n1 && n2 ) { if ( isSortedDescending...
@Test public void testSetPreparedStatementStringValueDontLogTruncated() throws KettleDatabaseException { ValueMetaBase valueMetaString = new ValueMetaBase( "LOG_FIELD", ValueMetaInterface.TYPE_STRING, LOG_FIELD.length(), 0 ); DatabaseMeta databaseMeta = Mockito.mock( DatabaseMeta.class ); PreparedStatement preparedStat...
@Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num = getNumber( data ).doubleValue(); if ( databas...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
@Test public void testSetPreparedStatementStringValueLogTruncated() throws KettleDatabaseException { ValueMetaBase valueMetaString = new ValueMetaBase( "LOG_FIELD", ValueMetaInterface.TYPE_STRING, LOG_FIELD.length(), 0 ); DatabaseMeta databaseMeta = Mockito.mock( DatabaseMeta.class ); PreparedStatement preparedStatemen...
@Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num = getNumber( data ).doubleValue(); if ( databas...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
ValueMetaBase implements ValueMetaInterface { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { switch ( getType() ) { case ValueMetaInterface.TYPE_NUMBER: if ( !isNull( data ) ) { double num =...
@Test( expected = MessageEventFireEventException.class ) public void testOperationFireEventThrowException() throws KettleException { addHandlers( operationMessageEvent, messageEventHandler, messageEventHandler2 ); doThrow( new RuntimeException( "Test" ) ).when( messageEventHandler ).execute( any( Message.class ) ); Log...
public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException messageEventFireEvent...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
@Test public void testGetNativeDataTypeClass() { ValueMetaInterface base = new ValueMetaBase(); Class<?> clazz = null; try { clazz = base.getNativeDataTypeClass(); Assert.fail(); } catch ( KettleValueException expected ) { Assert.assertNull( clazz ); } }
@Override public Class<?> getNativeDataTypeClass() throws KettleValueException { throw new KettleValueException( getTypeDesc() + " does not implement this method" ); }
ValueMetaBase implements ValueMetaInterface { @Override public Class<?> getNativeDataTypeClass() throws KettleValueException { throw new KettleValueException( getTypeDesc() + " does not implement this method" ); } }
ValueMetaBase implements ValueMetaInterface { @Override public Class<?> getNativeDataTypeClass() throws KettleValueException { throw new KettleValueException( getTypeDesc() + " does not implement this method" ); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( S...
ValueMetaBase implements ValueMetaInterface { @Override public Class<?> getNativeDataTypeClass() throws KettleValueException { throw new KettleValueException( getTypeDesc() + " does not implement this method" ); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( S...
ValueMetaBase implements ValueMetaInterface { @Override public Class<?> getNativeDataTypeClass() throws KettleValueException { throw new KettleValueException( getTypeDesc() + " does not implement this method" ); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( S...
@Test public void testConvertDataUsingConversionMetaData() throws KettleValueException, ParseException { ValueMetaString base = new ValueMetaString(); double DELTA = 1e-15; base.setConversionMetadata( new ValueMetaString( "STRING" ) ); Object defaultStringData = "STRING DATA"; String convertedStringData = (String) base...
@Override public Object convertDataUsingConversionMetaData( Object data ) throws KettleValueException { if ( conversionMetadata == null ) { throw new KettleValueException( "API coding error: please specify the conversion metadata before attempting to convert value " + name ); } switch ( conversionMetadata.getType() ) {...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataUsingConversionMetaData( Object data ) throws KettleValueException { if ( conversionMetadata == null ) { throw new KettleValueException( "API coding error: please specify the conversion metadata before attempting to convert value " + name ...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataUsingConversionMetaData( Object data ) throws KettleValueException { if ( conversionMetadata == null ) { throw new KettleValueException( "API coding error: please specify the conversion metadata before attempting to convert value " + name ...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataUsingConversionMetaData( Object data ) throws KettleValueException { if ( conversionMetadata == null ) { throw new KettleValueException( "API coding error: please specify the conversion metadata before attempting to convert value " + name ...
ValueMetaBase implements ValueMetaInterface { @Override public Object convertDataUsingConversionMetaData( Object data ) throws KettleValueException { if ( conversionMetadata == null ) { throw new KettleValueException( "API coding error: please specify the conversion metadata before attempting to convert value " + name ...
@Test public void testGetCompatibleString() throws KettleValueException { ValueMetaInteger valueMetaInteger = new ValueMetaInteger( "INTEGER" ); valueMetaInteger.setType( 5 ); valueMetaInteger.setStorageType( 1 ); assertEquals( "2", valueMetaInteger.getCompatibleString( new Long( 2 ) ) ); }
@Override public String getCompatibleString( Object object ) throws KettleValueException { try { String string; switch ( type ) { case TYPE_DATE: switch ( storageType ) { case STORAGE_TYPE_NORMAL: string = convertDateToCompatibleString( (Date) object ); break; case STORAGE_TYPE_BINARY_STRING: string = convertDateToComp...
ValueMetaBase implements ValueMetaInterface { @Override public String getCompatibleString( Object object ) throws KettleValueException { try { String string; switch ( type ) { case TYPE_DATE: switch ( storageType ) { case STORAGE_TYPE_NORMAL: string = convertDateToCompatibleString( (Date) object ); break; case STORAGE_...
ValueMetaBase implements ValueMetaInterface { @Override public String getCompatibleString( Object object ) throws KettleValueException { try { String string; switch ( type ) { case TYPE_DATE: switch ( storageType ) { case STORAGE_TYPE_NORMAL: string = convertDateToCompatibleString( (Date) object ); break; case STORAGE_...
ValueMetaBase implements ValueMetaInterface { @Override public String getCompatibleString( Object object ) throws KettleValueException { try { String string; switch ( type ) { case TYPE_DATE: switch ( storageType ) { case STORAGE_TYPE_NORMAL: string = convertDateToCompatibleString( (Date) object ); break; case STORAGE_...
ValueMetaBase implements ValueMetaInterface { @Override public String getCompatibleString( Object object ) throws KettleValueException { try { String string; switch ( type ) { case TYPE_DATE: switch ( storageType ) { case STORAGE_TYPE_NORMAL: string = convertDateToCompatibleString( (Date) object ); break; case STORAGE_...
@Test public void testConvertBigNumberToBoolean() { ValueMetaBase vmb = new ValueMetaBase(); System.out.println( vmb.convertBigNumberToBoolean( new BigDecimal( "-234" ) ) ); System.out.println( vmb.convertBigNumberToBoolean( new BigDecimal( "234" ) ) ); System.out.println( vmb.convertBigNumberToBoolean( new BigDecimal(...
protected Boolean convertBigNumberToBoolean( BigDecimal number ) { if ( number == null ) { return null; } return Boolean.valueOf( number.signum() != 0 ); }
ValueMetaBase implements ValueMetaInterface { protected Boolean convertBigNumberToBoolean( BigDecimal number ) { if ( number == null ) { return null; } return Boolean.valueOf( number.signum() != 0 ); } }
ValueMetaBase implements ValueMetaInterface { protected Boolean convertBigNumberToBoolean( BigDecimal number ) { if ( number == null ) { return null; } return Boolean.valueOf( number.signum() != 0 ); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, ...
ValueMetaBase implements ValueMetaInterface { protected Boolean convertBigNumberToBoolean( BigDecimal number ) { if ( number == null ) { return null; } return Boolean.valueOf( number.signum() != 0 ); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, ...
ValueMetaBase implements ValueMetaInterface { protected Boolean convertBigNumberToBoolean( BigDecimal number ) { if ( number == null ) { return null; } return Boolean.valueOf( number.signum() != 0 ); } ValueMetaBase(); ValueMetaBase( String name ); ValueMetaBase( String name, int type ); ValueMetaBase( String name, ...
@Test public void testGetNativeData_emptyIsNotNull() throws Exception { meta.setNullsAndEmptyAreDifferent( true ); assertEquals( BASE_VALUE, meta.getNativeDataType( BASE_VALUE ) ); assertEquals( TEST_VALUE, meta.getNativeDataType( TEST_VALUE ) ); assertEquals( null, meta.getNativeDataType( null ) ); assertEquals( "1", ...
@Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); }
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } }
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } ValueMetaString(); ValueMetaString( String name ); ValueMetaString( String name, int length, int precision ); }
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } ValueMetaString(); ValueMetaString( String name ); ValueMetaString( String name, int length, int precision ); @Override Object ge...
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } ValueMetaString(); ValueMetaString( String name ); ValueMetaString( String name, int length, int precision ); @Override Object ge...
@Test public void testGetNativeData_emptyIsNull() throws Exception { meta.setNullsAndEmptyAreDifferent( false ); assertEquals( BASE_VALUE, meta.getNativeDataType( BASE_VALUE ) ); assertEquals( TEST_VALUE, meta.getNativeDataType( TEST_VALUE ) ); assertEquals( null, meta.getNativeDataType( null ) ); assertEquals( "1", me...
@Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); }
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } }
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } ValueMetaString(); ValueMetaString( String name ); ValueMetaString( String name, int length, int precision ); }
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } ValueMetaString(); ValueMetaString( String name ); ValueMetaString( String name, int length, int precision ); @Override Object ge...
ValueMetaString extends ValueMetaBase implements ValueMetaInterface { @Override public Object getNativeDataType( Object object ) throws KettleValueException { return getString( object ); } ValueMetaString(); ValueMetaString( String name ); ValueMetaString( String name, int length, int precision ); @Override Object ge...
@Test public void testFormat() throws Exception { for ( Locale locale : locales ) { Locale.setDefault( Locale.Category.FORMAT, locale ); tdb = ResourceBundle.getBundle( "org/pentaho/di/core/row/value/timestamp/messages/testdates", locale ); checkFormat( "KETTLE.LONG" ); checkFormat( "LOCALE.DATE", new SimpleTimestampFo...
@Override public StringBuffer format( Date timestamp, StringBuffer toAppendTo, FieldPosition pos ) { if ( compatibleToSuperPattern ) { return super.format( timestamp, toAppendTo, pos ); } StringBuffer dateBuffer; String nan; if ( timestamp instanceof Timestamp ) { Timestamp tmp = (Timestamp) timestamp; Date date = new ...
SimpleTimestampFormat extends SimpleDateFormat { @Override public StringBuffer format( Date timestamp, StringBuffer toAppendTo, FieldPosition pos ) { if ( compatibleToSuperPattern ) { return super.format( timestamp, toAppendTo, pos ); } StringBuffer dateBuffer; String nan; if ( timestamp instanceof Timestamp ) { Timest...
SimpleTimestampFormat extends SimpleDateFormat { @Override public StringBuffer format( Date timestamp, StringBuffer toAppendTo, FieldPosition pos ) { if ( compatibleToSuperPattern ) { return super.format( timestamp, toAppendTo, pos ); } StringBuffer dateBuffer; String nan; if ( timestamp instanceof Timestamp ) { Timest...
SimpleTimestampFormat extends SimpleDateFormat { @Override public StringBuffer format( Date timestamp, StringBuffer toAppendTo, FieldPosition pos ) { if ( compatibleToSuperPattern ) { return super.format( timestamp, toAppendTo, pos ); } StringBuffer dateBuffer; String nan; if ( timestamp instanceof Timestamp ) { Timest...
SimpleTimestampFormat extends SimpleDateFormat { @Override public StringBuffer format( Date timestamp, StringBuffer toAppendTo, FieldPosition pos ) { if ( compatibleToSuperPattern ) { return super.format( timestamp, toAppendTo, pos ); } StringBuffer dateBuffer; String nan; if ( timestamp instanceof Timestamp ) { Timest...
@Test public void testParse() throws Exception { for ( Locale locale : locales ) { Locale.setDefault( Locale.Category.FORMAT, locale ); tdb = ResourceBundle.getBundle( "org/pentaho/di/core/row/value/timestamp/messages/testdates", locale ); checkParseKettle(); checkParseKettleLong(); checkParseDbDefault(); checkParseLoc...
@Override public Date parse( String text, ParsePosition pos ) { String timestampFormatDate; Date tempDate; if ( compatibleToSuperPattern ) { tempDate = super.parse( text, pos ); return new Timestamp( tempDate.getTime() ); } StringBuilder dateText = new StringBuilder( text.substring( pos.getIndex() ) ); ParsePosition po...
SimpleTimestampFormat extends SimpleDateFormat { @Override public Date parse( String text, ParsePosition pos ) { String timestampFormatDate; Date tempDate; if ( compatibleToSuperPattern ) { tempDate = super.parse( text, pos ); return new Timestamp( tempDate.getTime() ); } StringBuilder dateText = new StringBuilder( tex...
SimpleTimestampFormat extends SimpleDateFormat { @Override public Date parse( String text, ParsePosition pos ) { String timestampFormatDate; Date tempDate; if ( compatibleToSuperPattern ) { tempDate = super.parse( text, pos ); return new Timestamp( tempDate.getTime() ); } StringBuilder dateText = new StringBuilder( tex...
SimpleTimestampFormat extends SimpleDateFormat { @Override public Date parse( String text, ParsePosition pos ) { String timestampFormatDate; Date tempDate; if ( compatibleToSuperPattern ) { tempDate = super.parse( text, pos ); return new Timestamp( tempDate.getTime() ); } StringBuilder dateText = new StringBuilder( tex...
SimpleTimestampFormat extends SimpleDateFormat { @Override public Date parse( String text, ParsePosition pos ) { String timestampFormatDate; Date tempDate; if ( compatibleToSuperPattern ) { tempDate = super.parse( text, pos ); return new Timestamp( tempDate.getTime() ); } StringBuilder dateText = new StringBuilder( tex...
@Test public void testToPattern() throws Exception { for ( Locale locale : locales ) { Locale.setDefault( Locale.Category.FORMAT, locale ); tdb = ResourceBundle.getBundle( "org/pentaho/di/core/row/value/timestamp/messages/testdates", locale ); String patternExample = tdb.getString( "PATTERN.KETTLE" ); SimpleTimestampFo...
@Override public String toPattern() { return originalPattern; }
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toPattern() { return originalPattern; } }
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toPattern() { return originalPattern; } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); SimpleTimestampFormat( String pattern, DateFormatSymbols formatSymbols ); }
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toPattern() { return originalPattern; } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); SimpleTimestampFormat( String pattern, DateFormatSymbols formatSymbols ); @Override void setDateFormatSymbol...
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toPattern() { return originalPattern; } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); SimpleTimestampFormat( String pattern, DateFormatSymbols formatSymbols ); @Override void setDateFormatSymbol...
@Test public void testToLocalizedPattern() throws Exception { for ( Locale locale : locales ) { Locale.setDefault( Locale.Category.FORMAT, locale ); tdb = ResourceBundle.getBundle( "org/pentaho/di/core/row/value/timestamp/messages/testdates", locale ); SimpleTimestampFormat stf = new SimpleTimestampFormat( new SimpleDa...
@Override public String toLocalizedPattern() { if ( compatibleToSuperPattern ) { return super.toLocalizedPattern(); } else { StringBuffer pattern = new StringBuffer( super.toLocalizedPattern() ); int placeholderPosition = replaceHolder( pattern, true ); for ( int i = placeholderPosition; i <= endNanosecondPatternPositi...
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toLocalizedPattern() { if ( compatibleToSuperPattern ) { return super.toLocalizedPattern(); } else { StringBuffer pattern = new StringBuffer( super.toLocalizedPattern() ); int placeholderPosition = replaceHolder( pattern, true ); for ( int i = pla...
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toLocalizedPattern() { if ( compatibleToSuperPattern ) { return super.toLocalizedPattern(); } else { StringBuffer pattern = new StringBuffer( super.toLocalizedPattern() ); int placeholderPosition = replaceHolder( pattern, true ); for ( int i = pla...
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toLocalizedPattern() { if ( compatibleToSuperPattern ) { return super.toLocalizedPattern(); } else { StringBuffer pattern = new StringBuffer( super.toLocalizedPattern() ); int placeholderPosition = replaceHolder( pattern, true ); for ( int i = pla...
SimpleTimestampFormat extends SimpleDateFormat { @Override public String toLocalizedPattern() { if ( compatibleToSuperPattern ) { return super.toLocalizedPattern(); } else { StringBuffer pattern = new StringBuffer( super.toLocalizedPattern() ); int placeholderPosition = replaceHolder( pattern, true ); for ( int i = pla...
@Test public void testStopMessageFireEvent() throws KettleException { addHandlers( new StopMessage( "" ), messageEventHandler, messageEventHandler2 ); StopMessage msg = new StopMessage( "User request" ); messageEventService.fireEvent( msg ); verify( messageEventHandler ).execute( msg ); verify( messageEventHandler2 ).e...
public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException messageEventFireEvent...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
MessageEventService { public void fireEvent( final Message event ) throws MessageEventFireEventException { if ( event != null ) { if ( containsHandlerFor( event ) ) { final Collection<MessageEventHandler> handlers = getHandlersFor( event ); if ( handlers != null && handlers.size() > 0 ) { MessageEventFireEventException...
@Test public void testApplyPattern() throws Exception { for ( Locale locale : locales ) { Locale.setDefault( Locale.Category.FORMAT, locale ); tdb = ResourceBundle.getBundle( "org/pentaho/di/core/row/value/timestamp/messages/testdates", locale ); String patternExample = tdb.getString( "PATTERN.KETTLE" ); SimpleTimestam...
@Override public void applyPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, false ); }
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, false ); } }
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, false ); } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); SimpleTimest...
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, false ); } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); SimpleTimest...
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, false ); } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); SimpleTimest...
@Test public void testApplyLocalizedPattern() throws Exception { Locale.setDefault( Locale.Category.FORMAT, Locale.US ); SimpleTimestampFormat stf = new SimpleTimestampFormat( new SimpleDateFormat().toPattern() ); for ( Locale locale : locales ) { Locale.setDefault( Locale.Category.FORMAT, locale ); tdb = ResourceBundl...
@Override public void applyLocalizedPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, true ); }
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyLocalizedPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, true ); } }
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyLocalizedPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, true ); } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); Simp...
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyLocalizedPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, true ); } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); Simp...
SimpleTimestampFormat extends SimpleDateFormat { @Override public void applyLocalizedPattern( String pattern ) { DateFormatSymbols formatSymbols = super.getDateFormatSymbols(); init( pattern, formatSymbols, true ); } SimpleTimestampFormat( String pattern ); SimpleTimestampFormat( String pattern, Locale locale ); Simp...
@Test @PrepareForTest( { EnvUtil.class } ) public void testLoadXML() throws KettleValueException, KettlePluginException, ParseException { PowerMockito.mockStatic( EnvUtil.class ); Mockito.when( EnvUtil.getSystemProperty( Const.KETTLE_DEFAULT_DATE_FORMAT ) ).thenReturn( "yyyy-MM-dd HH:mm:ss.SSS" ); ValueMetaAndData valu...
public boolean loadXML( Node valnode ) { valueMeta = null; try { String valname = XMLHandler.getTagValue( valnode, "name" ); int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) ); String text = XMLHandler.getTagValue( valnode, "text" ); boolean isnull = "Y".equalsIgnoreCase( XMLHandler.getTag...
ValueMetaAndData { public boolean loadXML( Node valnode ) { valueMeta = null; try { String valname = XMLHandler.getTagValue( valnode, "name" ); int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) ); String text = XMLHandler.getTagValue( valnode, "text" ); boolean isnull = "Y".equalsIgnoreCase...
ValueMetaAndData { public boolean loadXML( Node valnode ) { valueMeta = null; try { String valname = XMLHandler.getTagValue( valnode, "name" ); int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) ); String text = XMLHandler.getTagValue( valnode, "text" ); boolean isnull = "Y".equalsIgnoreCase...
ValueMetaAndData { public boolean loadXML( Node valnode ) { valueMeta = null; try { String valname = XMLHandler.getTagValue( valnode, "name" ); int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) ); String text = XMLHandler.getTagValue( valnode, "text" ); boolean isnull = "Y".equalsIgnoreCase...
ValueMetaAndData { public boolean loadXML( Node valnode ) { valueMeta = null; try { String valname = XMLHandler.getTagValue( valnode, "name" ); int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) ); String text = XMLHandler.getTagValue( valnode, "text" ); boolean isnull = "Y".equalsIgnoreCase...
@Test public void testWrite() throws IOException { WriterOutputStream stream = new WriterOutputStream( writer ); stream.write( 68 ); stream.write( "value".getBytes(), 1, 3 ); stream.write( "value".getBytes() ); stream.flush(); stream.close(); verify( writer ).append( new String( new byte[] { (byte) 68 } ) ); verify( wr...
@Override public void write( int b ) throws IOException { write( new byte[] { (byte) b, } ); }
WriterOutputStream extends OutputStream { @Override public void write( int b ) throws IOException { write( new byte[] { (byte) b, } ); } }
WriterOutputStream extends OutputStream { @Override public void write( int b ) throws IOException { write( new byte[] { (byte) b, } ); } WriterOutputStream( Writer writer ); WriterOutputStream( Writer writer, String encoding ); }
WriterOutputStream extends OutputStream { @Override public void write( int b ) throws IOException { write( new byte[] { (byte) b, } ); } WriterOutputStream( Writer writer ); WriterOutputStream( Writer writer, String encoding ); @Override void write( int b ); @Override void write( byte[] b, int off, int len ); @Overrid...
WriterOutputStream extends OutputStream { @Override public void write( int b ) throws IOException { write( new byte[] { (byte) b, } ); } WriterOutputStream( Writer writer ); WriterOutputStream( Writer writer, String encoding ); @Override void write( int b ); @Override void write( byte[] b, int off, int len ); @Overrid...
@Test public void testFindJarFiles_DirWithJarInNameNotAdded() throws IOException, KettleFileException { Files.createDirectories( PATH_TO_DIR_WITH_JAR_IN_NAME ); FileObject[] findJarFiles = plFolder.findJarFiles(); assertNotNull( findJarFiles ); assertEquals( 0, findJarFiles.length ); }
@Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
@Test public void testFindJarFiles_DirWithJarInNameNotAddedAndTxtFileNotAdded() throws IOException, KettleFileException { Files.createDirectories( PATH_TO_DIR_WITH_JAR_IN_NAME ); Files.createFile( PATH_TO_NOT_JAR_FILE ); FileObject[] findJarFiles = plFolder.findJarFiles(); assertNotNull( findJarFiles ); assertEquals( 0...
@Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
@Test public void testFindJarFiles_SeveralJarsInDifferentDirs() throws IOException, KettleFileException { Files.createDirectories( PATH_TO_DIR_WITH_JAR_IN_NAME ); Files.createFile( PATH_TO_JAR_FILE1 ); Files.createFile( PATH_TO_NOT_JAR_FILE ); Files.createDirectories( PATH_TO_TEST_DIR_NAME ); Files.createFile( PATH_TO_...
@Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
@Test public void testFindJarFiles_DirWithKettleIgnoreFileIgnored() throws IOException, KettleFileException { Files.createDirectories( PATH_TO_TEST_DIR_NAME ); Files.createFile( PATH_TO_JAR_FILE2 ); Files.createFile( PATH_TO_KETTLE_IGNORE_FILE ); FileObject[] findJarFiles = plFolder.findJarFiles(); assertNotNull( findJ...
@Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
@Test public void testFindJarFiles_LibDirIgnored() throws IOException, KettleFileException { Files.createDirectories( Paths.get( BASE_TEMP_DIR, PLUGINS_DIR_NAME, "lib" ) ); Files.createFile( PATH_TO_JAR_IN_LIB_DIR ); FileObject[] findJarFiles = plFolder.findJarFiles(); assertNotNull( findJarFiles ); assertEquals( 0, fi...
@Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
@Test public void testFindJarFiles_ExceptionThrows() { String nullFolder = null; String expectedMessage = "Unable to list jar files in plugin folder '" + nullFolder + "'"; plFolder = new PluginFolder( nullFolder, false, true ); try { plFolder.findJarFiles(); fail( "KettleFileException was not occured but expected." ); ...
@Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } }
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
PluginFolder implements PluginFolderInterface { @Override public FileObject[] findJarFiles() throws KettleFileException { return findJarFiles( searchLibDir ); } PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginAnnotationsFolder ); PluginFolder( String folder, boolean pluginXmlFolder, boolean pluginA...
@Test public void testGetMinimum() { final Point minimalCanvasPoint = new Point( 0, 0 ); final Point stepPoint = new Point( 500, 500 ); Point point = transMeta.getMinimum(); assertEquals( minimalCanvasPoint.x, point.x ); assertEquals( minimalCanvasPoint.y, point.y ); StepMeta stepMeta = mock( StepMeta.class ); when( st...
public Point getMinimum() { int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE; for ( int i = 0; i < nrSteps(); i++ ) { StepMeta stepMeta = getStep( i ); Point loc = stepMeta.getLocation(); if ( loc.x < minx ) { minx = loc.x; } if ( loc.y < miny ) { miny = loc.y; } } for ( int i = 0; i < nrNotes(); i++ ) { NotePadM...
TransMeta extends AbstractMeta implements XMLInterface, Comparator<TransMeta>, Comparable<TransMeta>, Cloneable, ResourceExportInterface, RepositoryElementInterface, LoggingObjectInterface { public Point getMinimum() { int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE; for ( int i = 0; i < nrSteps(); i++ ) { S...
TransMeta extends AbstractMeta implements XMLInterface, Comparator<TransMeta>, Comparable<TransMeta>, Cloneable, ResourceExportInterface, RepositoryElementInterface, LoggingObjectInterface { public Point getMinimum() { int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE; for ( int i = 0; i < nrSteps(); i++ ) { S...
TransMeta extends AbstractMeta implements XMLInterface, Comparator<TransMeta>, Comparable<TransMeta>, Cloneable, ResourceExportInterface, RepositoryElementInterface, LoggingObjectInterface { public Point getMinimum() { int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE; for ( int i = 0; i < nrSteps(); i++ ) { S...
TransMeta extends AbstractMeta implements XMLInterface, Comparator<TransMeta>, Comparable<TransMeta>, Cloneable, ResourceExportInterface, RepositoryElementInterface, LoggingObjectInterface { public Point getMinimum() { int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE; for ( int i = 0; i < nrSteps(); i++ ) { S...
@Test( expected = DuplicateParamException.class ) public void testAddParameterDefinitionWithException() throws DuplicateParamException { namedParams.addParameterDefinition( "key", "value", "description" ); namedParams.addParameterDefinition( "key", "value", "description" ); }
@Override public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException { if ( params.get( key ) == null ) { OneNamedParam oneParam = new OneNamedParam(); oneParam.key = key; oneParam.defaultValue = defValue; oneParam.description = description; oneParam.value = "";...
NamedParamsDefault implements NamedParams { @Override public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException { if ( params.get( key ) == null ) { OneNamedParam oneParam = new OneNamedParam(); oneParam.key = key; oneParam.defaultValue = defValue; oneParam.des...
NamedParamsDefault implements NamedParams { @Override public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException { if ( params.get( key ) == null ) { OneNamedParam oneParam = new OneNamedParam(); oneParam.key = key; oneParam.defaultValue = defValue; oneParam.des...
NamedParamsDefault implements NamedParams { @Override public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException { if ( params.get( key ) == null ) { OneNamedParam oneParam = new OneNamedParam(); oneParam.key = key; oneParam.defaultValue = defValue; oneParam.des...
NamedParamsDefault implements NamedParams { @Override public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException { if ( params.get( key ) == null ) { OneNamedParam oneParam = new OneNamedParam(); oneParam.key = key; oneParam.defaultValue = defValue; oneParam.des...
@Test public void testCopyParametersFromNullChecks() throws Exception { namedParams.copyParametersFrom( null ); NamedParams namedParams2 = new NamedParamsDefault(); ( (NamedParamsDefault) namedParams ).params = null; namedParams.copyParametersFrom( namedParams2 ); }
@Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[idx] ); } catch ( UnknownParamException e ) {...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
@Test public void testCopyParametersFrom() throws Exception { NamedParams namedParams2 = new NamedParamsDefault(); namedParams2.addParameterDefinition( "key", "default value", "description" ); namedParams2.setParameterValue( "key", "value" ); assertNull( namedParams.getParameterValue( "key" ) ); namedParams.copyParamet...
@Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[idx] ); } catch ( UnknownParamException e ) {...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
NamedParamsDefault implements NamedParams { @Override public void copyParametersFrom( NamedParams aParam ) { if ( params != null && aParam != null ) { params.clear(); String[] keys = aParam.listParameters(); for ( int idx = 0; idx < keys.length; idx++ ) { String desc; try { desc = aParam.getParameterDescription( keys[i...
@Test public void testLoadClass() throws Exception { final String classToLoad = "dummy.Class"; final AtomicBoolean loadClassCalled = new AtomicBoolean(); ClassLoader parent = new ClassLoader() { @Override protected Class<?> loadClass( String name, boolean resolve ) throws ClassNotFoundException { if ( name.equals( clas...
@Override protected synchronized Class<?> loadClass( String name, boolean resolve ) throws ClassNotFoundException { try { return super.loadClass( name, resolve ); } catch ( NoClassDefFoundError e ) { return super.findClass( name ); } }
PDIClassLoader extends URLClassLoader { @Override protected synchronized Class<?> loadClass( String name, boolean resolve ) throws ClassNotFoundException { try { return super.loadClass( name, resolve ); } catch ( NoClassDefFoundError e ) { return super.findClass( name ); } } }
PDIClassLoader extends URLClassLoader { @Override protected synchronized Class<?> loadClass( String name, boolean resolve ) throws ClassNotFoundException { try { return super.loadClass( name, resolve ); } catch ( NoClassDefFoundError e ) { return super.findClass( name ); } } PDIClassLoader( URL[] url, ClassLoader paren...
PDIClassLoader extends URLClassLoader { @Override protected synchronized Class<?> loadClass( String name, boolean resolve ) throws ClassNotFoundException { try { return super.loadClass( name, resolve ); } catch ( NoClassDefFoundError e ) { return super.findClass( name ); } } PDIClassLoader( URL[] url, ClassLoader paren...
PDIClassLoader extends URLClassLoader { @Override protected synchronized Class<?> loadClass( String name, boolean resolve ) throws ClassNotFoundException { try { return super.loadClass( name, resolve ); } catch ( NoClassDefFoundError e ) { return super.findClass( name ); } } PDIClassLoader( URL[] url, ClassLoader paren...