@SuppressWarnings("unchecked")
public void bootstrapIsis(final String configDirectory, final DeploymentType deploymentType) {
this.configDirectory = configDirectory;
this.deploymentType = ensureThatArg(deploymentType, is(anyOf(equalTo(DeploymentType.EXPLORATION), equalTo(DeploymentType.PROTOTYPE))));
final IsisConfigurationBuilderFileSystem configurationBuilder = new IsisConfigurationBuilderFileSystem(getConfigDirectory());
configurationBuilder.add(SystemConstants.DEPLOYMENT_TYPE_KEY, deploymentType.name());
defaultStoryComponentsInto(configurationBuilder);
getAliasRegistry().clear();
try {