Interface ConfigurationInterface

The ConfigurationInterface is a configuration.

The DMU may feature a list of configurations. A configuration is created by the project maintainer and made available to all users. In order to ease the possible dynamic creation of configurations in the future versions of the API, the ConfigurationInterface object shows the same attributes (some are still stripped) as the configuration object created by the project maintainer.

The configuration system is explained in the configurations.

A configuration elects always the root part instance. Then each child instance is included in the configuration if :

  • it has no link documents attached to the parent/child relationship
  • or the link document satisfies the requirements in the [[getNeededEffectivities] AND does not satisfy the requirements in getExcludedEffectivities.

This algorithm is then recursively applied to all part instances to select a subset of all the part instances.

/** 
* Sample to illustrate the change of configuration in the ConfContextInterface.
*/
import { ConfContextInterface, DataSessionInterface, ConfigurationInterface } from 'generated/documentation/appinfiniteapi';

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;
// create a ConfContextInterface
const lConfContext : ConfContextInterface = lDataSession.createConfContext();
// retrieve the list of available configurations
const lActiveConfs : Array<ConfigurationInterface> = lDataSession.getConfigurationList();
// we will take the first ConfigurationInterface for this context
const lConfs : Array<string> = new Array<string>(1);
lConfs[0] = lActiveConfs[0].getConfigurationId();
console.log('Using the configuration ' + lActiveConfs[0].getName() + ' : ' + lActiveConfs[0].getDescription())
// set the active confs
lConfContext.setActiveConfs(lConfs);
// and ask to compute all changes requested since the last call to the DataSessionInterface
lDataSession.update();

Please refer to the Configuration System.
Metadata

Hierarchy

  • ConfigurationInterface

Methods

  • Gets the id of the configuration.

    The configuration id is used by the ConfContextInterface to set configurations (see setActiveConfs).

    Returns

    The configuration id of the configuration.

    Returns string

  • Gets the description of the configuration.

    The description is a short text explaining the configuration.

    Returns

    The description for the configuration.

    Returns string

  • Gets the requirements a link document must NOT satisfy in order to be included in the configuration.

    Each parent instance / child instance relationship decorated with a document that does not satisfy the getExcludedEffectivities will imply the child will be included in the configuration if the parent is itself inside the given configuration.

    DO NOT modify the returned EffectivitiesInterface.

    Returns

    const
    The list of requirements to dissatisfy for the given configuration.

    Returns EffectivitiesInterface

  • Gets the "GUI" name of the configuration (as created by the project maintainer).

    Returns

    The name of the configuration.

    Returns string

  • Gets the requirements a link document must satisfy in order to be included in the configuration.

    Each parent instance / child instance relationship decorated with a document that satisfies the getNeededEffectivities will imply the child will be included in the configuration if the parent is itself inside the given configuration.

    DO NOT modify the returned EffectivitiesInterface.

    Returns

    const
    The list of requirements to satisfy for the given configuration.

    Returns EffectivitiesInterface