Package com.cloudinary.metadata
Class DateMetadataField
java.lang.Object
org.cloudinary.json.JSONObject
com.cloudinary.metadata.MetadataField<java.util.Date>
com.cloudinary.metadata.DateMetadataField
- All Implemented Interfaces:
java.io.Serializable
public class DateMetadataField extends MetadataField<java.util.Date>
Represents a metadata field with type 'date'
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class com.cloudinary.metadata.MetadataField
DEFAULT_VALUE, EXTERNAL_ID, LABEL, MANDATORY, TYPE, VALIDATION -
Constructor Summary
Constructors Constructor Description DateMetadataField() -
Method Summary
Modifier and Type Method Description java.util.DategetDefaultValue()Get the default value of this date field.voidsetDefaultValue(java.util.Date defaultValue)Sets the default date used for this field.Methods inherited from class com.cloudinary.metadata.MetadataField
getDataSource, getExternalId, getLabel, getType, getValidation, isMandatory, setDataSource, setExternalId, setLabel, setMandatory, setValidationMethods inherited from class org.cloudinary.json.JSONObject
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toString, toString, valueToString, wrap, write
-
Constructor Details
-
DateMetadataField
public DateMetadataField()
-
-
Method Details
-
setDefaultValue
public void setDefaultValue(java.util.Date defaultValue)Sets the default date used for this field.- Overrides:
setDefaultValuein classMetadataField<java.util.Date>- Parameters:
defaultValue- The date to set. Date only without a time component, UTC assumed.
-
getDefaultValue
public java.util.Date getDefaultValue() throws java.text.ParseExceptionGet the default value of this date field.- Overrides:
getDefaultValuein classMetadataField<java.util.Date>- Returns:
- The date only without a time component, UTC.
- Throws:
java.text.ParseException- When the underlying value is malformed.
-