@Test public void testAccepts() throws Exception { assertFalse( jobFileListener.accepts( null ) ); assertFalse( jobFileListener.accepts( "NoDot" ) ); assertTrue( jobFileListener.accepts( "Job.kjb" ) ); assertTrue( jobFileListener.accepts( ".kjb" ) ); }
public boolean accepts( String fileName ) { if ( fileName == null || fileName.indexOf( '.' ) == -1 ) { return false; } String extension = fileName.substring( fileName.lastIndexOf( '.' ) + 1 ); return extension.equals( "kjb" ); }
JobFileListener implements FileListener { public boolean accepts( String fileName ) { if ( fileName == null || fileName.indexOf( '.' ) == -1 ) { return false; } String extension = fileName.substring( fileName.lastIndexOf( '.' ) + 1 ); return extension.equals( "kjb" ); } }
JobFileListener implements FileListener { public boolean accepts( String fileName ) { if ( fileName == null || fileName.indexOf( '.' ) == -1 ) { return false; } String extension = fileName.substring( fileName.lastIndexOf( '.' ) + 1 ); return extension.equals( "kjb" ); }  }
JobFileListener implements FileListener { public boolean accepts( String fileName ) { if ( fileName == null || fileName.indexOf( '.' ) == -1 ) { return false; } String extension = fileName.substring( fileName.lastIndexOf( '.' ) + 1 ); return extension.equals( "kjb" ); }  boolean open( Node jobNode, String fname, boolean importfile ); boolean save( EngineMetaInterface meta, String fname, boolean export ); void syncMetaName( EngineMetaInterface meta, String name ); boolean accepts( String fileName ); boolean acceptsXml( String nodeName ); String[] getFileTypeDisplayNames( Locale locale ); String[] getSupportedExtensions(); String getRootNodeName(); }
JobFileListener implements FileListener { public boolean accepts( String fileName ) { if ( fileName == null || fileName.indexOf( '.' ) == -1 ) { return false; } String extension = fileName.substring( fileName.lastIndexOf( '.' ) + 1 ); return extension.equals( "kjb" ); }  boolean open( Node jobNode, String fname, boolean importfile ); boolean save( EngineMetaInterface meta, String fname, boolean export ); void syncMetaName( EngineMetaInterface meta, String name ); boolean accepts( String fileName ); boolean acceptsXml( String nodeName ); String[] getFileTypeDisplayNames( Locale locale ); String[] getSupportedExtensions(); String getRootNodeName();  }