Class IntegrationModel

java.lang.Object
com._1c.g5.v8.dt.supply.internal.integration.IntegrationModel

public class IntegrationModel extends Object
Integration model contains information on library objects to be integrated in the course of the library integration. Data are organized by top objects, each record contains full definition of the object/containments integration policies.
  • Constructor Details

    • IntegrationModel

      public IntegrationModel()
      Constructs an instance of the model.
  • Method Details

    • addModuleIntegrationPolicy

      public void addModuleIntegrationPolicy(String moduleFqn, ModuleIntegrationPolicy moduleIntegrationPolicy)
      Adds a new module integration policy to the model.
      Parameters:
      moduleFqn - The module FQN, cannot be null
      moduleIntegrationPolicy - The module integration policy model. Cannot be null
    • addObjectIntegrationPolicy

      public void addObjectIntegrationPolicy(String objectFqn, ObjectIntegrationPolicy objectIntegrationPolicy)
      Adds integration policy for the object to the model.
      Parameters:
      objectFqn - The object FQN, cannot be null
      moduleIntegrationPolicy - The object integration policy model. Cannot be null
    • addProtectedObjects

      public void addProtectedObjects(Set<String> protectedObjects)
      Adds the set of protected object FQNs to the model.
      Parameters:
      protectedObjects - The set of protected object FQNs. Cannot be null, can be empty
    • addSuppliedWithFilterTask

      public void addSuppliedWithFilterTask(String namespace, ContainmentIntegrationPolicy containmentIntegrationPolicy)
      Adds a task for post-filteing of the supplied content based on the 'supplied with' rule.
      Parameters:
      namespace - The namespace the filter is defined for. Cannot be null
      containmentIntegrationPolicy - The corresponding containment integraiton policy. Cannot be null
    • addSuppliedWithFilterTask

      public void addSuppliedWithFilterTask(String namespace, ObjectIntegrationPolicy objectIntegrationPolicy)
      Adds a task for post-filteing of the supplied content based on the 'supplied with' rule.
      Parameters:
      namespace - The namespace the filter is defined for. Cannot be null
      objectIntegrationPolicy - The corresponding object integraiton policy. Cannot be null
    • addSuppliedWithFilterTask

      public void addSuppliedWithFilterTask(String namespace, PropertyIntegrationPolicy propertyIntegrationPolicy)
      Adds a task for post-filteing of the supplied content based on the 'supplied with' rule.
      Parameters:
      namespace - The namespace the filter is defined for. Cannot be null
      propertyIntegrationPolicy - The corresponding property integraiton policy. Cannot be null
    • confirmNamespaceIntegration

      public void confirmNamespaceIntegration(String namespace)
      "Supply with" rule can remove objects from integraiton but cannot add them in case if owner policy states exclusion. So any confirmed namespace integration simply confirms previously collected policies
      Parameters:
      namespace - The namespace to confirm integration for
    • getModuleIntegrationPolicy

      public ModuleIntegrationPolicy getModuleIntegrationPolicy(String moduleFqn)
    • getObjectIntegrationPolicy

      public ObjectIntegrationPolicy getObjectIntegrationPolicy(String objectFqn)
    • isIntegrateSuppliedObjectsByDefault

      public boolean isIntegrateSuppliedObjectsByDefault()
    • isProtected

      public boolean isProtected(String topObjectFqn)
    • isSupplyObjectsByDefault

      public boolean isSupplyObjectsByDefault()
    • markAllUnconfirmedNamespaceIntegrationsAsExcluded

      public void markAllUnconfirmedNamespaceIntegrationsAsExcluded()
      TODO JavaDoc
    • markMainTopObjectForRemoval

      public void markMainTopObjectForRemoval(String objectFqn)
      Marks the object in the left project for the removal. It's always a top object due to the nature of namespaces.
      Parameters:
      objectFqn - The FQN to mark for the removal. Cannot be null
    • setIntegrateObjectsByDefault

      public void setIntegrateObjectsByDefault(boolean includeObjectsByDefault)
      Sets the default integration policy for supplied objects.
      Parameters:
      includeObjectsByDefault - The default integration policy
    • setSupplyObjectsByDefault

      public void setSupplyObjectsByDefault(boolean includeObjectsByDefault)
      Sets the default supplement policy for supplied objects.
      Parameters:
      includeObjectsByDefault - The default supplement policy
    • shouldBeRemovedFromMain

      public boolean shouldBeRemovedFromMain(String objectFqn)
      Checks if the object from the MAIN configuration should be removed. Used during the integration of namespaces
      Parameters:
      objectFqn - The FQN of the target object
      Returns:
      True if the object should be removed
    • getTopObjectIntegrationPolicies

      public Map<String,IntegrationPolicy> getTopObjectIntegrationPolicies()
      Provides the collection of integration policies for top objects
      Returns:
      the map of integration policies for top objects, key is top object FQN, neve null, can be empty