KarafBoot implements IPentahoSystemListener { protected String translateToExtraKettleEtc( KettleClientEnvironment.ClientType clientType ) { if ( clientType != null ) { switch ( clientType ) { case SPOON: case PAN: case KITCHEN: case CARTE: case SCALE: case OTHER: return "/etc-" + clientType.getID().toLowerCase(); } } return "/etc-default"; }  @Override boolean startup( IPentahoSession session ); @Override void shutdown(); static final String CLEAN_KARAF_CACHE; static final String PENTAHO_KARAF_ROOT_COPY_DEST_FOLDER; static final String PENTAHO_KARAF_ROOT_TRANSIENT; static final String PENTAHO_KARAF_ROOT_TRANSIENT_DIRECTORY_ATTEMPTS; static final String PENTAHO_KARAF_ROOT_COPY_FOLDER_SYMLINK_FILES; static final String PENTAHO_KARAF_ROOT_COPY_FOLDER_EXCLUDE_FILES; static final String ORG_OSGI_FRAMEWORK_SYSTEM_PACKAGES_EXTRA; static final String PENTAHO_KARAF_INSTANCE_RESOLVER_CLASS; }
@Test public void testBuildExtraKettleEtc() throws Exception { assertEquals( "/etc-carte", boot.translateToExtraKettleEtc( KettleClientEnvironment.ClientType.CARTE ) ); assertEquals( "/etc-default", boot.translateToExtraKettleEtc( KettleClientEnvironment.ClientType.DI_SERVER ) ); assertEquals( "/etc-kitchen", boot.translateToExtraKettleEtc( KettleClientEnvironment.ClientType.KITCHEN ) ); assertEquals( "/etc-pan", boot.translateToExtraKettleEtc( KettleClientEnvironment.ClientType.PAN ) ); assertEquals( "/etc-spoon", boot.translateToExtraKettleEtc( KettleClientEnvironment.ClientType.SPOON ) ); assertEquals( "/etc-default", boot.translateToExtraKettleEtc( null ) ); }