Class SynchronizableValue
java.lang.Object
org.ametys.plugins.repository.data.holder.values.SynchronizableValue
Wrapper for a synchronizable value
Contains the value itself and indicates if it is the external value
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSynchronizableValue
(Object localValue) Constructor.SynchronizableValue
(Object value, ExternalizableDataProvider.ExternalizableDataStatus valueStatus) Constructor -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the comments associated with the valueRetrieves the externalizable status of the value Ifnull
, the status of the value won't be updatedRetrieves the external valueRetrieves the synchronizable local valuegetMode()
Retrieves the write mode for the valueRetrieves the value of the given statusvoid
setComments
(List<DataComment> comments) Set the comments associated to the valuevoid
setExternalizableStatus
(ExternalizableDataProvider.ExternalizableDataStatus externalizableDataStatus) Sets the externalizable status of the value If not set, the status of the value won't be updatedvoid
setExternalValue
(Object externalValue) Sets the external valuevoid
setLocalValue
(Object localValue) Sets the synchronizable local valuevoid
Set the write mode for the value
-
Constructor Details
-
SynchronizableValue
Constructor.- Parameters:
localValue
- the actual local value.
-
SynchronizableValue
public SynchronizableValue(Object value, ExternalizableDataProvider.ExternalizableDataStatus valueStatus) Constructor- Parameters:
value
- the actual valuevalueStatus
- the status of the given value (not the status of the object itself)
-
-
Method Details
-
getLocalValue
Retrieves the synchronizable local value- Returns:
- the synchronizable local value
-
setLocalValue
Sets the synchronizable local value- Parameters:
localValue
- the synchronizable local value to set
-
getExternalValue
Retrieves the external value- Returns:
- the external value
-
setExternalValue
Sets the external value- Parameters:
externalValue
- the external value to set
-
getValue
Retrieves the value of the given status- Parameters:
status
- the status- Returns:
- the value of the given status
-
getExternalizableStatus
Retrieves the externalizable status of the value Ifnull
, the status of the value won't be updated- Returns:
- the externalizable status of the value
-
setExternalizableStatus
public void setExternalizableStatus(ExternalizableDataProvider.ExternalizableDataStatus externalizableDataStatus) Sets the externalizable status of the value If not set, the status of the value won't be updated- Parameters:
externalizableDataStatus
- the status to set
-
getComments
Retrieves the comments associated with the value- Returns:
- the comments associated with the value
-
setComments
Set the comments associated to the value- Parameters:
comments
- the comment
-
getMode
Retrieves the write mode for the value- Returns:
- the write mode for the value
-
setMode
Set the write mode for the value- Parameters:
mode
- the write mode
-