com.structurizr.model.Location Java Examples
The following examples show how to use
com.structurizr.model.Location.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Personas.java From structurizr-extensions with Apache License 2.0 | 5 votes |
@Autowired public Personas(Model model) { admin = model.addPerson(Location.Internal, "Admin", "the administrator of our system"); admin.addTags(Tags.PERSON); customer = model.addPerson(Location.External, "Customer", "a customer who wants to buy items in our shop"); customer.addTags(Tags.PERSON); }
Example #2
Source File: WebShop.java From structurizr-extensions with Apache License 2.0 | 5 votes |
@Autowired public WebShop(Model model, Personas personas, Sap sap) { webShop = model.addSoftwareSystem(Location.Internal, "WebShop", "Web-based application to buy our products"); final Container webServer = webShop.addContainer("WebShop", "The web application of the web shop", "Tomcat"); personas.getCustomer().uses(webServer, "Buys products", "Browser"); personas.getAdmin().uses(webServer, "enters new products", "Browser"); webServer.uses(sap.getSap(), "places orders", "WebService"); }
Example #3
Source File: ElementViewTests.java From java with Apache License 2.0 | 5 votes |
@Test public void test_copyLayoutInformationFrom_CopiesXAndY_WhenANonNullElementViewIsPassed() { Element element = model.addSoftwareSystem(Location.External, "SystemA", ""); ElementView elementView1 = new ElementView(element); assertEquals(0, elementView1.getX()); assertEquals(0, elementView1.getY()); ElementView elementView2 = new ElementView(element); elementView2.setX(123); elementView2.setY(456); elementView1.copyLayoutInformationFrom(elementView2); assertEquals(123, elementView1.getX()); assertEquals(456, elementView1.getY()); }
Example #4
Source File: Sap.java From structurizr-extensions with Apache License 2.0 | 4 votes |
@Autowired public Sap(Model model) { sap = model.addSoftwareSystem(Location.External, "SAP", ""); }
Example #5
Source File: ElementViewTests.java From java with Apache License 2.0 | 4 votes |
@Test public void test_copyLayoutInformationFrom_DoesNothing_WhenNullIsPassed() { Element element = model.addSoftwareSystem(Location.External, "SystemA", ""); ElementView elementView = new ElementView(element); elementView.copyLayoutInformationFrom(null); }