Package com.structurizr.view
Class View
java.lang.Object
com.structurizr.view.View
- All Implemented Interfaces:
PropertyHolder
- Direct Known Subclasses:
FilteredView
,ImageView
,ModelView
The superclass for all views.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, String value) Adds a name-value pair property to this view.Gets the description of this view.getKey()
Gets the identifier for this view.abstract String
getName()
Gets the (computed) name of this view.int
getOrder()
Gets the order of this view.Gets the collection of name-value property pairs associated with this view, as a Map.getTitle()
Gets the title of this view, if one has been set.Gets the view set that this view belongs to.void
setDescription
(String description) void
Sets the title for this view.
-
Method Details
-
getDescription
Gets the description of this view.- Returns:
- the description, as a String
-
setDescription
-
getKey
Gets the identifier for this view.- Returns:
- the identifier, as a String
-
getOrder
public int getOrder()Gets the order of this view.- Returns:
- a positive integer
-
getTitle
Gets the title of this view, if one has been set.- Returns:
- the title, as a String
-
setTitle
Sets the title for this view.- Parameters:
title
- the title, as a String
-
getName
Gets the (computed) name of this view.- Returns:
- the name, as a String
-
getViewSet
Gets the view set that this view belongs to.- Returns:
- a ViewSet object
-
getProperties
Gets the collection of name-value property pairs associated with this view, as a Map.- Specified by:
getProperties
in interfacePropertyHolder
- Returns:
- a Map (String, String) (empty if there are no properties)
-
addProperty
Adds a name-value pair property to this view.- Specified by:
addProperty
in interfacePropertyHolder
- Parameters:
name
- the name of the propertyvalue
- the value of the property
-