public class DateRepositoryElementType extends AbstractDateElementType implements RepositoryElementType<LocalDate>
Constructor and Description |
---|
DateRepositoryElementType() |
Modifier and Type | Method and Description |
---|---|
private Calendar |
_getCalendarFromLocalDate(LocalDate localDate) |
private LocalDate |
_getLocalDateFromCalendar(Calendar calendar) |
private boolean |
_isADatetime(Calendar calendar) |
boolean |
isCompatible(RepositoryData parentData,
String name)
Checks if the value in the given repository data is compatible with the item type
|
Object |
read(RepositoryData parentData,
String name)
Read the value in the given repository data
|
void |
write(ModifiableRepositoryData parentData,
String name,
Object value)
Write the value into the given repository data
|
_singleValueToJSON, castValue, fromJSONForClient, isSimple, toString
_singleValueToSAX, getManagedClass, getManagedClassArray, isCompatible, parseConfiguration, valueToJSONForClient, valueToSAX
getId, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
castValue, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueToJSONForClient
getId, valueToSAX
setPluginInfo
public DateRepositoryElementType()
public Object read(RepositoryData parentData, String name) throws BadItemTypeException
RepositoryElementType
read
in interface RepositoryElementType<LocalDate>
parentData
- repository data containing the valuename
- the name of the element to readBadItemTypeException
- if the reading value doesn't match this element typepublic void write(ModifiableRepositoryData parentData, String name, Object value) throws BadItemTypeException
RepositoryElementType
write
in interface RepositoryElementType<LocalDate>
parentData
- repository where to store the value.name
- the name of the element to writevalue
- the value to write. Can be a T or a T[]. That's why it is an ObjectBadItemTypeException
- If the given value doesn't match this element typeprivate LocalDate _getLocalDateFromCalendar(Calendar calendar)
private Calendar _getCalendarFromLocalDate(LocalDate localDate)
public boolean isCompatible(RepositoryData parentData, String name) throws UnknownDataException
RepositoryModelItemType
isCompatible
in interface RepositoryModelItemType
parentData
- repository data containing the data to checkname
- the name of the data to checktrue
if the data type matches the current type, false
otherwiseUnknownDataException
- if there is no data in the parent repository data with this nameprivate boolean _isADatetime(Calendar calendar)