Interface FeatureModel


public interface FeatureModel
Interface representing the content model of a content transport feature. Provides means to 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 and optional references. A feature is transportable although it has missing essential references but during installing the feature 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 in target project will cause the feature to be not installable. In contrast missing optional references which couldn't be mapped will cause warnings but the feature will stay installable.

Since:
5.0.111
See Also:
  • Method Details

    • add

      boolean add(IDProvider elementToAdd)
      Adds the given element to this feature model. Pass a dataset provided by Content2.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 already contained the element, false is returned.
      Since:
      5.0.111
      See Also:
    • add

      boolean add(Collection<IDProvider> elementsToAdd)
      Adds the given elements collection to this feature model. Pass datasets provided by Content2.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 model already contained all elements, false is returned.
      Since:
      5.0.111
      See Also:
    • remove

      boolean remove(IDProvider toRemove)
      Removes the given element from this feature model. Pass a dataset provided by Content2.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 not contain the element, false is returned.
      Since:
      5.0.111
      See Also:
    • getStoreNodes

      @NotNull @NotNull Map<Store.Type,Collection<IDProvider>> getStoreNodes()
      Returns all store nodes contained in this feature model as an unmodifiable mapping from store 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 via add(IDProvider) or remove(IDProvider) will not affect the returned map.
      Since:
      5.0.111
      See Also:
    • getDataRecords

      @NotNull @NotNull Map<Schema,Map<EntityType,Collection<Dataset>>> getDataRecords()
      Returns all data 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 via add(Dataset) or remove(Dataset) will not affect the returned map.
      Since:
      5.0.111
      See Also:
    • getMissingReferences

      Returns all missing references of this feature model existing at time calling this method. The returned pair contains missing essential references as key and missing optional references as value.
      Since:
      5.0.111
    • configurePropertiesTransport

      PropertiesTransportOptions configurePropertiesTransport() throws SecurityException
      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 for project 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