Interface RepositoryData
-
- All Known Subinterfaces:
ModifiableRepositoryData
- All Known Implementing Classes:
JCRRepositoryData
,MemoryRepositoryData
public interface RepositoryData
Interface for data values management in repository
-
-
Field Summary
Fields Modifier and Type Field Description static String
BOOLEAN_REPOSITORY_DATA_TYPE
Constant for type booleanstatic String
CALENDAR_REPOSITORY_DATA_TYPE
Constant for type calendarstatic String
DOUBLE_REPOSITORY_DATA_TYPE
Constant for type doublestatic String
LONG_REPOSITORY_DATA_TYPE
Constant for type longstatic String
STREAM_REPOSITORY_DATA_TYPE
Constant for type streamstatic String
STRING_REPOSITORY_DATA_TYPE
Constant for type string
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Set<String>
getAllDataNames()
Retrieves the names of all data in this repository datadefault RepositoryData[]
getAllRepositoryData(String name)
Retrieves the values of all the repository data stored in the repository with the given nameRepositoryData[]
getAllRepositoryData(String name, String prefix)
Retrieves the values of all the repository data stored in the repository with the given namedefault Boolean
getBoolean(String name)
Retrieves the value of the boolean data stored in the repository with the given nameBoolean
getBoolean(String name, String prefix)
Retrieves the value of the boolean data stored in the repository with the given namedefault Boolean[]
getBooleans(String name)
Retrieves the values of the multiple boolean data stored in the repository with the given nameBoolean[]
getBooleans(String name, String prefix)
Retrieves the values of the multiple boolean data stored in the repository with the given namedefault Set<String>
getDataNames()
Retrieves the names of data in this repository data with the default prefixSet<String>
getDataNames(String prefix)
Retrieves the names of data in this repository data with the given prefixdefault Calendar
getDate(String name)
Retrieves the value of the date data stored as calendar in the repository with the given nameCalendar
getDate(String name, String prefix)
Retrieves the value of the date data stored as calendar in the repository with the given namedefault Calendar[]
getDates(String name)
Retrieves the values of the multiple date data as calendar stored in the repository with the given nameCalendar[]
getDates(String name, String prefix)
Retrieves the values of the multiple date data as calendar stored in the repository with the given nameString
getDefaultPrefix()
Retrieves the default prefixdefault Double
getDouble(String name)
Retrieves the value of the double data stored in the repository with the given nameDouble
getDouble(String name, String prefix)
Retrieves the value of the double data stored in the repository with the given namedefault Double[]
getDoubles(String name)
Retrieves the values of the multiple double data stored in the repository with the given nameDouble[]
getDoubles(String name, String prefix)
Retrieves the values of the multiple double data stored in the repository with the given namedefault Long
getLong(String name)
Retrieves the value of the long data stored in the repository with the given nameLong
getLong(String name, String prefix)
Retrieves the value of the long data stored in the repository with the given namedefault Long[]
getLongs(String name)
Retrieves the values of the multiple long data stored in the repository with the given nameLong[]
getLongs(String name, String prefix)
Retrieves the values of the multiple long data stored in the repository with the given nameString
getName()
Retrieves the name of the current repository data, excluding its prefixdefault RepositoryData
getRepositoryData(String name)
Retrieves the value of the repository data stored in the repository with the given nameRepositoryData
getRepositoryData(String name, String prefix)
Retrieves the value of the repository data stored in the repository with the given namedefault InputStream
getStream(String name)
Retrieves the value of the stream data stored in the repository with the given nameInputStream
getStream(String name, String prefix)
Retrieves the value of the stream data stored in the repository with the given namedefault Long
getStreamLength(String name)
Retrieves the length of the value of the stream data stored in the repository with the given nameLong
getStreamLength(String name, String prefix)
Retrieves the length of the value of the stream data stored in the repository with the given namedefault InputStream[]
getStreams(String name)
Retrieves the values of the multiple stream data stored in the repository with the given nameInputStream[]
getStreams(String name, String prefix)
Retrieves the values of the multiple stream data stored in the repository with the given namedefault String
getString(String name)
Retrieves the value of the string data stored in the repository with the given nameString
getString(String name, String prefix)
Retrieves the value of the string data stored in the repository with the given namedefault String[]
getStrings(String name)
Retrieves the values of the multiple string data stored in the repository with the given nameString[]
getStrings(String name, String prefix)
Retrieves the values of the multiple string data stored in the repository with the given namedefault String
getType(String name)
Retrieves the type of the value for the data stored in the repository with the given nameString
getType(String name, String prefix)
Retrieves the type of the value for the data stored in the repository with the given namedefault boolean
hasValue(String name)
Checks if there is a value for the data stored in the repository with the given nameboolean
hasValue(String name, String prefix)
Checks if there is a value for the data stored in the repository with the given namedefault boolean
isMultiple(String name)
Checks if the value for the data stored in the repository with the given name is multipleboolean
isMultiple(String name, String prefix)
Checks if the value for the data stored in the repository with the given name is multiple
-
-
-
Field Detail
-
STRING_REPOSITORY_DATA_TYPE
static final String STRING_REPOSITORY_DATA_TYPE
Constant for type string- See Also:
- Constant Field Values
-
CALENDAR_REPOSITORY_DATA_TYPE
static final String CALENDAR_REPOSITORY_DATA_TYPE
Constant for type calendar- See Also:
- Constant Field Values
-
LONG_REPOSITORY_DATA_TYPE
static final String LONG_REPOSITORY_DATA_TYPE
Constant for type long- See Also:
- Constant Field Values
-
DOUBLE_REPOSITORY_DATA_TYPE
static final String DOUBLE_REPOSITORY_DATA_TYPE
Constant for type double- See Also:
- Constant Field Values
-
BOOLEAN_REPOSITORY_DATA_TYPE
static final String BOOLEAN_REPOSITORY_DATA_TYPE
Constant for type boolean- See Also:
- Constant Field Values
-
STREAM_REPOSITORY_DATA_TYPE
static final String STREAM_REPOSITORY_DATA_TYPE
Constant for type stream- See Also:
- Constant Field Values
-
-
Method Detail
-
getString
default String getString(String name)
Retrieves the value of the string data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getString
String getString(String name, String prefix)
Retrieves the value of the string 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.- Returns:
- the value of the data
-
getStrings
default String[] getStrings(String name)
Retrieves the values of the multiple string data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data as a string array
-
getStrings
String[] getStrings(String name, String prefix)
Retrieves the values of the multiple string 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.- Returns:
- the values of the data as a string array
-
getDate
default Calendar getDate(String name)
Retrieves the value of the date data stored as calendar in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getDate
Calendar getDate(String name, String prefix)
Retrieves the value of the date data stored as calendar 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.- Returns:
- the value of the data
-
getDates
default Calendar[] getDates(String name)
Retrieves the values of the multiple date data as calendar stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data as a date array
-
getDates
Calendar[] getDates(String name, String prefix)
Retrieves the values of the multiple date data as calendar 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.- Returns:
- the values of the data as a date array
-
getLong
default Long getLong(String name)
Retrieves the value of the long data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getLong
Long getLong(String name, String prefix)
Retrieves the value of the long 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.- Returns:
- the value of the data
-
getLongs
default Long[] getLongs(String name)
Retrieves the values of the multiple long data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data as a long array
-
getLongs
Long[] getLongs(String name, String prefix)
Retrieves the values of the multiple long 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.- Returns:
- the values of the data as a long array
-
getDouble
default Double getDouble(String name)
Retrieves the value of the double data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getDouble
Double getDouble(String name, String prefix)
Retrieves the value of the double 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.- Returns:
- the value of the data
-
getDoubles
default Double[] getDoubles(String name)
Retrieves the values of the multiple double data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data as a double array
-
getDoubles
Double[] getDoubles(String name, String prefix)
Retrieves the values of the multiple double 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.- Returns:
- the values of the data as a double array
-
getBoolean
default Boolean getBoolean(String name)
Retrieves the value of the boolean data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getBoolean
Boolean getBoolean(String name, String prefix)
Retrieves the value of the boolean 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.- Returns:
- the value of the data
-
getBooleans
default Boolean[] getBooleans(String name)
Retrieves the values of the multiple boolean data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data as a boolean array
-
getBooleans
Boolean[] getBooleans(String name, String prefix)
Retrieves the values of the multiple boolean 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.- Returns:
- the values of the data as a boolean array
-
getRepositoryData
default RepositoryData getRepositoryData(String name)
Retrieves the value of the repository data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getRepositoryData
RepositoryData getRepositoryData(String name, String prefix)
Retrieves the value of the repository 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.- Returns:
- the value of the data
-
getAllRepositoryData
default RepositoryData[] getAllRepositoryData(String name)
Retrieves the values of all the repository data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data
-
getAllRepositoryData
RepositoryData[] getAllRepositoryData(String name, String prefix)
Retrieves the values of all the repository 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.- Returns:
- the values of the data
-
getStream
default InputStream getStream(String name)
Retrieves the value of the stream data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value of the data
-
getStream
InputStream getStream(String name, String prefix)
Retrieves the value of the stream 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.- Returns:
- the value of the data
-
getStreamLength
default Long getStreamLength(String name)
Retrieves the length of the value of the stream data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the length of the value of the data
-
getStreamLength
Long getStreamLength(String name, String prefix)
Retrieves the length of the value of the stream 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.- Returns:
- the length of the value of the data
-
getStreams
default InputStream[] getStreams(String name)
Retrieves the values of the multiple stream data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the values of the data as an input stream array
-
getStreams
InputStream[] getStreams(String name, String prefix)
Retrieves the values of the multiple stream 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.- Returns:
- the values of the data as an input stream array
-
getAllDataNames
default Set<String> getAllDataNames()
Retrieves the names of all data in this repository data- Returns:
- the names of all data in this repository data
-
getDataNames
default Set<String> getDataNames()
Retrieves the names of data in this repository data with the default prefix- Returns:
- the names of data by this repository data
-
getDataNames
Set<String> getDataNames(String prefix)
Retrieves the names of data in this repository data with the given prefix- Parameters:
prefix
- prefix of the data names to retrieve. Ifnull
, retrieves all the data names of this repository data- Returns:
- the names of data by this repository data
-
getName
String getName()
Retrieves the name of the current repository data, excluding its prefix- Returns:
- the name of the current repository data
-
hasValue
default boolean hasValue(String name)
Checks if there is a value for the data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- true if there is value for the data, false otherwise
-
hasValue
boolean hasValue(String name, String prefix)
Checks if there is a value for 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.- Returns:
- true if there is value for the data, false otherwise
-
getType
default String getType(String name) throws UnknownDataException
Retrieves the type of the value for the data stored in the repository with the given name- Parameters:
name
- name of the data- Returns:
- the value's type of the data
- Throws:
UnknownDataException
- if there is no data stored with the given name
-
getType
String getType(String name, String prefix) throws UnknownDataException
Retrieves the type of the value for 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.- Returns:
- the value's type of the data
- Throws:
UnknownDataException
- if there is no data stored with the given name
-
isMultiple
default boolean isMultiple(String name) throws UnknownDataException
Checks if the value for the data stored in the repository with the given name is multiple- Parameters:
name
- name of the data- Returns:
- true if the value for the data is multiple, false otherwise
- Throws:
UnknownDataException
- if there is no data stored with the given name
-
isMultiple
boolean isMultiple(String name, String prefix) throws UnknownDataException
Checks if the value for the data stored in the repository with the given name is multiple- Parameters:
name
- name of the dataprefix
- prefix of the data name, to use instead of the default one.- Returns:
- true if the value for the data is multiple, false otherwise
- Throws:
UnknownDataException
- if there is no data stored with the given name
-
getDefaultPrefix
String getDefaultPrefix()
Retrieves the default prefix- Returns:
- the default prefix
-
-