Class JCRCompositeMetadata
java.lang.Object
org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata
- All Implemented Interfaces:
CommentableCompositeMetadata
,CompositeMetadata
,ModifiableCompositeMetadata
@Deprecated
public class JCRCompositeMetadata
extends Object
implements ModifiableCompositeMetadata, CommentableCompositeMetadata
Deprecated.
JCR implementation of a CompositeMetadata.
This implementation is based on a child node of the Node supporting the actual content.
This implementation is based on a child node of the Node supporting the actual content.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.repository.metadata.CompositeMetadata
CompositeMetadata.MetadataType
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.Comments metadata suffixstatic final String
Deprecated.Prefix for jcr properties and nodes namesstatic final String
Deprecated.The JCR nodetype of multilingual metadata.static final String
Deprecated.The JCR nodetype of object collection metadata. -
Constructor Summary
ConstructorDescriptionJCRCompositeMetadata
(javax.jcr.Node metadataNode, AmetysObjectResolver resolver) Deprecated.Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_checkMetadataName
(String metadataName) Deprecated.Check if the metadata name is valid.protected static Pattern
Deprecated.Get the metadata name pattern to test validity.void
addComment
(String metadataName, String text, String author, Date date) Deprecated.Add a metadata comment.void
copyTo
(ModifiableCompositeMetadata metadata) Deprecated.Copy the currentCompositeMetadata
to the given composite metadata.void
deleteComment
(String metadataName, int index) Deprecated.Delete a metadata comment.void
editComment
(String metadataName, int index, String text, String author, Date date) Deprecated.Edit the text of a metadata comment.getBinaryMetadata
(String metadataName) Deprecated.Returns the named metadata's value asBinaryMetadata
.
If the metadata does not exist, anUnknownMetadataException
is thrown.getBinaryMetadata
(String metadataName, boolean createNew) Deprecated.Returns the named metadata's value asBinaryMetadata
.
If the metadata does not exist and createNew isfalse
, 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.getComments
(String metadataName) Deprecated.Retrieves the comments of a metadatagetCompositeMetadata
(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.getCompositeMetadata
(String metadataName, boolean createNew) 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 and createNew isfalse
, 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.javax.jcr.Node
getNode()
Deprecated.Retrieves the underlying node.getObjectCollection
(String metadataName) Deprecated.Returns an object collection metadata as aTraversableAmetysObject
.getObjectCollection
(String metadataName, boolean createNew) 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.getRichText
(String metadataName, boolean createNew) Deprecated.Returns the named metadata's value asRichText
.
If the metadata does not exist and createNew isfalse
, 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
hasComment
(String metadataName, int index) Deprecated.Indicates if a metadata has a commentboolean
hasComments
(String metadataName) Deprecated.Indicates if a metadata has any commentsboolean
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.void
removeMetadata
(String metadataName) Deprecated.Removes the given metadata.void
Deprecated.Rename the current metadatavoid
setMetadata
(String metadataName, boolean value) Deprecated.Set a boolean metadata.void
setMetadata
(String metadataName, boolean[] values) Deprecated.Set a multi-valued boolean metadata.void
setMetadata
(String metadataName, double value) Deprecated.Set a double metadata.void
setMetadata
(String metadataName, double[] values) Deprecated.Set a multi-valued double metadata.void
setMetadata
(String metadataName, long value) Deprecated.Set a long metadata.void
setMetadata
(String metadataName, long[] values) Deprecated.Set a multi-valued long metadata.void
setMetadata
(String metadataName, String value) Deprecated.Set a string metadata.void
setMetadata
(String metadataName, String[] value) Deprecated.Set a multi-valued string metadata.void
setMetadata
(String metadataName, String value, Locale locale) Deprecated.Set a multilingual string metadata.void
setMetadata
(String metadataName, Date value) Deprecated.Set a date metadata.void
setMetadata
(String metadataName, Date[] values) Deprecated.Set a multi-valued date metadata.void
setMetadata
(String metadataName, UserIdentity value) Deprecated.Set aUserIdentity
metadata.void
setMetadata
(String metadataName, UserIdentity[] values) Deprecated.Set a multi-valuedUserIdentity
metadata.void
setMetadata
(String metadataName, MultilingualString value) Deprecated.Set aMultilingualString
metadata.
-
Field Details
-
METADATA_PREFIX
Deprecated.Prefix for jcr properties and nodes names- See Also:
-
METADATA_COMMENTS_SUFFIX
Deprecated.Comments metadata suffix- See Also:
-
OBJECT_COLLECTION_METADATA_NODETYPE
Deprecated.The JCR nodetype of object collection metadata.- See Also:
-
MULTILINGUAL_STRING_METADATA_NODETYPE
Deprecated.The JCR nodetype of multilingual metadata.- See Also:
-
-
Constructor Details
-
JCRCompositeMetadata
Deprecated.Constructor- Parameters:
metadataNode
- the Node supporting this composite metadataresolver
- The resolver, used to resolve object collections.
-
-
Method Details
-
getNode
Deprecated.Retrieves the underlying node.- Returns:
- the underlying node.
-
hasMetadata
Deprecated.Description copied from interface:CompositeMetadata
Tests if a metadata with a given name exists.- Specified by:
hasMetadata
in interfaceCompositeMetadata
- Parameters:
metadataName
- the metadataName to test.- Returns:
true
if the given metadata exists,false
otherwise.- Throws:
AmetysRepositoryException
- if an error occurs.
-
rename
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Rename the current metadata- Specified by:
rename
in interfaceModifiableCompositeMetadata
- Parameters:
newName
- the new name- Throws:
AmetysRepositoryException
- if an error occurs.
-
removeMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Removes the given metadata.- Specified by:
removeMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- metadata name.- Throws:
UnknownMetadataException
- if the metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
copyTo
Deprecated.Description copied from interface:CompositeMetadata
Copy the currentCompositeMetadata
to the given composite metadata.- Specified by:
copyTo
in interfaceCompositeMetadata
- Parameters:
metadata
- The parent composite metadata. Can not be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getType
Deprecated.Description copied from interface:CompositeMetadata
Returns the type of the given metadata.- Specified by:
getType
in interfaceCompositeMetadata
- 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.
-
getString
Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getString
in interfaceCompositeMetadata
- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as String.
-
getString
Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getString
in interfaceCompositeMetadata
- Parameters:
metadataName
- the metadata name.defaultValue
- the default value.- Returns:
- the metadata value as String or the default value if metadata is not set.
-
getStringArray
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value as String array.- Specified by:
getStringArray
in interfaceCompositeMetadata
- 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
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value as String array.
If the metadata does not exist, the default values are returned.- Specified by:
getStringArray
in interfaceCompositeMetadata
- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as String array or the default values if metadata is not set.
-
getLocalizedString
public String getLocalizedString(String metadataName, Locale locale) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value of a multilingual metadata as String.- Specified by:
getLocalizedString
in interfaceCompositeMetadata
- 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
public String getLocalizedString(String metadataName, Locale locale, String defaultValue) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value of a multilingual metadata as String.
If the metadata does not exist, the default value is returned.- Specified by:
getLocalizedString
in interfaceCompositeMetadata
- 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
public MultilingualString getMultilingualString(String metadataName) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's values of a multilingual metadata.- Specified by:
getMultilingualString
in interfaceCompositeMetadata
- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata values for all existing locales
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getBoolean
public boolean getBoolean(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getBoolean
in interfaceCompositeMetadata
- 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
public boolean getBoolean(String metadataName, boolean defaultValue) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getBoolean
in interfaceCompositeMetadata
- 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
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value as boolean array.- Specified by:
getBooleanArray
in interfaceCompositeMetadata
- 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
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value as boolean array.
If the metadata does not exist, the default values are returned.- Specified by:
getBooleanArray
in interfaceCompositeMetadata
- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as boolean array or the default values if metadata is not set.
-
getDate
Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getDate
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
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.- Specified by:
getDate
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
Returns the named metadata's value as Date array.- Specified by:
getDateArray
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
Returns the named metadata's value as Date array.
If the metadata does not exist, the default values are returned.- Specified by:
getDateArray
in interfaceCompositeMetadata
- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as Date array or the default values if metadata is not set.
-
getLong
Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getLong
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
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.- Specified by:
getLong
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
Returns the named metadata's value as long array.- Specified by:
getLongArray
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
Returns the named metadata's value as long array.
If the metadata does not exist, the default values are returned.- Specified by:
getLongArray
in interfaceCompositeMetadata
- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as long array or the default values if metadata is not set.
-
getDouble
Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getDouble
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
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.- Specified by:
getDouble
in interfaceCompositeMetadata
- 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
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value as double array.- Specified by:
getDoubleArray
in interfaceCompositeMetadata
- 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
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value as double array.
If the metadata does not exist, the default values are returned.- Specified by:
getDoubleArray
in interfaceCompositeMetadata
- Parameters:
metadataName
- metadata name.defaultValues
- the default values.- Returns:
- metadata value as double array or the default values if metadata is not set.
-
getUser
Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value asUserIdentity
.
If the metadata does not exist, anUnknownMetadataException
is thrown.- Specified by:
getUser
in interfaceCompositeMetadata
- Parameters:
metadataName
- the metadata name.- Returns:
- the metadata value as user identity.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUser
public UserIdentity getUser(String metadataName, UserIdentity defaultValue) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value asUserIdentity
.
If the metadata does not exist, the default value is returned.- Specified by:
getUser
in interfaceCompositeMetadata
- 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.Description copied from interface:CompositeMetadata
Returns the named metadata's value asUserIdentity
array.- Specified by:
getUserArray
in interfaceCompositeMetadata
- Parameters:
metadataName
- the metadata name.- Returns:
- metadata value as user identity array.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUserArray
public UserIdentity[] getUserArray(String metadataName, UserIdentity[] defaultValues) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value asUserIdentity
array.
If the metadata does not exist, the default values are returned.- Specified by:
getUserArray
in interfaceCompositeMetadata
- 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.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a string metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the String value of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multi-valued string metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the String array containing values of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
public void setMetadata(String metadataName, String value, Locale locale) throws AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multilingual string metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the String value of this metadata in the given locale.locale
- The value of locale- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a date metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the Date value of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multi-valued date metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.values
- the Date array containing values of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a long metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the integer value of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a double metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the integer value of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multi-valued long metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.values
- the integer array containing values of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multi-valued double metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.values
- the integer array containing values of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a boolean metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- the boolean value of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multi-valued boolean metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.values
- the boolean array containing values of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set aUserIdentity
metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- theUserIdentity
value of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
public void setMetadata(String metadataName, UserIdentity[] values) throws AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set a multi-valuedUserIdentity
metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.values
- theUserIdentity
array containing values of this metadata.- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
setMetadata
public void setMetadata(String metadataName, MultilingualString value) throws AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
Set aMultilingualString
metadata.- Specified by:
setMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.value
- theMultilingualString
value- Throws:
AmetysRepositoryException
- if the metadata cannot be set.
-
getMetadataNames
Deprecated.Description copied from interface:CompositeMetadata
Returns an array containing metadata names.- Specified by:
getMetadataNames
in interfaceCompositeMetadata
- Returns:
- an array containing metadata names.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
isMultiple
Deprecated.Description copied from interface:CompositeMetadata
Test if the given metadata is multiple.- Specified by:
isMultiple
in interfaceCompositeMetadata
- 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.
-
_checkMetadataName
Deprecated.Check if the metadata name is valid.- Parameters:
metadataName
- The metadata name to check.- Throws:
AmetysRepositoryException
- If the metadata name is invalid.
-
_getMetadataNamePattern
Deprecated.Get the metadata name pattern to test validity.- Returns:
- The metadata name pattern.
-
getBinaryMetadata
public ModifiableBinaryMetadata getBinaryMetadata(String metadataName) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value asBinaryMetadata
.
If the metadata does not exist, anUnknownMetadataException
is thrown.- Specified by:
getBinaryMetadata
in interfaceCompositeMetadata
- Specified by:
getBinaryMetadata
in interfaceModifiableCompositeMetadata
- 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.
-
getBinaryMetadata
public ModifiableBinaryMetadata getBinaryMetadata(String metadataName, boolean createNew) throws AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
Returns the named metadata's value asBinaryMetadata
.
If the metadata does not exist and createNew isfalse
, anUnknownMetadataException
is thrown. Otherwise, the metadata is automatically created.- Specified by:
getBinaryMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.createNew
-true
to create automatically theBinaryMetadata
when missing.- Returns:
- the metadata value as BinaryMetadata.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getCompositeMetadata
public ModifiableCompositeMetadata getCompositeMetadata(String metadataName) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
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.- Specified by:
getCompositeMetadata
in interfaceCompositeMetadata
- Specified by:
getCompositeMetadata
in interfaceModifiableCompositeMetadata
- 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.
-
getCompositeMetadata
public ModifiableCompositeMetadata getCompositeMetadata(String metadataName, boolean createNew) throws AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
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 and createNew isfalse
, anUnknownMetadataException
is thrown. Otherwise, the metadata is automatically created.- Specified by:
getCompositeMetadata
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.createNew
-true
to create automatically theCompositeMetadata
when missing.- Returns:
- the metadata value as
CompositeMetadata
. - Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getRichText
public ModifiableRichText getRichText(String metadataName) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns the named metadata's value asRichText
.
If the metadata does not exist, anUnknownMetadataException
is thrown.- Specified by:
getRichText
in interfaceCompositeMetadata
- Specified by:
getRichText
in interfaceModifiableCompositeMetadata
- 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.
-
getRichText
public ModifiableRichText getRichText(String metadataName, boolean createNew) throws UnknownMetadataException, AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
Returns the named metadata's value asRichText
.
If the metadata does not exist and createNew isfalse
, anUnknownMetadataException
is thrown. Otherwise, the metadata is automatically created.- Specified by:
getRichText
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.createNew
-true
to create automatically theBinaryMetadata
when missing.- Returns:
- the metadata value as RichText.
- Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getObjectCollection
public ModifiableTraversableAmetysObject getObjectCollection(String metadataName) throws AmetysRepositoryException Deprecated.Description copied from interface:CompositeMetadata
Returns an object collection metadata as aTraversableAmetysObject
.- Specified by:
getObjectCollection
in interfaceCompositeMetadata
- Specified by:
getObjectCollection
in interfaceModifiableCompositeMetadata
- 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.
-
getObjectCollection
public ModifiableTraversableAmetysObject getObjectCollection(String metadataName, boolean createNew) throws AmetysRepositoryException Deprecated.Description copied from interface:ModifiableCompositeMetadata
Returns an object collection metadata as aTraversableAmetysObject
. If the metadata does not exist and createNew isfalse
, anUnknownMetadataException
is thrown. Otherwise, the metadata is automatically created.- Specified by:
getObjectCollection
in interfaceModifiableCompositeMetadata
- Parameters:
metadataName
- the metadata name.createNew
-true
to create automatically theCompositeMetadata
when missing.- Returns:
- the metadata as a
TraversableAmetysObject
. - Throws:
UnknownMetadataException
- if the named metadata does not exist.AmetysRepositoryException
- if an error occurs.
-
getComments
Deprecated.Description copied from interface:CommentableCompositeMetadata
Retrieves the comments of a metadata- Specified by:
getComments
in interfaceCommentableCompositeMetadata
- Parameters:
metadataName
- The metadata name- Returns:
- the list of
MetadataComment
-
hasComments
Deprecated.Description copied from interface:CommentableCompositeMetadata
Indicates if a metadata has any comments- Specified by:
hasComments
in interfaceCommentableCompositeMetadata
- Parameters:
metadataName
- The metadata name- Returns:
- true if at least one comment exists for this metadata
-
hasComment
Deprecated.Description copied from interface:CommentableCompositeMetadata
Indicates if a metadata has a comment- Specified by:
hasComment
in interfaceCommentableCompositeMetadata
- Parameters:
metadataName
- The metadata nameindex
- The comment index- Returns:
- true if a comment at this index exists for this metadata
-
addComment
Deprecated.Description copied from interface:CommentableCompositeMetadata
Add a metadata comment.- Specified by:
addComment
in interfaceCommentableCompositeMetadata
- Parameters:
metadataName
- The metadata nametext
- The text of the commentauthor
- The comment authordate
- The date of the comment (null to use the current date)
-
editComment
Deprecated.Description copied from interface:CommentableCompositeMetadata
Edit the text of a metadata comment.- Specified by:
editComment
in interfaceCommentableCompositeMetadata
- Parameters:
metadataName
- The metadata nameindex
- The comment indextext
- The new text for the commentauthor
- The comment authordate
- The date of the comment (null to use the current date)
-
deleteComment
Deprecated.Description copied from interface:CommentableCompositeMetadata
Delete a metadata comment.- Specified by:
deleteComment
in interfaceCommentableCompositeMetadata
- Parameters:
metadataName
- The metadata nameindex
- The comment index
-
JCRRepositoryData
instead