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
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.Comments metadata suffixstatic final StringDeprecated.Prefix for jcr properties and nodes namesstatic final StringDeprecated.The JCR nodetype of multilingual metadata.static final StringDeprecated.The JCR nodetype of object collection metadata. -
Constructor Summary
ConstructorsConstructorDescriptionJCRCompositeMetadata(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 PatternDeprecated.Get the metadata name pattern to test validity.voidaddComment(String metadataName, String text, String author, Date date) Deprecated.Add a metadata comment.voidcopyTo(ModifiableCompositeMetadata metadata) Deprecated.Copy the currentCompositeMetadatato the given composite metadata.voiddeleteComment(String metadataName, int index) Deprecated.Delete a metadata comment.voideditComment(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, anUnknownMetadataExceptionis thrown.getBinaryMetadata(String metadataName, boolean createNew) Deprecated.Returns the named metadata's value asBinaryMetadata.
If the metadata does not exist and createNew isfalse, anUnknownMetadataExceptionis thrown.booleangetBoolean(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, anUnknownMetadataExceptionis thrown.booleangetBoolean(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 anUnknownMetadataExceptionis 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, anUnknownMetadataExceptionis 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, anUnknownMetadataExceptionis 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.doubleDeprecated.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, anUnknownMetadataExceptionis thrown.doubleDeprecated.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.longDeprecated.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, anUnknownMetadataExceptionis thrown.longDeprecated.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.NodegetNode()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, anUnknownMetadataExceptionis thrown.getRichText(String metadataName, boolean createNew) Deprecated.Returns the named metadata's value asRichText.
If the metadata does not exist and createNew isfalse, anUnknownMetadataExceptionis 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, anUnknownMetadataExceptionis 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, anUnknownMetadataExceptionis 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 asUserIdentityarray.getUserArray(String metadataName, UserIdentity[] defaultValues) Deprecated.Returns the named metadata's value asUserIdentityarray.
If the metadata does not exist, the default values are returned.booleanhasComment(String metadataName, int index) Deprecated.Indicates if a metadata has a commentbooleanhasComments(String metadataName) Deprecated.Indicates if a metadata has any commentsbooleanhasMetadata(String metadataName) Deprecated.Tests if a metadata with a given name exists.booleanisMultiple(String metadataName) Deprecated.Test if the given metadata is multiple.voidremoveMetadata(String metadataName) Deprecated.Removes the given metadata.voidDeprecated.Rename the current metadatavoidsetMetadata(String metadataName, boolean value) Deprecated.Set a boolean metadata.voidsetMetadata(String metadataName, boolean[] values) Deprecated.Set a multi-valued boolean metadata.voidsetMetadata(String metadataName, double value) Deprecated.Set a double metadata.voidsetMetadata(String metadataName, double[] values) Deprecated.Set a multi-valued double metadata.voidsetMetadata(String metadataName, long value) Deprecated.Set a long metadata.voidsetMetadata(String metadataName, long[] values) Deprecated.Set a multi-valued long metadata.voidsetMetadata(String metadataName, String value) Deprecated.Set a string metadata.voidsetMetadata(String metadataName, String[] value) Deprecated.Set a multi-valued string metadata.voidsetMetadata(String metadataName, String value, Locale locale) Deprecated.Set a multilingual string metadata.voidsetMetadata(String metadataName, Date value) Deprecated.Set a date metadata.voidsetMetadata(String metadataName, Date[] values) Deprecated.Set a multi-valued date metadata.voidsetMetadata(String metadataName, UserIdentity value) Deprecated.Set aUserIdentitymetadata.voidsetMetadata(String metadataName, UserIdentity[] values) Deprecated.Set a multi-valuedUserIdentitymetadata.voidsetMetadata(String metadataName, MultilingualString value) Deprecated.Set aMultilingualStringmetadata.
-
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:CompositeMetadataTests if a metadata with a given name exists.- Specified by:
hasMetadatain interfaceCompositeMetadata- Parameters:
metadataName- the metadataName to test.- Returns:
trueif the given metadata exists,falseotherwise.- Throws:
AmetysRepositoryException- if an error occurs.
-
rename
Deprecated.Description copied from interface:ModifiableCompositeMetadataRename the current metadata- Specified by:
renamein interfaceModifiableCompositeMetadata- Parameters:
newName- the new name- Throws:
AmetysRepositoryException- if an error occurs.
-
removeMetadata
Deprecated.Description copied from interface:ModifiableCompositeMetadataRemoves the given metadata.- Specified by:
removeMetadatain interfaceModifiableCompositeMetadata- Parameters:
metadataName- metadata name.- Throws:
UnknownMetadataException- if the metadata does not exist.AmetysRepositoryException- if an error occurs.
-
copyTo
Deprecated.Description copied from interface:CompositeMetadataCopy the currentCompositeMetadatato the given composite metadata.- Specified by:
copyToin interfaceCompositeMetadata- Parameters:
metadata- The parent composite metadata. Can not be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
getType
Deprecated.Description copied from interface:CompositeMetadataReturns the type of the given metadata.- Specified by:
getTypein 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:CompositeMetadataReturns 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, anUnknownMetadataExceptionis thrown.- Specified by:
getStringin interfaceCompositeMetadata- Parameters:
metadataName- the metadata name.- Returns:
- the metadata value as String.
-
getString
Deprecated.Description copied from interface:CompositeMetadataReturns 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:
getStringin 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:CompositeMetadataReturns the named metadata's value as String array.- Specified by:
getStringArrayin 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:CompositeMetadataReturns the named metadata's value as String array.
If the metadata does not exist, the default values are returned.- Specified by:
getStringArrayin 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:CompositeMetadataReturns the named metadata's value of a multilingual metadata as String.- Specified by:
getLocalizedStringin 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:CompositeMetadataReturns the named metadata's value of a multilingual metadata as String.
If the metadata does not exist, the default value is returned.- Specified by:
getLocalizedStringin 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:CompositeMetadataReturns the named metadata's values of a multilingual metadata.- Specified by:
getMultilingualStringin 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:CompositeMetadataReturns 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, anUnknownMetadataExceptionis thrown.- Specified by:
getBooleanin 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:CompositeMetadataReturns 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:
getBooleanin 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:CompositeMetadataReturns the named metadata's value as boolean array.- Specified by:
getBooleanArrayin 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:CompositeMetadataReturns the named metadata's value as boolean array.
If the metadata does not exist, the default values are returned.- Specified by:
getBooleanArrayin 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:CompositeMetadataReturns 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, anUnknownMetadataExceptionis thrown.- Specified by:
getDatein 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:CompositeMetadataReturns 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:
getDatein 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:CompositeMetadataReturns the named metadata's value as Date array.- Specified by:
getDateArrayin 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:CompositeMetadataReturns the named metadata's value as Date array.
If the metadata does not exist, the default values are returned.- Specified by:
getDateArrayin 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:CompositeMetadataReturns 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, anUnknownMetadataExceptionis thrown.- Specified by:
getLongin 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:CompositeMetadataReturns 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:
getLongin 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:CompositeMetadataReturns the named metadata's value as long array.- Specified by:
getLongArrayin 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:CompositeMetadataReturns the named metadata's value as long array.
If the metadata does not exist, the default values are returned.- Specified by:
getLongArrayin 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:CompositeMetadataReturns 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, anUnknownMetadataExceptionis thrown.- Specified by:
getDoublein 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:CompositeMetadataReturns 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:
getDoublein 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:CompositeMetadataReturns the named metadata's value as double array.- Specified by:
getDoubleArrayin 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:CompositeMetadataReturns the named metadata's value as double array.
If the metadata does not exist, the default values are returned.- Specified by:
getDoubleArrayin 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:CompositeMetadataReturns the named metadata's value asUserIdentity.
If the metadata does not exist, anUnknownMetadataExceptionis thrown.- Specified by:
getUserin 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:CompositeMetadataReturns the named metadata's value asUserIdentity.
If the metadata does not exist, the default value is returned.- Specified by:
getUserin 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:CompositeMetadataReturns the named metadata's value asUserIdentityarray.- Specified by:
getUserArrayin 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:CompositeMetadataReturns the named metadata's value asUserIdentityarray.
If the metadata does not exist, the default values are returned.- Specified by:
getUserArrayin 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:ModifiableCompositeMetadataSet a string metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a multi-valued string metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a multilingual string metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a date metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a multi-valued date metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a long metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a double metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a multi-valued long metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a multi-valued double metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a boolean metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet a multi-valued boolean metadata.- Specified by:
setMetadatain 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:ModifiableCompositeMetadataSet aUserIdentitymetadata.- Specified by:
setMetadatain interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.value- theUserIdentityvalue 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:ModifiableCompositeMetadataSet a multi-valuedUserIdentitymetadata.- Specified by:
setMetadatain interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.values- theUserIdentityarray 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:ModifiableCompositeMetadataSet aMultilingualStringmetadata.- Specified by:
setMetadatain interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.value- theMultilingualStringvalue- Throws:
AmetysRepositoryException- if the metadata cannot be set.
-
getMetadataNames
Deprecated.Description copied from interface:CompositeMetadataReturns an array containing metadata names.- Specified by:
getMetadataNamesin interfaceCompositeMetadata- Returns:
- an array containing metadata names.
- Throws:
AmetysRepositoryException- if an error occurs.
-
isMultiple
Deprecated.Description copied from interface:CompositeMetadataTest if the given metadata is multiple.- Specified by:
isMultiplein interfaceCompositeMetadata- Parameters:
metadataName- the metadata name.- Returns:
trueif the given metadata is multiple,falseotherwise.- 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:CompositeMetadataReturns the named metadata's value asBinaryMetadata.
If the metadata does not exist, anUnknownMetadataExceptionis thrown.- Specified by:
getBinaryMetadatain interfaceCompositeMetadata- Specified by:
getBinaryMetadatain 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:ModifiableCompositeMetadataReturns the named metadata's value asBinaryMetadata.
If the metadata does not exist and createNew isfalse, anUnknownMetadataExceptionis thrown. Otherwise, the metadata is automatically created.- Specified by:
getBinaryMetadatain interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.createNew-trueto create automatically theBinaryMetadatawhen 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:CompositeMetadataReturns the named metadata's value asCompositeMetadata.
If the metadata is multi-valued, one of the value is returned.
If the metadata does not exist anUnknownMetadataExceptionis thrown.- Specified by:
getCompositeMetadatain interfaceCompositeMetadata- Specified by:
getCompositeMetadatain 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:ModifiableCompositeMetadataReturns 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, anUnknownMetadataExceptionis thrown. Otherwise, the metadata is automatically created.- Specified by:
getCompositeMetadatain interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.createNew-trueto create automatically theCompositeMetadatawhen 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:CompositeMetadataReturns the named metadata's value asRichText.
If the metadata does not exist, anUnknownMetadataExceptionis thrown.- Specified by:
getRichTextin interfaceCompositeMetadata- Specified by:
getRichTextin 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:ModifiableCompositeMetadataReturns the named metadata's value asRichText.
If the metadata does not exist and createNew isfalse, anUnknownMetadataExceptionis thrown. Otherwise, the metadata is automatically created.- Specified by:
getRichTextin interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.createNew-trueto create automatically theBinaryMetadatawhen 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:CompositeMetadataReturns an object collection metadata as aTraversableAmetysObject
.- Specified by:
getObjectCollectionin interfaceCompositeMetadata- Specified by:
getObjectCollectionin 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:ModifiableCompositeMetadataReturns an object collection metadata as aTraversableAmetysObject
. If the metadata does not exist and createNew isfalse, anUnknownMetadataExceptionis thrown. Otherwise, the metadata is automatically created.- Specified by:
getObjectCollectionin interfaceModifiableCompositeMetadata- Parameters:
metadataName- the metadata name.createNew-trueto create automatically theCompositeMetadatawhen 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:CommentableCompositeMetadataRetrieves the comments of a metadata- Specified by:
getCommentsin interfaceCommentableCompositeMetadata- Parameters:
metadataName- The metadata name- Returns:
- the list of
MetadataComment
-
hasComments
Deprecated.Description copied from interface:CommentableCompositeMetadataIndicates if a metadata has any comments- Specified by:
hasCommentsin interfaceCommentableCompositeMetadata- Parameters:
metadataName- The metadata name- Returns:
- true if at least one comment exists for this metadata
-
hasComment
Deprecated.Description copied from interface:CommentableCompositeMetadataIndicates if a metadata has a comment- Specified by:
hasCommentin 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:CommentableCompositeMetadataAdd a metadata comment.- Specified by:
addCommentin 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:CommentableCompositeMetadataEdit the text of a metadata comment.- Specified by:
editCommentin 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:CommentableCompositeMetadataDelete a metadata comment.- Specified by:
deleteCommentin interfaceCommentableCompositeMetadata- Parameters:
metadataName- The metadata nameindex- The comment index
-
JCRRepositoryDatainstead