Interface Subscription


@NonExtendable public interface Subscription
This interface provides methods to handle the subscription to a corporate-content package.
Since:
3.1.158
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    Defines the mode automatic.
    static final byte
    Defines the mode manual.
    static final byte
    Defines the release mode automatic.
    static final byte
    Defines the release mode workflow.
    static final byte
    Strategy for update conflicts (the local copy and the original have been modified): .
    static final byte
    Strategy for update conflicts (the local copy and the original have been modified): An error is reported and the update / import process is cancelled.
    static final byte
    Strategy for update conflicts (the local copy and the original have been modified): Override local changes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 5.0.101 - no replacement
    boolean
    Deletes this subscription.
    void
    excludeNode(IDProvider storeElement)
    Excludes the given storeelement from the list of nodes which will be imported from the package.
    byte
    The conflict mode defines a strategy to handle conflicts which occurs during the import of this subscription.
    A conflict occurs, when the local copy and the source of a subscribed element both have been changed since the last update of the subscription.
    @NotNull IdTranslator
    Provides a translator between element IDs from the publisher project to the subscriber project.
    Returns a read-only list of StoreElement's which are excluded from the list of startnodes in the belonging Package of this subscription.
    @Nullable Calendar
    Returns the date of the last import.
    Returns the import log file of the last import of this subscription or null if no import log file exists.
    Returns the package this subscription is belonging to
    int
    Gets the version number of the last imported package version or -1 if nothing has been imported yet
    Gets the publish group of this subscription.
    byte
    Gets the release mode of this subscription.
    RELEASE_MODE_AUTO (default) : all nodes which were updated or created during the import of this subscription will be released automatically.
    RELEASE_MODE_WORKFLOW : after the import of this subscription the defined release workflow (setWorkflow(byte, Workflow)) will be started.
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 5.0.101 - no replacement
    @Nullable Project
    Returns the subscriber Project of this subscription.
    The update of this subscription will be imported into the subscriber project.
    @NotNull IdTranslator
    Provides a translator between template IDs from the publisher project to the subscriber project.
    byte
    Gets the update mode of this subscription.
    If the update mode is MODE_AUTOMATIC (default) the import of this subscription will start automatically as soon as a new version of the belonging Package is available.
    In MODE_MANUAL mode the import has to be started manually.
    getWorkflow(byte type)
    Gets the workflow defined for the given event type.
    getWorkflowName(byte type)
    Gets the name of the workflow which is mapped to the given event type.
    boolean
    Returns true if an error occurred during the import of the last PackageVersion
    void
    includeNode(IDProvider storeElement)
    Includes the given storeelement to the list of nodes which will be imported from the package.
    boolean
    Returns true if this subscription is active, false otherwise
    If the subscription is inactive the update will not be processed.
    boolean
    The changeable flag indicates if the nodes containing in the Package which is subscribed by this subscription, are changeable (true) in the subscriber Project or not (false).
    boolean
    Returns true if the Package subscribed by this Subscription has 'no' newer PackageVersion as the last imported PackageVersion in the subscriber-project of this Subscription
    void
    Executes the import of this subscription.
    The last PackageVersion existing in the underlying Package will be imported.
    void
    Refreshes this subscription with the subcription object from the server.
    Call to rollback changes
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 5.0.101 - no replacement
    void
    Call to this method makes all changes to this subscription persistent on the server.
    void
    setActive(boolean activate)
    Activates / Deactivates this subscription.
    void
    setChangeable(boolean changeable)
    Sets the changeable flag for this subscription.
    void
    setConflictMode(byte conflictMode)
    Sets the conflict mode for this subscription.
    void
    Sets the given publish group for this subscription
    void
    setReleaseMode(byte releaseMode)
    Sets the release mode for this subscription.
    void
    setUpdateMode(byte updateMode)
    Sets the update mode for this subscription.
    void
    setWorkflow(byte type, Workflow workflow)
    Sets the given workflow for the given event type.
  • Field Details

  • Method Details

    • getPublishGroup

      PublishGroup getPublishGroup()
      Gets the publish group of this subscription.

      During the update the latest PackageVersion existing in the subscribed Package, which is published for the returned publish group, is imported.

      Returns:
      PublishGroup the publish group of this subscription
      Since:
      3.1.158
    • setPublishGroup

      void setPublishGroup(PublishGroup value)
      Sets the given publish group for this subscription
      Parameters:
      value -
      Since:
      3.1.158
    • getPackage

      Package getPackage()
      Returns the package this subscription is belonging to
      Returns:
      Package the package of this subscription
      Since:
      3.1.158
    • getSubscriber

      @Nullable @Nullable Project getSubscriber()
      Returns the subscriber Project of this subscription.
      The update of this subscription will be imported into the subscriber project.
      Returns:
      Project the subscriber project of this subscription
      Since:
      3.1.158
    • getLastImport

      @Nullable @Nullable Calendar getLastImport()
      Returns the date of the last import.
      Returns:
      the date of the last import or null if nothing has been imported yet
      Since:
      3.1.158
    • getLastImportLogfile

      @Nullable @Nullable PackageImportLogfile getLastImportLogfile()
      Returns the import log file of the last import of this subscription or null if no import log file exists.
      Since:
      4.2.34
    • getPackageVersion

      int getPackageVersion()
      Gets the version number of the last imported package version or -1 if nothing has been imported yet
      Returns:
      the version of the last imported package version
      Since:
      3.1.158
      See Also:
    • isUptoDate

      boolean isUptoDate()
      Returns true if the Package subscribed by this Subscription has 'no' newer PackageVersion as the last imported PackageVersion in the subscriber-project of this Subscription
      Returns:
      boolean true if uptoDate, false otherwise
      Since:
      3.1.158
    • hasImportErrors

      boolean hasImportErrors()
      Returns true if an error occurred during the import of the last PackageVersion
      Returns:
      boolean true if an error occurred, false otherwise
      Since:
      3.1.158
    • isActive

      boolean isActive()
      Returns true if this subscription is active, false otherwise
      If the subscription is inactive the update will not be processed.
      Returns:
      true if this subscription is active false otherwise
      Since:
      3.1.158
    • setActive

      void setActive(boolean activate)
      Activates / Deactivates this subscription.
      Parameters:
      activate - true to activate, false to deactivate the subscription
      Since:
      3.1.158
    • isChangeable

      boolean isChangeable()
      The changeable flag indicates if the nodes containing in the Package which is subscribed by this subscription, are changeable (true) in the subscriber Project or not (false).
      Returns:
      true imported nodes are changeable, false - read-only
      Since:
      3.1.158
    • setChangeable

      void setChangeable(boolean changeable)
      Sets the changeable flag for this subscription.
      Parameters:
      changeable -
      Since:
      3.1.158
      See Also:
    • getSiteStoreVariablesToOverride

      @Deprecated(forRemoval=true) Collection<String> getSiteStoreVariablesToOverride()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 5.0.101 - no replacement
      Always provides an empty set.
      Returns:
      An empty set.
    • addSitestoreVariableToOverride

      @Deprecated(forRemoval=true) void addSitestoreVariableToOverride(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 5.0.101 - no replacement
      Does nothing.
      Parameters:
      name - A name.
    • removeSitestoreVariable

      @Deprecated(forRemoval=true) void removeSitestoreVariable(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 5.0.101 - no replacement
      Does nothing.
      Parameters:
      name - A name.
    • excludeNode

      void excludeNode(IDProvider storeElement)
      Excludes the given storeelement from the list of nodes which will be imported from the package. The given element must be from the master project and NOT from the subscriber.
      Parameters:
      storeElement - the element from master project respectively the element from the package
      Since:
      3.1.158
    • includeNode

      void includeNode(IDProvider storeElement)
      Includes the given storeelement to the list of nodes which will be imported from the package. The given element must be from the master project and NOT from the subscriber.
      Parameters:
      storeElement - the element from master project respectively the element from the package
      Since:
      3.1.158
    • getExclusionNodeList

      Collection<IDProvider> getExclusionNodeList()
      Returns a read-only list of StoreElement's which are excluded from the list of startnodes in the belonging Package of this subscription.
      Returns:
      a read-only List of StoreElement's
      Since:
      3.1.158
    • getUpdateMode

      byte getUpdateMode()
      Gets the update mode of this subscription.
      If the update mode is MODE_AUTOMATIC (default) the import of this subscription will start automatically as soon as a new version of the belonging Package is available.
      In MODE_MANUAL mode the import has to be started manually.
      Returns:
      MODE_AUTOMATIC or MODE_MANUAL
      Since:
      3.1.158
    • setUpdateMode

      void setUpdateMode(byte updateMode)
      Sets the update mode for this subscription.
      Parameters:
      updateMode - MODE_AUTOMATIC or MODE_MANUAL
      Since:
      3.1.158
      See Also:
    • getReleaseMode

      byte getReleaseMode()
      Gets the release mode of this subscription.
      RELEASE_MODE_AUTO (default) : all nodes which were updated or created during the import of this subscription will be released automatically.
      RELEASE_MODE_WORKFLOW : after the import of this subscription the defined release workflow (setWorkflow(byte, Workflow)) will be started.
      Returns:
      RELEASE_MODE_AUTO (default) or RELEASE_MODE_WORKFLOW
      Since:
      3.1.158
    • setReleaseMode

      void setReleaseMode(byte releaseMode)
      Sets the release mode for this subscription.
      Parameters:
      releaseMode - RELEASE_MODE_AUTO (default) or RELEASE_MODE_WORKFLOW
      Since:
      3.1.158
      See Also:
    • getConflictMode

      byte getConflictMode()
      The conflict mode defines a strategy to handle conflicts which occurs during the import of this subscription.
      A conflict occurs, when the local copy and the source of a subscribed element both have been changed since the last update of the subscription.
      Returns:
      STRATEGY_OVERRIDE (default), STRATEGY_ERROR, or STRATEGY_COPY
      Since:
      3.1.158
    • setConflictMode

      void setConflictMode(byte conflictMode)
      Sets the conflict mode for this subscription.
      Parameters:
      conflictMode - STRATEGY_OVERRIDE, STRATEGY_ERROR, or STRATEGY_COPY
      Since:
      3.1.158
      See Also:
    • getWorkflow

      Workflow getWorkflow(byte type)
      Gets the workflow defined for the given event type. The mapping event -> workflow is by default inherited from the subsribed Package. This mapping could be overridden by using setWorkflow(byte, Workflow)
      Parameters:
      type - Package.WF_OK, Package.WF_ERROR, Package.WF_CONFLICT, Package.WF_RELEASE, Package.WF_ACTUALIZE
      Returns:
      workflow the workflow which is mapped to the given type
      Since:
      3.1.158
    • getWorkflowName

      String getWorkflowName(byte type)
      Gets the name of the workflow which is mapped to the given event type.
      Parameters:
      type - Package.WF_OK, Package.WF_ERROR, Package.WF_CONFLICT, Package.WF_RELEASE, Package.WF_ACTUALIZE
      Returns:
      null if no workflow is defined for this type, else the node id of the workflow node
      Since:
      3.1.158
    • setWorkflow

      void setWorkflow(byte type, Workflow workflow)
      Sets the given workflow for the given event type.
      Parameters:
      type - Package.WF_OK, Package.WF_ERROR, Package.WF_CONFLICT, Package.WF_RELEASE, Package.WF_ACTUALIZE
      workflow -
      Since:
      3.1.158
    • pullImport

      void pullImport()
      Executes the import of this subscription.
      The last PackageVersion existing in the underlying Package will be imported.
      Throws:
      de.espirit.firstspirit.access.packagepool.NoPackageVersionExistingException - if no PackageVersion existing in belonging the Package which is released for the underlying PublishGroup
      Since:
      3.1.158
      See Also:
    • save

      void save()
      Call to this method makes all changes to this subscription persistent on the server.
      Since:
      3.1.158
    • delete

      boolean delete()
      Deletes this subscription.
      Returns:
      true if this subscription was successfully deleted, false otherwise
      Since:
      3.1.158
    • refresh

      void refresh()
      Refreshes this subscription with the subcription object from the server.
      Call to rollback changes
      Since:
      3.1.158
    • getElementIdTranslator

      @NotNull @NotNull IdTranslator getElementIdTranslator()
      Provides a translator between element IDs from the publisher project to the subscriber project. Reuse the provided IdTranslator for multiple id translation calls.
      Returns:
      The element ID translator.
      Since:
      5.1.504, 5.2.103
    • getTemplateIdTranslator

      @NotNull @NotNull IdTranslator getTemplateIdTranslator()
      Provides a translator between template IDs from the publisher project to the subscriber project. Reuse the provided IdTranslator for multiple id translation calls.
      Returns:
      The template ID translator.
      Since:
      5.1.504, 5.2.103