Package com.orchestranetworks.userservice.declaration

# Interface ActivationContextOnDataspace

All Superinterfaces:
  `ActivationContext<DataspaceEntitySelection>`, `DataspaceSet`

public interface ActivationContextOnDataspace extends ActivationContext<DataspaceEntitySelection>, DataspaceSet
Provides a context to define the activation scope and permission rules for a user service being declared on a dataspace level. Refer to ActivationContext documentation for more information about the user service activation.

The maximum activation scope for this type of activation context is all dataspaces of the repository.

By default, the service is activated on all opened non-technical branches in the repository.

Since:
  5.8.0
See Also:
  - `UserServiceDeclaration.defineActivation(ActivationContext)`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.orchestranetworks.schema.types.dataspace.DataspaceSet

  `DataspaceSet.DataspaceChildrenPolicy, DataspaceSet.DataspaceType`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setActivationRule(ServiceActivationRuleForDataspace anActivationRule)`
  Activates the service using an advanced rule based on the current dataspace.

  ### Methods inherited from interface com.orchestranetworks.userservice.declaration.ActivationContext

  `getAvailableToolbarLocations, setDefaultPermission, setDisplayForAllLocations, setDisplayForLocations, setPermissionRule`

  ### Methods inherited from interface com.orchestranetworks.schema.types.dataspace.DataspaceSet

  `excludeDataspacesMatching, excludeDataspacesMatching, includeAllDataspaces, includeDataspacesMatching, includeDataspacesMatching, setIgnoreDataspacesDefaultExcludes`

- ## Method Details

  - ### setActivationRule

    void setActivationRule(ServiceActivationRuleForDataspace anActivationRule)
    Activates the service using an advanced rule based on the current dataspace.

    Deactivated user services are unavailable in the specified context, including in permission UI screens.

    When a service is activated dynamically for a given dataspace, the service default permission is set for all profiles in this dataspace (see `ActivationContext.setDefaultPermission(UserServicePermission)`).

    #### ServiceActivationRule Life cycle

    1. When the user service declaration is registered, the specified rule is instantiated.
    2. During the operational phase: the method `ServiceActivationRuleForDataspace.isAvailableFor(ServiceActivationRuleForDataspaceContext)` is called each time the associated service is potentially displayed or executed in a user interface session.