Interface CompositeMetadata
- All Known Subinterfaces:
CommentableCompositeMetadata
,ModifiableCompositeMetadata
- All Known Implementing Classes:
JCRCompositeMetadata
Deprecated.
Metadata container for an
Note that this can be recursive so that a CompositeMetadata can handle other CompositeMetadata.
AmetysObject
.Note that this can be recursive so that a CompositeMetadata can handle other CompositeMetadata.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Deprecated.Enumeration for metadata types. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyTo
(ModifiableCompositeMetadata metadata) Deprecated.Copy the currentCompositeMetadata
to the given composite metadata.getBinaryMetadata
(String metadataName) Deprecated.Returns the named metadata's value asBinaryMetadata
.
If the metadata does not exist, anUnknownMetadataException
is thrown.boolean
getBoolean
(String metadataName) Deprecated.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, anUnknownMetadataException
is thrown.boolean
getBoolean
(String metadataName, boolean defaultValue) Deprecated.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) Deprecated.Returns the named metadata's value as boolean array.boolean[]
getBooleanArray
(String metadataName, boolean[] defaultValues) Deprecated.Returns the named metadata's value as boolean array.
If the metadata does not exist, the default values are returned.getCompositeMetadata
(String metadataName) Deprecated.Returns the named metadata's value asCompositeMetadata
.
If the metadata is multi-valued, one of the value is returned.
If the metadata does not exist anUnknownMetadataException
is thrown.Deprecated.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, anUnknownMetadataException
is thrown.Deprecated.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) Deprecated.Returns the named metadata's value as Date array.Date[]
getDateArray
(String metadataName, Date[] defaultValues) Deprecated.Returns the named metadata's value as Date array.
If the metadata does not exist, the default values are returned.double
Deprecated.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, anUnknownMetadataException
is thrown.double
Deprecated.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) Deprecated.Returns the named metadata's value as double array.double[]
getDoubleArray
(String metadataName, double[] defaultValues) Deprecated.Returns the named metadata's value as double array.
If the metadata does not exist, the default values are returned.getLocalizedString
(String metadataName, Locale locale) Deprecated.Returns the named metadata's value of a multilingual metadata as String.getLocalizedString
(String metadataName, Locale locale, String defaultValue) Deprecated.Returns the named metadata's value of a multilingual metadata as String.
If the metadata does not exist, the default value is returned.long
Deprecated.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, anUnknownMetadataException
is thrown.long
Deprecated.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) Deprecated.Returns the named metadata's value as long array.long[]
getLongArray
(String metadataName, long[] defaultValues) Deprecated.Returns the named metadata's value as long array.
If the metadata does not exist, the default values are returned.String[]
Deprecated.Returns an array containing metadata names.getMultilingualString
(String metadataName) Deprecated.Returns the named metadata's values of a multilingual metadata.getObjectCollection
(String metadataName) Deprecated.Returns an object collection metadata as aTraversableAmetysObject
.getRichText
(String metadataName) Deprecated.Returns the named metadata's value asRichText
.
If the metadata does not exist, anUnknownMetadataException
is thrown.Deprecated.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, anUnknownMetadataException
is thrown.Deprecated.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) Deprecated.Returns the named metadata's value as String array.String[]
getStringArray
(String metadataName, String[] defaultValues) Deprecated.Returns the named metadata's value as String array.
If the metadata does not exist, the default values are returned.Deprecated.Returns the type of the given metadata.Deprecated.Returns the named metadata's value asUserIdentity
.
If the metadata does not exist, anUnknownMetadataException
is thrown.getUser
(String metadataName, UserIdentity defaultValue) Deprecated.Returns the named metadata's value asUserIdentity
.
If the metadata does not exist, the default value is returned.getUserArray
(String metadataName) Deprecated.Returns the named metadata's value asUserIdentity
array.getUserArray
(String metadataName, UserIdentity[] defaultValues) Deprecated.Returns the named metadata's value asUserIdentity
array.
If the metadata does not exist, the default values are returned.boolean
hasMetadata
(String metadataName) Deprecated.Tests if a metadata with a given name exists.boolean
isMultiple
(String metadataName) Deprecated.Test if the given metadata is multiple.
-
Method Details
-
hasMetadata
Deprecated.Tests if a metadata with a given name exists.- Parameters:
metadataName
- the metadataName to test.- Returns:
true
if the given metadata exists,false
otherwise.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getType
CompositeMetadata.MetadataType getType(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the type of the given metadata.- Parameters:
metadataName
- metadata name.- Returns:
- the type of the given metadata.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getBinaryMetadata
BinaryMetadata getBinaryMetadata(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value asBinaryMetadata
.
If the metadata does not exist, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as BinaryMetadata.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getRichText
RichText getRichText(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value asRichText
.
If the metadata does not exist, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as RichText.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getString
Deprecated.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, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as String.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getString
Deprecated.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.- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as String or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLocalizedString
String getLocalizedString(String metadataName, Locale locale) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value of a multilingual metadata as String.- Parameters:
metadataName
- the metadata name.locale
- the locale of value to retrieve- Returns:
- the metadata value as String
- Throws:
UnknownMetadataException
- if the named metadata does not exist for the given locale.AmetysRepositoryException
- if an error occurs.
-
getLocalizedString
String getLocalizedString(String metadataName, Locale locale, String defaultValue) throws AmetysRepositoryException Deprecated.Returns the named metadata's value of a multilingual metadata as String.
If the metadata does not exist, the default value is returned.- Parameters:
metadataName
- the metadata name.locale
- the locale of value to retrievedefaultValue
- the default value.- Returns:
- the metadata value as String or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getMultilingualString
Deprecated.Returns the named metadata's values of a multilingual metadata.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata values for all existing locales
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getStringArray
String[] getStringArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value as String array.- Parameters:
metadataName
- metadata name.- Returns:
- metadata value as String array.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getStringArray
String[] getStringArray(String metadataName, String[] defaultValues) throws AmetysRepositoryException Deprecated.Returns the named metadata's value as String array.
If the metadata does not exist, the default values are returned.- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as String array or the default values if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDate
Deprecated.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, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as Date.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getDate
Deprecated.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.- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as Date or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDateArray
Deprecated.Returns the named metadata's value as Date array.- Parameters:
metadataName
- metadata name.- Returns:
- metadata value as Date array.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getDateArray
Deprecated.Returns the named metadata's value as Date array.
If the metadata does not exist, the default values are returned.- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as Date array or the default values if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLong
Deprecated.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, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as long.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getLong
Deprecated.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.- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as long or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLongArray
Deprecated.Returns the named metadata's value as long array.- Parameters:
metadataName
- metadata name.- Returns:
- metadata value as long array.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getLongArray
Deprecated.Returns the named metadata's value as long array.
If the metadata does not exist, the default values are returned.- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as long array or the default values if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDouble
Deprecated.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, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as double.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getDouble
Deprecated.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.- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as double or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDoubleArray
double[] getDoubleArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value as double array.- Parameters:
metadataName
- metadata name.- Returns:
- metadata value as double array.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getDoubleArray
double[] getDoubleArray(String metadataName, double[] defaultValues) throws AmetysRepositoryException Deprecated.Returns the named metadata's value as double array.
If the metadata does not exist, the default values are returned.- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as double array or the default values if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getBoolean
Deprecated.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, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as boolean.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getBoolean
Deprecated.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.- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as boolean or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getBooleanArray
boolean[] getBooleanArray(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value as boolean array.- Parameters:
metadataName
- metadata name.- Returns:
- metadata value as boolean array.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getBooleanArray
boolean[] getBooleanArray(String metadataName, boolean[] defaultValues) throws AmetysRepositoryException Deprecated.Returns the named metadata's value as boolean array.
If the metadata does not exist, the default values are returned.- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as boolean array or the default values if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUser
Deprecated.Returns the named metadata's value asUserIdentity
.
If the metadata does not exist, anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as user identity.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUser
UserIdentity getUser(String metadataName, UserIdentity defaultValue) throws AmetysRepositoryException Deprecated.Returns the named metadata's value asUserIdentity
.
If the metadata does not exist, the default value is returned.- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as user identity or the default value if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUserArray
Deprecated.Returns the named metadata's value asUserIdentity
array.- Parameters:
metadataName
- the metadata name.- Returns:
- metadata value as user identity array.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUserArray
UserIdentity[] getUserArray(String metadataName, UserIdentity[] defaultValues) throws AmetysRepositoryException Deprecated.Returns the named metadata's value asUserIdentity
array.
If the metadata does not exist, the default values are returned.- Parameters:
metadataName
- the metadata name.defaultValues
- the default values.- Returns:
- metadata value as user identity array or the default values if metadata is not set.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCompositeMetadata
CompositeMetadata getCompositeMetadata(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Returns the named metadata's value asCompositeMetadata
.
If the metadata is multi-valued, one of the value is returned.
If the metadata does not exist anUnknownMetadataException
is thrown.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as
CompositeMetadata
. - Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getObjectCollection
Deprecated.Returns an object collection metadata as aTraversableAmetysObject
.- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata as a
TraversableAmetysObject
. - Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getMetadataNames
Deprecated.Returns an array containing metadata names.- Returns:
- an array containing metadata names.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
isMultiple
Deprecated.Test if the given metadata is multiple.- Parameters:
metadataName
- the metadata name.- Returns:
true
if the given metadata is multiple,false
otherwise.- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
copyTo
Deprecated.Copy the currentCompositeMetadata
to the given composite metadata.- Parameters:
metadata
- The parent composite metadata. Can not be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
RepositoryData
instead