Class JCRCompositeMetadata
java.lang.Object
org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata
- All Implemented Interfaces:
CompositeMetadata,ModifiableCompositeMetadata
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
Fields -
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.voidcopyTo(ModifiableCompositeMetadata metadata) Deprecated.Copy the currentCompositeMetadatato the given composite metadata.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.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 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.booleanhasMetadata(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:
-
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
AmetysRepositoryException- if an error occurs.
-
JCRRepositoryDatainstead