Interface ModifiableRepositoryData
-
- All Superinterfaces:
RepositoryData
- All Known Implementing Classes:
JCRRepositoryData
,MemoryRepositoryData
public interface ModifiableRepositoryData extends RepositoryData
Interface for modifiable data values management in repository
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
DATA_NAME_PATTERN
The data path pattern to test validity-
Fields inherited from interface org.ametys.plugins.repository.data.repositorydata.RepositoryData
BOOLEAN_REPOSITORY_DATA_TYPE, CALENDAR_REPOSITORY_DATA_TYPE, DOUBLE_REPOSITORY_DATA_TYPE, LONG_REPOSITORY_DATA_TYPE, STREAM_REPOSITORY_DATA_TYPE, STRING_REPOSITORY_DATA_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ModifiableRepositoryData
addRepositoryData(String name, String dataTypeName)
Creates a repository data and stores it in the repository with the given nameModifiableRepositoryData
addRepositoryData(String name, String dataTypeName, String prefix)
Creates a repository data and stores it in the repository with the given namedefault ModifiableRepositoryData
getRepositoryData(String name)
Retrieves the value of the repository data stored in the repository with the given nameModifiableRepositoryData
getRepositoryData(String name, String prefix)
Retrieves the value of the repository data stored in the repository with the given namedefault void
removeValue(String name)
Removes the value of the data stored in the repository with the given namevoid
removeValue(String name, String prefix)
Removes the value of the data stored in the repository with the given namedefault void
rename(String newName)
Rename the current repository datavoid
rename(String newName, String prefix)
Rename the current repository datadefault void
setValue(String name, InputStream value)
Sets the value of the input stream data stored in the repository with the given namevoid
setValue(String name, InputStream value, String prefix)
Sets the value of the input stream data stored in the repository with the given namedefault void
setValue(String name, Boolean value)
Sets the value of the boolean data stored in the repository with the given namevoid
setValue(String name, Boolean value, String prefix)
Sets the value of the boolean data stored in the repository with the given namedefault void
setValue(String name, Double value)
Sets the value of the double data stored in the repository with the given namevoid
setValue(String name, Double value, String prefix)
Sets the value of the double data stored in the repository with the given namedefault void
setValue(String name, Long value)
Sets the value of the long data stored in the repository with the given namevoid
setValue(String name, Long value, String prefix)
Sets the value of the long data stored in the repository with the given namedefault void
setValue(String name, String value)
Sets the value of the string data stored in the repository with the given namevoid
setValue(String name, String value, String prefix)
Sets the value of the string data stored in the repository with the given namedefault void
setValue(String name, Calendar value)
Sets the value of the date data stored in the repository with the given namevoid
setValue(String name, Calendar value, String prefix)
Sets the value of the date data stored in the repository with the given namedefault void
setValues(String name, InputStream[] values)
Sets the values of the multiple input stream data stored in the repository with the given namevoid
setValues(String name, InputStream[] values, String prefix)
Sets the values of the multiple input stream data stored in the repository with the given namedefault void
setValues(String name, Boolean[] values)
Sets the values of the multiple boolean data stored in the repository with the given namevoid
setValues(String name, Boolean[] values, String prefix)
Sets the values of the multiple boolean data stored in the repository with the given namedefault void
setValues(String name, Double[] values)
Sets the values of the multiple double data stored in the repository with the given namevoid
setValues(String name, Double[] values, String prefix)
Sets the values of the multiple double data stored in the repository with the given namedefault void
setValues(String name, Long[] values)
Sets the values of the multiple long data stored in the repository with the given namevoid
setValues(String name, Long[] values, String prefix)
Sets the values of the multiple long data stored in the repository with the given namedefault void
setValues(String name, String[] values)
Sets the values of the multiple string data stored in the repository with the given namevoid
setValues(String name, String[] values, String prefix)
Sets the values of the multiple string data stored in the repository with the given namedefault void
setValues(String name, Calendar[] values)
Sets the values of the multiple date data stored in the repository with the given namevoid
setValues(String name, Calendar[] values, String prefix)
Sets the values of the multiple date data stored in the repository with the given name-
Methods inherited from interface org.ametys.plugins.repository.data.repositorydata.RepositoryData
getAllDataNames, getAllRepositoryData, getAllRepositoryData, getBoolean, getBoolean, getBooleans, getBooleans, getDataNames, getDataNames, getDate, getDate, getDates, getDates, getDefaultPrefix, getDouble, getDouble, getDoubles, getDoubles, getLong, getLong, getLongs, getLongs, getName, getPath, getStream, getStream, getStreamLength, getStreamLength, getStreams, getStreams, getString, getString, getStrings, getStrings, getType, getType, hasValue, hasValue, isMultiple, isMultiple
-
-
-
-
Field Detail
-
DATA_NAME_PATTERN
static final Pattern DATA_NAME_PATTERN
The data path pattern to test validity
-
-
Method Detail
-
getRepositoryData
default ModifiableRepositoryData getRepositoryData(String name)
Description copied from interface:RepositoryData
Retrieves the value of the repository data stored in the repository with the given name- Specified by:
getRepositoryData
in interfaceRepositoryData
- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getRepositoryData
ModifiableRepositoryData getRepositoryData(String name, String prefix)
Description copied from interface:RepositoryData
Retrieves the value of the repository data stored in the repository with the given name- Specified by:
getRepositoryData
in interfaceRepositoryData
- Parameters:
name
- name of the dataprefix
- prefix of the data name, to use instead of the default one.- Returns:
- the value of the data
-
addRepositoryData
default ModifiableRepositoryData addRepositoryData(String name, String dataTypeName)
Creates a repository data and stores it in the repository with the given name- Parameters:
name
- name of the datadataTypeName
- data type name to use on creation- Returns:
- the value of the data
-
addRepositoryData
ModifiableRepositoryData addRepositoryData(String name, String dataTypeName, String prefix)
Creates a repository data and stores it in the repository with the given name- Parameters:
name
- name of the datadataTypeName
- data type name to use on creationprefix
- prefix of the data name, to use instead of the default one.- Returns:
- the value of the data
-
rename
default void rename(String newName)
Rename the current repository data- Parameters:
newName
- the new name
-
rename
void rename(String newName, String prefix)
Rename the current repository data- Parameters:
newName
- the new nameprefix
- prefix of the data name, to use instead of the default one.
-
setValue
default void setValue(String name, String value)
Sets the value of the string data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to set
-
setValue
void setValue(String name, String value, String prefix)
Sets the value of the string data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValues
default void setValues(String name, String[] values)
Sets the values of the multiple string data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to set
-
setValues
void setValues(String name, String[] values, String prefix)
Sets the values of the multiple string data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValue
default void setValue(String name, Calendar value)
Sets the value of the date data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to set
-
setValue
void setValue(String name, Calendar value, String prefix)
Sets the value of the date data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValues
default void setValues(String name, Calendar[] values)
Sets the values of the multiple date data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to set
-
setValues
void setValues(String name, Calendar[] values, String prefix)
Sets the values of the multiple date data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValue
default void setValue(String name, Long value)
Sets the value of the long data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to set
-
setValue
void setValue(String name, Long value, String prefix)
Sets the value of the long data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValues
default void setValues(String name, Long[] values)
Sets the values of the multiple long data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to set
-
setValues
void setValues(String name, Long[] values, String prefix)
Sets the values of the multiple long data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValue
default void setValue(String name, Double value)
Sets the value of the double data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to set
-
setValue
void setValue(String name, Double value, String prefix)
Sets the value of the double data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValues
default void setValues(String name, Double[] values)
Sets the values of the multiple double data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to set
-
setValues
void setValues(String name, Double[] values, String prefix)
Sets the values of the multiple double data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValue
default void setValue(String name, Boolean value)
Sets the value of the boolean data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to set
-
setValue
void setValue(String name, Boolean value, String prefix)
Sets the value of the boolean data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValues
default void setValues(String name, Boolean[] values)
Sets the values of the multiple boolean data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to set
-
setValues
void setValues(String name, Boolean[] values, String prefix)
Sets the values of the multiple boolean data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValue
default void setValue(String name, InputStream value)
Sets the value of the input stream data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to set
-
setValue
void setValue(String name, InputStream value, String prefix)
Sets the value of the input stream data stored in the repository with the given name- Parameters:
name
- name of the datavalue
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
setValues
default void setValues(String name, InputStream[] values)
Sets the values of the multiple input stream data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to set
-
setValues
void setValues(String name, InputStream[] values, String prefix)
Sets the values of the multiple input stream data stored in the repository with the given name- Parameters:
name
- name of the datavalues
- the value to setprefix
- prefix of the data name, to use instead of the default one.
-
removeValue
default void removeValue(String name) throws UnknownDataException
Removes the value of the data stored in the repository with the given name- Parameters:
name
- name of the data- Throws:
UnknownDataException
- if there is no data stored with the given name
-
removeValue
void removeValue(String name, String prefix) throws UnknownDataException
Removes the value of the data stored in the repository with the given name- Parameters:
name
- name of the dataprefix
- prefix of the data name, to use instead of the default one.- Throws:
UnknownDataException
- if there is no data stored with the given name
-
-