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

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

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

origin: structurizr/java

@Test
public void test_createFilteredView_ThrowsAnException_WhenADuplicateKeyIsUsed() {
  Workspace workspace = new Workspace("Name", "Description");
  SystemLandscapeView view = workspace.getViews().createSystemLandscapeView("systemLandscape", "Description");
  workspace.getViews().createFilteredView(view, "filtered", "Description", FilterMode.Include, "tag1", "tag2");
  try {
    workspace.getViews().createFilteredView(view, "filtered", "Description", FilterMode.Include, "tag1", "tag2");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A view with the key filtered already exists.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createFilteredView_ThrowsAnException_WhenANullViewIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    workspace.getViews().createFilteredView(null, "key", "Description", FilterMode.Include, "tag1", "tag2");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A view must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createFilteredView_ThrowsAnException_WhenANullKeyIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    SystemLandscapeView view = workspace.getViews().createSystemLandscapeView("systemLandscape", "Description");
    workspace.getViews().createFilteredView(view, null, "Description", FilterMode.Include, "tag1", "tag2");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A key must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createFilteredView_ThrowsAnException_WhenAnEmptyKeyIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    SystemLandscapeView view = workspace.getViews().createSystemLandscapeView("systemLandscape", "Description");
    workspace.getViews().createFilteredView(view, " ", "Description", FilterMode.Include, "tag1", "tag2");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A key must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createFilteredView() {
  Workspace workspace = new Workspace("Name", "Description");
  SystemLandscapeView view = workspace.getViews().createSystemLandscapeView("systemLandscape", "Description");
  FilteredView filteredView = workspace.getViews().createFilteredView(view, "key", "Description", FilterMode.Include, "tag1", "tag2");
  assertEquals("key", filteredView.getKey());
  assertEquals("Description", filteredView.getDescription());
  assertEquals(FilterMode.Include, filteredView.getMode());
  assertEquals(2, filteredView.getTags().size());
  assertTrue(filteredView.getTags().contains("tag1"));
  assertTrue(filteredView.getTags().contains("tag2"));
}
origin: structurizr/java

public static void main(String[] args) throws Exception {
  Workspace workspace = new Workspace("Filtered Views", "An example of using filtered views.");
  Model model = workspace.getModel();
  Person user = model.addPerson("User", "A description of the user.");
  SoftwareSystem softwareSystemA = model.addSoftwareSystem("Software System A", "A description of software system A.");
  SoftwareSystem softwareSystemB = model.addSoftwareSystem("Software System B", "A description of software system B.");
  softwareSystemB.addTags(FUTURE_STATE);
  user.uses(softwareSystemA, "Uses for tasks 1 and 2").addTags(CURRENT_STATE);
  user.uses(softwareSystemA, "Uses for task 1").addTags(FUTURE_STATE);
  user.uses(softwareSystemB, "Uses for task 2").addTags(FUTURE_STATE);
  ViewSet views = workspace.getViews();
  SystemLandscapeView systemLandscapeView = views.createSystemLandscapeView("SystemLandscape", "An example System Landscape diagram.");
  systemLandscapeView.addAllElements();
  views.createFilteredView(systemLandscapeView, "CurrentState", "The current system landscape.", FilterMode.Exclude, FUTURE_STATE);
  views.createFilteredView(systemLandscapeView, "FutureState", "The future state system landscape after Software System B is live.", FilterMode.Exclude, CURRENT_STATE);
  Styles styles = views.getConfiguration().getStyles();
  styles.addElementStyle(Tags.ELEMENT).color("#ffffff");
  styles.addElementStyle(Tags.SOFTWARE_SYSTEM).background("#91a437").shape(Shape.RoundedBox);
  styles.addElementStyle(Tags.PERSON).background("#6a7b15").shape(Shape.Person);
  StructurizrClient structurizrClient = new StructurizrClient(API_KEY, API_SECRET);
  structurizrClient.putWorkspace(WORKSPACE_ID, workspace);
}
origin: structurizr/java

@Test
public void test_construction() {
  SoftwareSystem softwareSystem = model.addSoftwareSystem("Name", "Description");
  SystemContextView systemContextView = views.createSystemContextView(softwareSystem, "SystemContext", "Description");
  FilteredView filteredView = views.createFilteredView(
      systemContextView,
      "CurrentStateSystemContext",
      "The system context as-is.",
      FilterMode.Exclude,
      "v2", "v3"
  );
  assertEquals("CurrentStateSystemContext", filteredView.getKey());
  assertEquals("SystemContext", filteredView.getBaseViewKey());
  assertSame(systemContextView, filteredView.getView());
  assertEquals("The system context as-is.", filteredView.getDescription());
  assertEquals(FilterMode.Exclude, filteredView.getMode());
  assertEquals(2, filteredView.getTags().size());
  assertTrue(filteredView.getTags().contains("v2"));
  assertTrue(filteredView.getTags().contains("v3"));
}
com.structurizr.viewViewSetcreateFilteredView

Javadoc

Creates a FilteredView on top of an existing static view.

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,
  • copyLayoutInformationFrom,
  • assertThatTheContainerIsNotNull,
  • assertThatTheSoftwareSystemIsNotNull,
  • assertThatTheViewIsNotNull,
  • assertThatTheViewKeyIsSpecifiedAndUnique,
  • findView

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • CodeWhisperer alternatives
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