public final class ItemScope extends Object
An instance of ItemScope
is obtained using ReaderScope.getItemScope(String)
on a specific item.
This descriptor can be used to:
Below is a snippet illustrating the various configurations:
ReaderScope scope = new ReaderScope(); // request to read all data of a module at once scope.getItemScope("/MyFolder/MyModule").setMode(ItemScopeMode.COMPLETE); // request to exclude a folder scope.getItemScope("/MyFolder/FolderToExclude").setMode(ItemScopeMode.EXCLUDE); // when this module is read on-demand, load the specified baseline and not the current state of the module scope.getItemScope("/MyFolder/SecondModule").setBaseline(new BaselineDescriptor(3, 2)); // use "myView" when reading this module scope.getItemScope("/MyFolder/ThirdModule").setViewName("myView"); Map<String, Object> options = new HashMap<String, Object>(); options.put(Common.OPTION_SCOPE, scope); myModel.read("Application", "", options).
This class is not intended to be subclassed by clients. Use ReaderScope.getItemScope(String)
to get an instance
ReaderScope.getItemScope(String)
,
DoorsReader
Modifier and Type | Method and Description |
---|---|
BaselineDescriptor |
getBaseline()
Returns the baseline descriptor, if any.
|
Filter |
getFilter()
Returns the filter associated with this module, if any.
|
String |
getId()
Returns the identifier of the item, which can either be its full path,
its DOORS unique ID or its DOORS URL.
|
ItemScopeMode |
getMode()
Returns the mode used to read the item data.
|
String |
getViewName()
Returns the name of the view which must be used when reading a module content, if any.
|
void |
setBaseline(BaselineDescriptor baseline)
Changes the baseline descriptor.
|
void |
setFilter(Filter filter)
Assigns a new dynamic filter to this formal module.
|
void |
setMode(ItemScopeMode mode)
Changes the mode used to read the item data.
|
void |
setViewName(String viewName)
Changes the view which must be used when reading a module content.
|
public String getId()
public ItemScopeMode getMode()
ItemScopeMode.ONDEMAND
.public void setMode(ItemScopeMode mode)
mode
- the new mode.public String getViewName()
null
if not set.public void setViewName(String viewName)
Important note: a specific view cannot be used when reading a baseline.
viewName
- the name of the view which must be used when reading a module content
(can also be ""
or "Standard view"
).public BaselineDescriptor getBaseline()
null
if not set.public void setBaseline(BaselineDescriptor baseline)
Important note: a specific view cannot be used when reading a baseline.
baseline
- the new descriptor.public Filter getFilter()
null
if none.setFilter(Filter)
public void setFilter(Filter filter)
filter
- the new dynamic filter assigned to this module.