Interface SynchronisationService<T extends SynchronisationDescription>

All Known Implementing Classes:
AbstractSynchronisationService, BusinessUnitCorporateDesignSynchronisationService, CorporateDesignSynchronisationService, LabelContentSynchronisationService, LabelFormatSynchronisationService, LabelSynchronisationService, OutputTemplateFieldSynchronisationService, OutputTemplateLayoutSynchronisationService, OutputTemplateSynchronisationService, ReportSynchronisationService, TemplateSnippetSynchronisationService

public interface SynchronisationService<T extends SynchronisationDescription>
  • Method Details

    • getEntityName

      String getEntityName()
    • synchronize

      void synchronize() throws IOException
      retrieves all descriptions, loops over them and... ... creates non-existent entities (identified by unique_id) ... updates existing entities that have not been edited (external = true and edited = false) ... removes the external flag from entities if no description exists for it
      Throws:
      IOException
    • retrieveEntity

      Optional<Entity> retrieveEntity(T description)
      retrieves the entity for a given description
    • retrieveAllExternalEntities

      Iterable<Entity> retrieveAllExternalEntities()
      retrieves all external entities
    • retrieveDescription

      Optional<T> retrieveDescription(String identifier)
      retrieve a description using an identifier
    • retrieveIdentifier

      String retrieveIdentifier(Entity entity)
      retrieve an identifier with whom the description can be distinguished
    • retrieveAllDescriptions

      Collection<T> retrieveAllDescriptions()
      retrieve all available descriptions
    • createEntity

      Entity createEntity(T description) throws IOException
      creates and entity using the given description
      Throws:
      IOException
    • initialiseEntity

      void initialiseEntity(Entity entity, T description) throws IOException
      Initialises an entity using the given description. This method sets fields that may be edited without breaking synchronisation. It is called when creating or reseting an entity.
      Throws:
      IOException
    • updateEntity

      void updateEntity(Entity entity, T description) throws IOException
      updates the entity using the given description
      Throws:
      IOException
    • resetEntity

      void resetEntity(Entity entity, List<String> options) throws IOException
      Resets the the entity using the unique_id of the given entity - if no description can be retrieved using the unique_id, the external flag is set to false - if a description can be retrieved, the entity is updated according to this description and the edited flag is set to false
      Throws:
      IOException
    • setEdited

      Entity setEdited(Entity entity, boolean newValue)
      Sets the edited flag on the given entity
    • getEdited

      boolean getEdited(Entity entity)
      Returns the edited flag
    • setExternal

      Entity setExternal(Entity entity, boolean newValue)
      Sets the external flag on the given entity
    • getExternal

      boolean getExternal(Entity entity)
      Returns the external flag