/** * Creates a component view, where the scope of the view is the specified container. * * @param container the Container object representing the scope of the view * @param key the key for the view (must be unique) * @param description a description of the view * @return a ContainerView object * @throws IllegalArgumentException if the container is null or the key is not unique */ public ComponentView createComponentView(Container container, String key, String description) { assertThatTheContainerIsNotNull(container); assertThatTheViewKeyIsSpecifiedAndUnique(key); ComponentView view = new ComponentView(container, key, description); view.setViewSet(this); componentViews.add(view); return view; }
/** * Creates a dynamic view, where the scope is the specified container. The following * elements can be added to the resulting view: * * <ul> * <li>People</li> * <li>Software systems</li> * <li>Containers with the same parent software system as the specified container</li> * <li>Components within the specified container</li> * </ul> * * @param container the Container object representing the scope of the view * @param key the key for the view (must be unique) * @param description a description of the view * @return a DynamicView object * @throws IllegalArgumentException if the container is null or the key is not unique */ public DynamicView createDynamicView(Container container, String key, String description) { assertThatTheContainerIsNotNull(container); assertThatTheViewKeyIsSpecifiedAndUnique(key); DynamicView view = new DynamicView(container, key, description); view.setViewSet(this); dynamicViews.add(view); return view; }