Class DefaultContentPropertyManager
java.lang.Object
com.atlassian.confluence.impl.content.DefaultContentPropertyManager
- All Implemented Interfaces:
ContentPropertyManager
- Since:
- 9.4
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultContentPropertyManager
(org.hibernate.SessionFactory sessionFactory, ReadThroughCache<String, io.atlassian.fugue.Option<String>> cache) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
cacheKey
(ContentEntityObject entity, String key) create
(org.hibernate.SessionFactory sessionFactory, com.atlassian.cache.CacheFactory cacheFactory) @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.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.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.core.ContentPropertyManager
getTextProperty, setTextProperty
-
Field Details
-
ENTITY_NAME
- See Also:
-
-
Constructor Details
-
DefaultContentPropertyManager
public DefaultContentPropertyManager(org.hibernate.SessionFactory sessionFactory, ReadThroughCache<String, io.atlassian.fugue.Option<String>> cache)
-
-
Method Details
-
create
public static DefaultContentPropertyManager create(org.hibernate.SessionFactory sessionFactory, com.atlassian.cache.CacheFactory cacheFactory) -
cacheKey
-
getStringProperty
Description copied from interface:ContentPropertyManager
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- Specified by:
getStringProperty
in interfaceContentPropertyManager
- 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
Description copied from interface:ContentPropertyManager
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.- Specified by:
setStringProperty
in interfaceContentPropertyManager
- Parameters:
entity
- the entity the property is associated withkey
- the key with which to look up the propertyvalue
- the value to set
-
removeProperty
Description copied from interface:ContentPropertyManager
Remove the property associated with the content entity object.- Specified by:
removeProperty
in interfaceContentPropertyManager
- Parameters:
entity
- the entity the property is associated withkey
- the key with which to look up the property
-
removeProperties
Description copied from interface:ContentPropertyManager
Remove all the properties associated with the content entity object.- Specified by:
removeProperties
in interfaceContentPropertyManager
- Parameters:
entity
- the entity the property is associated with
-
transferProperties
Description copied from interface:ContentPropertyManager
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.- Specified by:
transferProperties
in interfaceContentPropertyManager
- Parameters:
source
- the entity to copy and remove properties fromdestination
- the entity to copy properties to
-