Interface FeatureModel
browse
and modify the feature content by adding
or removing
content objects ( IDProvider
or data records
. To persist modifications to this feature, call FeatureAgent.saveFeature(FeatureModel)
.
Missing References:
A feature model doesn't have to be enclosed. Therefore a feature can have missing references
. These references are differentiated in essential references
andoptional references
. A feature is transportable
although it has missing essential references
but during installing thefeature transport file to a target project
the different types of missing references will be important.Missing essential references
which couldn't be mapped to existing elements intarget project will cause the feature to be not installable. In contrast missing optional references
which couldn't be mapped will causewarnings but the feature will stay installable.
- Since:
- 5.0.111
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Definition of an feature reference referencing a dataset.static interface
Definition of an feature reference referencing a store node.static interface
FeatureModel.FeatureReference<T extends IDProvider>
Definition representing a feature reference.static enum
Type offeature references
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(IDProvider elementToAdd) Adds the given element to this feature model.boolean
add
(Collection<IDProvider> elementsToAdd) Adds the given elements collection to this feature model.Request a options object to configure global properties transport.@NotNull Map<Schema,
Map<EntityType, Collection<Dataset>>> Returns alldata records
contained in this feature model as an unmodifiable map.
The map represents a snapshot of the current model at time calling this method.Returns all missing references of this feature model existing at time calling this method.@NotNull Map<Store.Type,
Collection<IDProvider>> Returns all store nodes contained in this feature model as an unmodifiable mapping fromstore type
to a collection of IdProvider.boolean
remove
(IDProvider toRemove) Removes the given element from this feature model.
-
Method Details
-
add
Adds the given element to this feature model. Pass adataset
provided byContent2.getDataset(Entity)
to add a data record to this feature.- Parameters:
elementToAdd
- the element which should be added to the feature model- Returns:
true
if the model has been modified, i.e. when the element has been added. If the model alreadycontained the element,false
is returned.- Since:
- 5.0.111
- See Also:
-
add
Adds the given elements collection to this feature model. Passdatasets
provided byContent2.getDataset(Entity)
to add data records to this feature.- Parameters:
elementsToAdd
- the elements which should be added to the feature model- Returns:
true
if the model has been modified, i.e. when at least one element has been added. If the modelalready contained all elements,false
is returned.- Since:
- 5.0.111
- See Also:
-
remove
Removes the given element from this feature model. Pass adataset
provided byContent2.getDataset(Entity)
to remove a data record from this feature.- Parameters:
toRemove
- the element which should be removed- Returns:
true
if the model has been modified, i.e. when the element has been removed. If the model did notcontain the element,false
is returned.- Since:
- 5.0.111
- See Also:
-
getStoreNodes
Returns all store nodes contained in this feature model as an unmodifiable mapping fromstore type
to a collection of IdProvider. Returned map contains only start nodes, therefore all children of these nodes are part of the feature too.
The map represents a snapshot of the current model at time calling this method. Therefore modifications viaadd(IDProvider)
orremove(IDProvider)
will not affect the returned map.- Since:
- 5.0.111
- See Also:
-
getDataRecords
Returns alldata records
contained in this feature model as an unmodifiable map.
The map represents a snapshot of the current model at time calling this method. Therefore modifications viaadd(Dataset)
orremove(Dataset)
will not affect the returned map.- Since:
- 5.0.111
- See Also:
-
getMissingReferences
Pair<Collection<FeatureModel.FeatureReference<?>>,Collection<FeatureModel.FeatureReference<?>>> getMissingReferences()Returns all missing references of this feature model existing at time calling this method. The returned pair contains missing essential references askey
and missing optional references asvalue
.- Since:
- 5.0.111
-
configurePropertiesTransport
Request a options object to configure global properties transport. Global properties transport is deactivated by default, therefore it is necessary to call this method to activate it.
Attention: This method is only available forproject admins
. Will throw an security exception otherwise.- Returns:
- An options object to configure global properties export.
- Throws:
SecurityException
- if current user is no project admin of the belonging project- Since:
- 5.2.21
-