Tabnine Logo
ViewSet.copyLayoutInformationFrom
Code IndexAdd Tabnine to your IDE (free)

How to use
copyLayoutInformationFrom
method
in
com.structurizr.view.ViewSet

Best Java code snippets using com.structurizr.view.ViewSet.copyLayoutInformationFrom (Showing top 17 results out of 315)

origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoDeploymentViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  DeploymentNode deploymentNode2 = workspace2.getModel().getDeploymentNodeWithName("Deployment Node");
  DeploymentView view2 = workspace2.getViews().createDeploymentView("key", "Description");
  view2.add(deploymentNode2);
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().getX()); // default
  assertEquals(0, view2.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().getY()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenTheDeploymentViewKeysMatch() {
  Workspace workspace1 = createWorkspace();
  DeploymentNode deploymentNode1 = workspace1.getModel().getDeploymentNodeWithName("Deployment Node");
  DeploymentView view1 = workspace1.getViews().createDeploymentView("key", "Description");
  view1.add(deploymentNode1);
  view1.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().setX(100);
  view1.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().setY(200);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  DeploymentNode deploymentNode2 = workspace2.getModel().getDeploymentNodeWithName("Deployment Node");
  DeploymentView view2 = workspace2.getViews().createDeploymentView("key", "Description");
  view2.add(deploymentNode2);
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().getX());
  assertEquals(200, view2.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().getY());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

Workspace remoteWorkspace = getWorkspace(workspaceId);
if (remoteWorkspace != null) {
  workspace.getViews().copyLayoutInformationFrom(remoteWorkspace.getViews());
  workspace.getViews().getConfiguration().copyConfigurationFrom(remoteWorkspace.getViews().getConfiguration());
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoSystemContextViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view2 = workspace2.getViews().createSystemContextView(softwareSystem2, "context", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().iterator().next().getX()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoContainerViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  ContainerView view2 = workspace2.getViews().createContainerView(softwareSystem2, "containers", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().iterator().next().getX()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoSystemLandscapeViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemLandscapeView view2 = workspace2.getViews().createSystemLandscapeView("landscape", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().iterator().next().getX()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoComponentViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  Container container2 = workspace2.getModel().getSoftwareSystemWithName("Software System").getContainerWithName("Container");
  ComponentView view2 = workspace2.getViews().createComponentView(container2, "components", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().iterator().next().getX()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoDynamicViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  Person person2 = workspace2.getModel().getPersonWithName("Person");
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  DynamicView view2 = workspace2.getViews().createDynamicView("context", "Description");
  view2.add(person2, softwareSystem2);
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().iterator().next().getX()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenTheSystemLandscapeViewKeysMatch() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  SystemLandscapeView view1 = workspace1.getViews().createSystemLandscapeView("landscape", "Description");
  view1.addAllElements();
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemLandscapeView view2 = workspace2.getViews().createSystemLandscapeView("context", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenTheSystemContextViewKeysMatch() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view1 = workspace1.getViews().createSystemContextView(softwareSystem1, "context", "Description");
  view1.addAllElements();
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view2 = workspace2.getViews().createSystemContextView(softwareSystem2, "context", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenTheContainerViewKeysMatch() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  ContainerView view1 = workspace1.getViews().createContainerView(softwareSystem1, "containers", "Description");
  view1.addAllElements();
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  ContainerView view2 = workspace2.getViews().createContainerView(softwareSystem2, "containers", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenAViewKeyHasBeenIntroduced() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view1 = workspace1.getViews().createSystemContextView(softwareSystem1, "context", "Description");
  view1.setKey(null); // this simulates views created by previous versions of the client library
  view1.addAllElements();
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view2 = workspace2.getViews().createSystemContextView(softwareSystem2, "context", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenTheComponentViewKeysMatch() {
  Workspace workspace1 = createWorkspace();
  Container container1 = workspace1.getModel().getSoftwareSystemWithName("Software System").getContainerWithName("Container");
  ComponentView view1 = workspace1.getViews().createComponentView(container1, "containers", "Description");
  view1.addAllElements();
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  Container container2 = workspace2.getModel().getSoftwareSystemWithName("Software System").getContainerWithName("Container");
  ComponentView view2 = workspace2.getViews().createComponentView(container2, "containers", "Description");
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenAViewKeyIsNotSetButTheViewTitlesMatch() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view1 = workspace1.getViews().createSystemContextView(softwareSystem1, "context", "Description");
  view1.setKey(null); // this simulates views created by previous versions of the client library
  view1.addAllElements();
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view2 = workspace2.getViews().createSystemContextView(softwareSystem2, "context", "Description");
  view2.setKey(null); // this simulates views created by previous versions of the client library
  view2.addAllElements();
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_WhenTheDynamicViewKeysMatch() {
  Workspace workspace1 = createWorkspace();
  Person person1 = workspace1.getModel().getPersonWithName("Person");
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  DynamicView view1 = workspace1.getViews().createDynamicView("context", "Description");
  view1.add(person1, softwareSystem1);
  view1.getElements().iterator().next().setX(100);
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  Person person2 = workspace2.getModel().getPersonWithName("Person");
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  DynamicView view2 = workspace2.getViews().createDynamicView("context", "Description");
  view2.add(person2, softwareSystem2);
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(100, view2.getElements().iterator().next().getX());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_CopiesThePaperSize_WhenThePaperSizeIsNotSet() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view1 = workspace1.getViews().createSystemContextView(softwareSystem1, "context", "Description");
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view2 = workspace2.getViews().createSystemContextView(softwareSystem2, "context", "Description");
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(PaperSize.A3_Landscape, view2.getPaperSize());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_IgnoresThePaperSize_WhenThePaperSizeIsSet() {
  Workspace workspace1 = createWorkspace();
  SoftwareSystem softwareSystem1 = workspace1.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view1 = workspace1.getViews().createSystemContextView(softwareSystem1, "context", "Description");
  view1.setPaperSize(PaperSize.A3_Landscape);
  Workspace workspace2 = createWorkspace();
  SoftwareSystem softwareSystem2 = workspace2.getModel().getSoftwareSystemWithName("Software System");
  SystemContextView view2 = workspace2.getViews().createSystemContextView(softwareSystem2, "context", "Description");
  view2.setPaperSize(PaperSize.A5_Portrait);
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(PaperSize.A5_Portrait, view2.getPaperSize());
}
com.structurizr.viewViewSetcopyLayoutInformationFrom

Popular methods of ViewSet

  • getConfiguration
    Gets the configuration object associated with this set of views.
  • getSystemContextViews
    Gets the set of system context views.
  • getSystemLandscapeViews
    Gets the set of system landscape views.
  • createComponentView
    Creates a component view, where the scope of the view is the specified container.
  • createDynamicView
    Creates a dynamic view.
  • createSystemContextView
    Creates a system context view, where the scope of the view is the specified software system.
  • createSystemLandscapeView
    Creates a system landscape view.
  • getComponentViews
    Gets the set of component views.
  • getContainerViews
    Gets the set of container views.
  • getDynamicViews
    Gets the set of dynamic views.
  • createContainerView
    Creates a container view, where the scope of the view is the specified software system.
  • createDeploymentView
    Creates a deployment view.
  • createContainerView,
  • createDeploymentView,
  • getDeploymentViews,
  • createFilteredView,
  • assertThatTheContainerIsNotNull,
  • assertThatTheSoftwareSystemIsNotNull,
  • assertThatTheViewIsNotNull,
  • assertThatTheViewKeyIsSpecifiedAndUnique,
  • findView

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now