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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the edited flagboolean
getExternal
(Entity entity) Returns the external flagvoid
resetEntity
(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 entityvoid
retrieves all descriptions, loops over them and...Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.synchronisation.api.SynchronisationService
createEntity, getEntityName, initialiseEntity, retrieveAllDescriptions, retrieveAllExternalEntities, retrieveDescription, retrieveEntity, updateEntity
-
Constructor Details
-
AbstractSynchronisationService
public AbstractSynchronisationService()
-
-
Method Details
-
synchronize
Description copied from interface:SynchronisationService
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- Specified by:
synchronize
in interfaceSynchronisationService<T extends SynchronisationDescription>
- Throws:
IOException
-
retrieveIdentifier
Description copied from interface:SynchronisationService
retrieve an identifier with whom the description can be distinguished- Specified by:
retrieveIdentifier
in interfaceSynchronisationService<T extends SynchronisationDescription>
-
resetEntity
Description copied from interface:SynchronisationService
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- Specified by:
resetEntity
in interfaceSynchronisationService<T extends SynchronisationDescription>
- Throws:
IOException
-
setEdited
Description copied from interface:SynchronisationService
Sets the edited flag on the given entity- Specified by:
setEdited
in interfaceSynchronisationService<T extends SynchronisationDescription>
-
getEdited
Description copied from interface:SynchronisationService
Returns the edited flag- Specified by:
getEdited
in interfaceSynchronisationService<T extends SynchronisationDescription>
-
setExternal
Description copied from interface:SynchronisationService
Sets the external flag on the given entity- Specified by:
setExternal
in interfaceSynchronisationService<T extends SynchronisationDescription>
-
getExternal
Description copied from interface:SynchronisationService
Returns the external flag- Specified by:
getExternal
in interfaceSynchronisationService<T extends SynchronisationDescription>
-