Skip to content

Instantly share code, notes, and snippets.

@simonbrowndotje
Created June 24, 2014 19:00
Show Gist options
  • Save simonbrowndotje/1745131bccf928a7c53c to your computer and use it in GitHub Desktop.
Save simonbrowndotje/1745131bccf928a7c53c to your computer and use it in GitHub Desktop.
Model model = ...
SoftwareSystem techTribes = model.getSoftwareSystemWithName("techtribes.je");
Container contentUpdater = techTribes.getContainerWithName("Content Updater");
// context view
ContextView contextView = model.createContextView(techTribes);
contextView.addAllSoftwareSystems();
contextView.addAllPeople();
// container view
ContainerView containerView = model.createContainerView(techTribes);
containerView.addAllSoftwareSystems();
containerView.addAllPeople();
containerView.addAllContainers();
// component view for the content updater container
ComponentView componentView = model.createComponentView(techTribes, contentUpdater);
componentView.addAllSoftwareSystems();
componentView.addAllContainers();
componentView.addAllComponents();
// let's exclude the logging component as it's used by everything
componentView.remove(contentUpdater.getComponentWithName("LoggingComponent"));
componentView.removeElementsWithNoRelationships();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment