throw new IllegalArgumentException("Invalid entity type: " + type);
}
}
public void setup() throws Exception {
ConfigurationStore store = ConfigurationStore.get();
for (EntityType type : EntityType.values()) {
for (String name : store.getEntities(type)) {
store.remove(type, name);
}
}
storeEntity(EntityType.CLUSTER, "testCluster");
storeEntity(EntityType.PROCESS, "sample");
storeEntity(EntityType.FEED, "raw-logs");
storeEntity(EntityType.FEED, "clicks");
Unmarshaller unmarshaller = EntityType.PROCESS.getUnmarshaller();
Process process = (Process) unmarshaller.unmarshal(this.getClass().getResource(PROCESS_XML2));
process.setName("sample2");
store.publish(EntityType.PROCESS, process);
}