Codota Logo
ViewSet.createFilteredView
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onRequestPermissionsResult (Fragment)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now