Class AbstractSynchronisationService<T extends SynchronisationDescription>
java.lang.Object
ch.tocco.nice2.synchronisation.api.AbstractSynchronisationService<T>
- All Implemented Interfaces:
SynchronisationService<T>
- Direct Known Subclasses:
BusinessUnitCorporateDesignSynchronisationService, CorporateDesignSynchronisationService, LabelContentSynchronisationService, LabelFormatSynchronisationService, LabelSynchronisationService, OutputTemplateFieldSynchronisationService, OutputTemplateLayoutSynchronisationService, OutputTemplateSynchronisationService, ReportSynchronisationService, TemplateSnippetSynchronisationService
public abstract class AbstractSynchronisationService<T extends SynchronisationDescription>
extends Object
implements SynchronisationService<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the edited flagbooleangetExternal(Entity entity) Returns the external flagvoidresetEntity(Entity entity, List<String> options) 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 falseretrieveIdentifier(Entity entity) retrieve an identifier with whom the description can be distinguishedSets the edited flag on the given entitysetExternal(Entity entity, boolean newValue) Sets the external flag on the given entityvoidretrieves all descriptions, loops over them and...Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SynchronisationService
createEntity, getEntityName, initialiseEntity, retrieveAllDescriptions, retrieveAllExternalEntities, retrieveDescription, retrieveEntity, updateEntity
-
Constructor Details
-
AbstractSynchronisationService
public AbstractSynchronisationService()
-
-
Method Details
-
synchronize
Description copied from interface:SynchronisationServiceretrieves 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- Specified by:
synchronizein interfaceSynchronisationService<T extends SynchronisationDescription>- Throws:
IOException
-
retrieveIdentifier
Description copied from interface:SynchronisationServiceretrieve an identifier with whom the description can be distinguished- Specified by:
retrieveIdentifierin interfaceSynchronisationService<T extends SynchronisationDescription>
-
resetEntity
Description copied from interface:SynchronisationServiceResets 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- Specified by:
resetEntityin interfaceSynchronisationService<T extends SynchronisationDescription>- Throws:
IOException
-
setEdited
Description copied from interface:SynchronisationServiceSets the edited flag on the given entity- Specified by:
setEditedin interfaceSynchronisationService<T extends SynchronisationDescription>
-
getEdited
Description copied from interface:SynchronisationServiceReturns the edited flag- Specified by:
getEditedin interfaceSynchronisationService<T extends SynchronisationDescription>
-
setExternal
Description copied from interface:SynchronisationServiceSets the external flag on the given entity- Specified by:
setExternalin interfaceSynchronisationService<T extends SynchronisationDescription>
-
getExternal
Description copied from interface:SynchronisationServiceReturns the external flag- Specified by:
getExternalin interfaceSynchronisationService<T extends SynchronisationDescription>
-