Class SynchronizationContext
java.lang.Object
org.ametys.plugins.repository.data.holder.values.SynchronizationContext
- Direct Known Subclasses:
ContentSynchronizationContext
Object that gives some context for values synchronization
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDetermines which values (locals or externals) have to be synchronizedstatic SynchronizationContext
Creates a new instance of aSynchronizationContext
boolean
Checks if synchronization has to use the default value from the modelwithDefaultFromModel
(boolean useDefaultFromModel) Set totrue
to use the default value from the model (default tofalse
)withStatus
(ExternalizableDataProvider.ExternalizableDataStatus externalizableDataStatus) Sets the status to determine which values (locals or externals) have to be synchronized (default to local)
-
Constructor Details
-
SynchronizationContext
protected SynchronizationContext()Creates a new instance of aSynchronizationContext
-
-
Method Details
-
newInstance
Creates a new instance of aSynchronizationContext
- Returns:
- the created instance
-
useDefaultFromModel
Checks if synchronization has to use the default value from the model- Returns:
true
to use the default value from the model,false
otherwise
-
withDefaultFromModel
Set totrue
to use the default value from the model (default tofalse
)- Parameters:
useDefaultFromModel
-true
to use the default value from the model,false
otherwise- Returns:
- the current
SynchronizationContext
-
getStatusToSynchronize
Determines which values (locals or externals) have to be synchronized- Returns:
- the status of the value to synchronize
-
withStatus
public SynchronizationContext withStatus(ExternalizableDataProvider.ExternalizableDataStatus externalizableDataStatus) Sets the status to determine which values (locals or externals) have to be synchronized (default to local)- Parameters:
externalizableDataStatus
- the status to determine which values have to be synchronized- Returns:
- the current
SynchronizationContext
-