Package org.ametys.cms.data
Class ContentSynchronizationContext
java.lang.Object
org.ametys.plugins.repository.data.holder.values.SynchronizationContext
org.ametys.cms.data.ContentSynchronizationContext
Object that gives some context for content attributes synchronization
- 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance of aContentSynchronizationContext - 
Method Summary
Modifier and TypeMethodDescriptionRetrieves the referenced contents to modify for invert relationsbooleanDetermines if the invert relations of the content attributes have to be synchronizedCreates a new instance of aContentSynchronizationContextwithDefaultFromModel(boolean useDefaultFromModel) Set totrueto use the default value from the model (default tofalse)withInvertRelations(boolean enableInvertRelations) Set tofalseto avoid to synchronize the invert relations of the content attributes (default totrue)withReferencedContents(Collection<ReferencedContents> referencedContents) Sets the referenced contents to modify for invert relationswithStatus(ExternalizableDataProvider.ExternalizableDataStatus externalizableDataStatus) Sets the status to determine which values (locals or externals) have to be synchronized (default to local)Methods inherited from class org.ametys.plugins.repository.data.holder.values.SynchronizationContext
forceStatusIfNotPresent, getExternalizableDataContext, getStatusToSynchronize, ignoreIncompatibleValues, useDefaultFromModel, withExternalizableDataContextEntry, withIncompatibleValuesIgnored, withStatusForcedIfNotPresent 
- 
Constructor Details
- 
ContentSynchronizationContext
protected ContentSynchronizationContext()Creates a new instance of aContentSynchronizationContext 
 - 
 - 
Method Details
- 
newInstance
Creates a new instance of aContentSynchronizationContext- Returns:
 - the created instance
 
 - 
invertRelationsEnabled
Determines if the invert relations of the content attributes have to be synchronized- Returns:
 trueif the invert relations of the content attributes have to be synchronized,falseotherwise.
 - 
withInvertRelations
Set tofalseto avoid to synchronize the invert relations of the content attributes (default totrue)- Parameters:
 enableInvertRelations-trueto synchronized the invert relations of the content attributes,falseotherwise.- Returns:
 - the current 
ContentSynchronizationContext 
 - 
getReferencedContents
Retrieves the referenced contents to modify for invert relations- Returns:
 - the referenced contents to modify for invert relations
 
 - 
withReferencedContents
public ContentSynchronizationContext withReferencedContents(Collection<ReferencedContents> referencedContents) Sets the referenced contents to modify for invert relations- Parameters:
 referencedContents- theReferencedContentss to set- Returns:
 - the current 
ContentSynchronizationContext 
 - 
withDefaultFromModel
Description copied from class:SynchronizationContextSet totrueto use the default value from the model (default tofalse)- Overrides:
 withDefaultFromModelin classSynchronizationContext- Parameters:
 useDefaultFromModel-trueto use the default value from the model,falseotherwise- Returns:
 - the current 
SynchronizationContext 
 - 
withStatus
public ContentSynchronizationContext withStatus(ExternalizableDataProvider.ExternalizableDataStatus externalizableDataStatus) Description copied from class:SynchronizationContextSets the status to determine which values (locals or externals) have to be synchronized (default to local)- Overrides:
 withStatusin classSynchronizationContext- Parameters:
 externalizableDataStatus- the status to determine which values have to be synchronized- Returns:
 - the current 
SynchronizationContext 
 
 -