Class RepositoryDataContext
- java.lang.Object
-
- org.ametys.runtime.model.type.DataContext
-
- org.ametys.plugins.repository.model.RepositoryDataContext
-
public class RepositoryDataContext extends DataContext
Object that gives some context for repository data manipulation
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RepositoryDataContext()
Creates a new instance of aRepositoryDataContext
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_cloneContextData(DataContext context)
Clone the data of the current context in the given oneRepositoryDataContext
cloneContext()
Creates a new instance of aRepositoryDataContext
, with the current context valuesSet<String>
getExternalizableData()
Retrieves the externalizable databoolean
isDataExternalizable()
Check if the current data is externalizablestatic RepositoryDataContext
newInstance()
Creates a new instance of aRepositoryDataContext
RepositoryDataContext
withExternalizableData(Set<String> externalizableData)
Sets the externalizable data-
Methods inherited from class org.ametys.runtime.model.type.DataContext
addSegmentToDataPath, addSuffixToLastSegment, getDataPath, getFullDataPath, getLocale, getObjectId, getRootObjectId, renderEmptyValues, withDataPath, withEmptyValues, withFullDataPath, withLocale, withObjectId, withRootObjectId
-
-
-
-
Constructor Detail
-
RepositoryDataContext
protected RepositoryDataContext()
Creates a new instance of aRepositoryDataContext
-
-
Method Detail
-
newInstance
public static RepositoryDataContext newInstance()
Creates a new instance of aRepositoryDataContext
- Returns:
- the created instance
-
cloneContext
public RepositoryDataContext cloneContext()
Creates a new instance of aRepositoryDataContext
, with the current context values- Overrides:
cloneContext
in classDataContext
- Returns:
- the created instance
-
_cloneContextData
protected void _cloneContextData(DataContext context)
Description copied from class:DataContext
Clone the data of the current context in the given one- Overrides:
_cloneContextData
in classDataContext
- Parameters:
context
- the clone
-
getExternalizableData
public Set<String> getExternalizableData()
Retrieves the externalizable data- Returns:
- the externalizable data
-
isDataExternalizable
public boolean isDataExternalizable()
Check if the current data is externalizable- Returns:
true
if the data is externalizable,false
otherwise
-
withExternalizableData
public RepositoryDataContext withExternalizableData(Set<String> externalizableData)
Sets the externalizable data- Parameters:
externalizableData
- the externalizable data to set- Returns:
- the current
RepositoryDataContext
-
-