public interface CompositeMetadata
AmetysObject
.Modifier and Type | Interface and Description |
---|---|
static class |
CompositeMetadata.MetadataType
Enumeration for metadata types.
|
Modifier and Type | Method and Description |
---|---|
void |
copyTo(ModifiableCompositeMetadata metadata)
Copy the current
CompositeMetadata to the given composite metadata. |
BinaryMetadata |
getBinaryMetadata(String metadataName)
Returns the named metadata's value as
BinaryMetadata .If the metadata does not exist, an UnknownMetadataException is thrown. |
boolean |
getBoolean(String metadataName)
Returns the named metadata's value as boolean.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, an UnknownMetadataException is thrown. |
boolean |
getBoolean(String metadataName,
boolean defaultValue)
Returns the named metadata's value as boolean.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, the default value is returned. |
boolean[] |
getBooleanArray(String metadataName)
Returns the named metadata's value as boolean array.
|
boolean[] |
getBooleanArray(String metadataName,
boolean[] defaultValues)
Returns the named metadata's value as boolean array.
If the metadata does not exist, the default values are returned. |
CompositeMetadata |
getCompositeMetadata(String metadataName)
Returns the named metadata's value as
CompositeMetadata .If the metadata is multi-valued, one of the value is returned. If the metadata does not exist an UnknownMetadataException is thrown. |
Date |
getDate(String metadataName)
Returns the named metadata's value as Date.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, an UnknownMetadataException is thrown. |
Date |
getDate(String metadataName,
Date defaultValue)
Returns the named metadata's value as Date.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, the default value is returned. |
Date[] |
getDateArray(String metadataName)
Returns the named metadata's value as Date array.
|
Date[] |
getDateArray(String metadataName,
Date[] defaultValues)
Returns the named metadata's value as Date array.
If the metadata does not exist, the default values are returned. |
double |
getDouble(String metadataName)
Returns the named metadata's value as double.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, an UnknownMetadataException is thrown. |
double |
getDouble(String metadataName,
double defaultValue)
Returns the named metadata's value as double.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, the default value is returned. |
double[] |
getDoubleArray(String metadataName)
Returns the named metadata's value as double array.
|
double[] |
getDoubleArray(String metadataName,
double[] defaultValues)
Returns the named metadata's value as double array.
If the metadata does not exist, the default values are returned. |
String |
getLocalizedString(String metadataName,
Locale locale)
Returns the named metadata's value of a multilingual metadata as String.
|
String |
getLocalizedString(String metadataName,
Locale locale,
String defaultValue)
Returns the named metadata's value of a multilingual metadata as String.
If the metadata does not exist, the default value is returned. |
long |
getLong(String metadataName)
Returns the named metadata's value as long.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, an UnknownMetadataException is thrown. |
long |
getLong(String metadataName,
long defaultValue)
Returns the named metadata's value as long.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, the default value is returned. |
long[] |
getLongArray(String metadataName)
Returns the named metadata's value as long array.
|
long[] |
getLongArray(String metadataName,
long[] defaultValues)
Returns the named metadata's value as long array.
If the metadata does not exist, the default values are returned. |
String[] |
getMetadataNames()
Returns an array containing metadata names.
|
MultilingualString |
getMultilingualString(String metadataName)
Returns the named metadata's values of a multilingual metadata.
|
TraversableAmetysObject |
getObjectCollection(String metadataName)
Returns an object collection metadata as a
TraversableAmetysObject . |
RichText |
getRichText(String metadataName)
Returns the named metadata's value as
RichText .If the metadata does not exist, an UnknownMetadataException is thrown. |
String |
getString(String metadataName)
Returns the named metadata's value as String.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, an UnknownMetadataException is thrown. |
String |
getString(String metadataName,
String defaultValue)
Returns the named metadata's value as String.
If the metadata is multi-valued, one of the value is returned. If the metadata does not exist, the default value is returned. |
String[] |
getStringArray(String metadataName)
Returns the named metadata's value as String array.
|
String[] |
getStringArray(String metadataName,
String[] defaultValues)
Returns the named metadata's value as String array.
If the metadata does not exist, the default values are returned. |
CompositeMetadata.MetadataType |
getType(String metadataName)
Returns the type of the given metadata.
|
UserIdentity |
getUser(String metadataName)
Returns the named metadata's value as
UserIdentity .If the metadata does not exist, an UnknownMetadataException is thrown. |
UserIdentity |
getUser(String metadataName,
UserIdentity defaultValue)
Returns the named metadata's value as
UserIdentity .If the metadata does not exist, the default value is returned. |
UserIdentity[] |
getUserArray(String metadataName)
Returns the named metadata's value as
UserIdentity array. |
UserIdentity[] |
getUserArray(String metadataName,
UserIdentity[] defaultValues)
Returns the named metadata's value as
UserIdentity array.If the metadata does not exist, the default values are returned. |
boolean |
hasMetadata(String metadataName)
Tests if a metadata with a given name exists.
|
boolean |
isMultiple(String metadataName)
Test if the given metadata is multiple.
|
boolean hasMetadata(String metadataName)
metadataName
- the metadataName to test.true
if the given metadata exists, false
otherwise.AmetysRepositoryException
- if an error occurs.CompositeMetadata.MetadataType getType(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.BinaryMetadata getBinaryMetadata(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
BinaryMetadata
.UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.RichText getRichText(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
RichText
.UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.String getString(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.String getString(String metadataName, String defaultValue) throws AmetysRepositoryException
metadataName
- the metadata name.defaultValue
- the default value.AmetysRepositoryException
- if an error occurs.String getLocalizedString(String metadataName, Locale locale) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- the metadata name.locale
- the locale of value to retrieveUnknownMetadataException
- if the named metadata does not exist for the given locale.AmetysRepositoryException
- if an error occurs.String getLocalizedString(String metadataName, Locale locale, String defaultValue) throws AmetysRepositoryException
metadataName
- the metadata name.locale
- the locale of value to retrievedefaultValue
- the default value.AmetysRepositoryException
- if an error occurs.MultilingualString getMultilingualString(String metadataName) throws AmetysRepositoryException
metadataName
- the metadata name.AmetysRepositoryException
- if an error occurs.String[] getStringArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.String[] getStringArray(String metadataName, String[] defaultValues) throws AmetysRepositoryException
metadataName
- metadata name.defaultValues
- the default values.AmetysRepositoryException
- if an error occurs.Date getDate(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.Date getDate(String metadataName, Date defaultValue) throws AmetysRepositoryException
metadataName
- the metadata name.defaultValue
- the default value.AmetysRepositoryException
- if an error occurs.Date[] getDateArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.Date[] getDateArray(String metadataName, Date[] defaultValues) throws AmetysRepositoryException
metadataName
- metadata name.defaultValues
- the default values.AmetysRepositoryException
- if an error occurs.long getLong(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.long getLong(String metadataName, long defaultValue) throws AmetysRepositoryException
metadataName
- the metadata name.defaultValue
- the default value.AmetysRepositoryException
- if an error occurs.long[] getLongArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.long[] getLongArray(String metadataName, long[] defaultValues) throws AmetysRepositoryException
metadataName
- metadata name.defaultValues
- the default values.AmetysRepositoryException
- if an error occurs.double getDouble(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.double getDouble(String metadataName, double defaultValue) throws AmetysRepositoryException
metadataName
- the metadata name.defaultValue
- the default value.AmetysRepositoryException
- if an error occurs.double[] getDoubleArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.double[] getDoubleArray(String metadataName, double[] defaultValues) throws AmetysRepositoryException
metadataName
- metadata name.defaultValues
- the default values.AmetysRepositoryException
- if an error occurs.boolean getBoolean(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
UnknownMetadataException
is thrown.metadataName
- the metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.boolean getBoolean(String metadataName, boolean defaultValue) throws AmetysRepositoryException
metadataName
- the metadata name.defaultValue
- the default value.AmetysRepositoryException
- if an error occurs.boolean[] getBooleanArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- metadata name.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.boolean[] getBooleanArray(String metadataName, boolean[] defaultValues) throws AmetysRepositoryException
metadataName
- metadata name.defaultValues
- the default values.AmetysRepositoryException
- if an error occurs.UserIdentity getUser(String metadataName) throws AmetysRepositoryException
UserIdentity
.UnknownMetadataException
is thrown.metadataName
- the metadata name.AmetysRepositoryException
- if an error occurs.UserIdentity getUser(String metadataName, UserIdentity defaultValue) throws AmetysRepositoryException
UserIdentity
.metadataName
- the metadata name.defaultValue
- the default value.AmetysRepositoryException
- if an error occurs.UserIdentity[] getUserArray(String metadataName) throws AmetysRepositoryException
UserIdentity
array.metadataName
- the metadata name.AmetysRepositoryException
- if an error occurs.UserIdentity[] getUserArray(String metadataName, UserIdentity[] defaultValues) throws AmetysRepositoryException
UserIdentity
array.metadataName
- the metadata name.defaultValues
- the default values.AmetysRepositoryException
- if an error occurs.CompositeMetadata getCompositeMetadata(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
CompositeMetadata
.UnknownMetadataException
is thrown.metadataName
- the metadata name.CompositeMetadata
.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.TraversableAmetysObject getObjectCollection(String metadataName) throws AmetysRepositoryException
TraversableAmetysObject
metadataName
- the metadata name.TraversableAmetysObject
.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.String[] getMetadataNames() throws AmetysRepositoryException
AmetysRepositoryException
- if an error occurs.boolean isMultiple(String metadataName) throws UnknownMetadataException, AmetysRepositoryException
metadataName
- the metadata name.true
if the given metadata is multiple,
false
otherwise.UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.void copyTo(ModifiableCompositeMetadata metadata) throws AmetysRepositoryException
CompositeMetadata
to the given composite metadata.metadata
- The parent composite metadata. Can not be null.AmetysRepositoryException
- if an error occurs.