Package com.atlassian.confluence.core
Interface ContentPropertyManager
- All Known Implementing Classes:
DefaultContentPropertyManager
@Transactional
public interface ContentPropertyManager
This interface should be considered almost-deprecated - unless you're retrieving or modifying existing content
properties that were added using a ContentPropertyManager, you should use
ContentPropertyService
instead.-
Method Summary
Modifier and TypeMethodDescription@Nullable String
getStringProperty
(ContentEntityObject entity, String key) Get a string property associated with a content entity object, or null if that property is not set.default @Nullable String
getTextProperty
(ContentEntityObject entity, String key) Deprecated, for removal: This API element is subject to removal in a future version.void
removeProperties
(ContentEntityObject entity) Remove all the properties associated with the content entity object.void
removeProperty
(ContentEntityObject entity, String key) Remove the property associated with the content entity object.void
setStringProperty
(ContentEntityObject entity, String key, String value) Associate a string property with a content entity object, or null if that property is not set.default void
setTextProperty
(ContentEntityObject entity, String key, String value) Deprecated, for removal: This API element is subject to removal in a future version.void
transferProperties
(ContentEntityObject source, ContentEntityObject destination) Copies all properties associated with the source content entity object to the destination content entity object, and then removes all properties from the source content entity object.
-
Method Details
-
getStringProperty
@Transactional(readOnly=true) @Nullable String getStringProperty(ContentEntityObject entity, String key) Get a string property associated with a content entity object, or null if that property is not set. String properties can not be longer than 10k characters- Parameters:
entity
- the entity the property is associated withkey
- the key with which to look up the property- Returns:
- the property, or null if no such property exists
-
setStringProperty
Associate a string property with a content entity object, or null if that property is not set. String properties can not be longer than 10k characters. If a property is set longer than 10k characters, it will be truncated.- Parameters:
entity
- the entity the property is associated withkey
- the key with which to look up the propertyvalue
- the value to set
-
getTextProperty
@Transactional(readOnly=true) @Deprecated(forRemoval=true) default @Nullable String getTextProperty(ContentEntityObject entity, String key) Deprecated, for removal: This API element is subject to removal in a future version.since 9.4, usegetStringProperty(com.atlassian.confluence.core.ContentEntityObject, java.lang.String)
instead. -
setTextProperty
@Deprecated(forRemoval=true) default void setTextProperty(ContentEntityObject entity, String key, String value) Deprecated, for removal: This API element is subject to removal in a future version. -
removeProperty
Remove the property associated with the content entity object.- Parameters:
entity
- the entity the property is associated withkey
- the key with which to look up the property
-
removeProperties
Remove all the properties associated with the content entity object.- Parameters:
entity
- the entity the property is associated with
-
transferProperties
Copies all properties associated with the source content entity object to the destination content entity object, and then removes all properties from the source content entity object.Intended use is for any properties saved against a
Draft
to be transferred to the persisted content entity object.- Parameters:
source
- the entity to copy and remove properties fromdestination
- the entity to copy properties to
-
getStringProperty(com.atlassian.confluence.core.ContentEntityObject, java.lang.String)
instead.