Class OutputTemplateSynchronisationService
java.lang.Object
ch.tocco.nice2.synchronisation.api.AbstractSynchronisationService<OutputTemplateContribution>
ch.tocco.nice2.reporting.impl.sync.OutputTemplateSynchronisationService
- All Implemented Interfaces:
SynchronisationService<OutputTemplateContribution>
@Component
@Order(300)
public class OutputTemplateSynchronisationService
extends AbstractSynchronisationService<OutputTemplateContribution>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionOutputTemplateSynchronisationService
(Context context, TextResources textResources, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, EntityDocumentsService entityDocumentsService, ContentTreeService contentTreeService, BinaryFactory binaryFactory, SynchronisationManager synchronisationManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateEntity
(OutputTemplateContribution description) creates and entity using the given descriptionvoid
initialiseEntity
(Entity outputTemplate, OutputTemplateContribution description) Initialises an entity using the given description.void
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 falseretrieve all available descriptionsretrieves all external entitiesretrieveDescription
(String uniqueId) retrieve a description using an identifierretrieveEntity
(OutputTemplateContribution description) retrieves the entity for a given descriptionvoid
setOutputTemplateSources
(List<OutputTemplateContributionsBuilder> outputTemplateSources) void
updateEntity
(Entity outputTemplate, OutputTemplateContribution description) updates the entity using the given descriptionMethods inherited from class ch.tocco.nice2.synchronisation.api.AbstractSynchronisationService
getEdited, getExternal, retrieveIdentifier, setEdited, setExternal, synchronize
-
Field Details
-
ORDER
public static final int ORDER- See Also:
-
-
Constructor Details
-
OutputTemplateSynchronisationService
public OutputTemplateSynchronisationService(Context context, TextResources textResources, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, EntityDocumentsService entityDocumentsService, ContentTreeService contentTreeService, BinaryFactory binaryFactory, @Lazy SynchronisationManager synchronisationManager)
-
-
Method Details
-
getEntityName
-
retrieveEntity
Description copied from interface:SynchronisationService
retrieves the entity for a given description -
retrieveAllExternalEntities
Description copied from interface:SynchronisationService
retrieves all external entities -
retrieveDescription
Description copied from interface:SynchronisationService
retrieve a description using an identifier -
retrieveAllDescriptions
Description copied from interface:SynchronisationService
retrieve all available descriptions -
createEntity
Description copied from interface:SynchronisationService
creates and entity using the given description- Throws:
IOException
-
initialiseEntity
public void initialiseEntity(Entity outputTemplate, OutputTemplateContribution description) throws IOException Description copied from interface:SynchronisationService
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
public void updateEntity(Entity outputTemplate, OutputTemplateContribution description) throws IOException Description copied from interface:SynchronisationService
updates the entity using the given description- Throws:
IOException
-
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<OutputTemplateContribution>
- Overrides:
resetEntity
in classAbstractSynchronisationService<OutputTemplateContribution>
- Throws:
IOException
-
setOutputTemplateSources
@Autowired public void setOutputTemplateSources(List<OutputTemplateContributionsBuilder> outputTemplateSources)
-