@Test public void testPopulate() throws Exception { Map<String, Object> properties = new HashMap<>(); properties.put( "displayName", NAME ); properties.put( "showHiddenFolders", true ); properties.put( "description", DESCRIPTION ); properties.put( "location", THIS_IS_THE_PATH ); properties.put( "doNotModify", true ); properties.put( "isDefault", true ); kettleFileRepositoryMeta.populate( properties, repositoriesMeta ); assertEquals( NAME, kettleFileRepositoryMeta.getName() ); assertEquals( true, kettleFileRepositoryMeta.isHidingHiddenFiles() ); assertEquals( DESCRIPTION, kettleFileRepositoryMeta.getDescription() ); assertEquals( THIS_IS_THE_PATH, kettleFileRepositoryMeta.getBaseDirectory() ); assertEquals( true, kettleFileRepositoryMeta.isReadOnly() ); assertEquals( true, kettleFileRepositoryMeta.isDefault() ); }
@Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) { super.populate( properties, repositoriesMeta ); Boolean showHiddenFolders = (Boolean) properties.get( SHOW_HIDDEN_FOLDERS ); String location = (String) properties.get( LOCATION ); Boolean doNotModify = (Boolean) properties.get( DO_NOT_MODIFY ); setHidingHiddenFiles( showHiddenFolders ); setBaseDirectory( location ); setReadOnly( doNotModify ); }
KettleFileRepositoryMeta extends BaseRepositoryMeta implements RepositoryMeta { @Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) { super.populate( properties, repositoriesMeta ); Boolean showHiddenFolders = (Boolean) properties.get( SHOW_HIDDEN_FOLDERS ); String location = (String) properties.get( LOCATION ); Boolean doNotModify = (Boolean) properties.get( DO_NOT_MODIFY ); setHidingHiddenFiles( showHiddenFolders ); setBaseDirectory( location ); setReadOnly( doNotModify ); } }
KettleFileRepositoryMeta extends BaseRepositoryMeta implements RepositoryMeta { @Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) { super.populate( properties, repositoriesMeta ); Boolean showHiddenFolders = (Boolean) properties.get( SHOW_HIDDEN_FOLDERS ); String location = (String) properties.get( LOCATION ); Boolean doNotModify = (Boolean) properties.get( DO_NOT_MODIFY ); setHidingHiddenFiles( showHiddenFolders ); setBaseDirectory( location ); setReadOnly( doNotModify ); } KettleFileRepositoryMeta();  KettleFileRepositoryMeta( String id, String name, String description, String baseDirectory ); }
KettleFileRepositoryMeta extends BaseRepositoryMeta implements RepositoryMeta { @Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) { super.populate( properties, repositoriesMeta ); Boolean showHiddenFolders = (Boolean) properties.get( SHOW_HIDDEN_FOLDERS ); String location = (String) properties.get( LOCATION ); Boolean doNotModify = (Boolean) properties.get( DO_NOT_MODIFY ); setHidingHiddenFiles( showHiddenFolders ); setBaseDirectory( location ); setReadOnly( doNotModify ); } KettleFileRepositoryMeta();  KettleFileRepositoryMeta( String id, String name, String description, String baseDirectory ); RepositoryCapabilities getRepositoryCapabilities(); String getXML(); void loadXML( Node repnode, List<DatabaseMeta> databases ); String getBaseDirectory(); void setBaseDirectory( String baseDirectory ); boolean isReadOnly(); void setReadOnly( boolean readOnly ); RepositoryMeta clone(); @Override void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ); @SuppressWarnings( "unchecked" ) @Override JSONObject toJSONObject(); boolean isHidingHiddenFiles(); void setHidingHiddenFiles( boolean hidingHiddenFiles ); }
KettleFileRepositoryMeta extends BaseRepositoryMeta implements RepositoryMeta { @Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) { super.populate( properties, repositoriesMeta ); Boolean showHiddenFolders = (Boolean) properties.get( SHOW_HIDDEN_FOLDERS ); String location = (String) properties.get( LOCATION ); Boolean doNotModify = (Boolean) properties.get( DO_NOT_MODIFY ); setHidingHiddenFiles( showHiddenFolders ); setBaseDirectory( location ); setReadOnly( doNotModify ); } KettleFileRepositoryMeta();  KettleFileRepositoryMeta( String id, String name, String description, String baseDirectory ); RepositoryCapabilities getRepositoryCapabilities(); String getXML(); void loadXML( Node repnode, List<DatabaseMeta> databases ); String getBaseDirectory(); void setBaseDirectory( String baseDirectory ); boolean isReadOnly(); void setReadOnly( boolean readOnly ); RepositoryMeta clone(); @Override void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ); @SuppressWarnings( "unchecked" ) @Override JSONObject toJSONObject(); boolean isHidingHiddenFiles(); void setHidingHiddenFiles( boolean hidingHiddenFiles ); static final String SHOW_HIDDEN_FOLDERS; static final String LOCATION; static final String DO_NOT_MODIFY; static String REPOSITORY_TYPE_ID; }