Class ReportSynchronisationService
java.lang.Object
ch.tocco.nice2.synchronisation.api.AbstractSynchronisationService<ReportContribution>
ch.tocco.nice2.reporting.impl.sync.ReportSynchronisationService
- All Implemented Interfaces:
SynchronisationService<ReportContribution>
@Component
@Order(400)
public class ReportSynchronisationService
extends AbstractSynchronisationService<ReportContribution>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionReportSynchronisationService
(Context context, TextResources textResources, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, ReportManager reportManager, SynchronisationManager synchronisationManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateEntity
(ReportContribution description) creates and entity using the given descriptionvoid
initialiseEntity
(Entity report, ReportContribution 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
(ReportContribution description) retrieves the entity for a given descriptionvoid
setSettingsContributions
(List<ReportSettingsEntityContribution> settingsContributions) void
updateEntity
(Entity report, ReportContribution description) updates the entity using the given descriptionvoid
updateReportFields
(Entity report, ReportContribution description) Methods 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
-
ReportSynchronisationService
public ReportSynchronisationService(Context context, TextResources textResources, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, ReportManager reportManager, 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
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
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<ReportContribution>
- Overrides:
resetEntity
in classAbstractSynchronisationService<ReportContribution>
- Throws:
IOException
-
updateReportFields
- Throws:
IOException
-
setSettingsContributions
@Autowired(required=false) public void setSettingsContributions(List<ReportSettingsEntityContribution> settingsContributions)
-