Class ReadThroughCachingContentPropertyManager
- java.lang.Object
-
- com.atlassian.confluence.impl.propertyset.ReadThroughCachingContentPropertyManager
-
- All Implemented Interfaces:
ContentPropertyManager
public class ReadThroughCachingContentPropertyManager extends Object implements ContentPropertyManager
An implementation ofContentPropertyManagerwhich caches the data from an underlyingConfluencePropertySetManager.- Since:
- 7.5
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReadThroughCachingContentPropertyManagercreate(ConfluencePropertySetManager propertySetManager, com.atlassian.cache.CacheFactory cacheFactory)@Nullable StringgetStringProperty(ContentEntityObject entity, String key)Get a string property associated with a content entity object, or null if that property is not set.@Nullable StringgetTextProperty(ContentEntityObject entity, String key)Get a text property associated with a content entity object, or null if that property is not set.voidremoveProperties(ContentEntityObject entity)Remove all the properties associated with the content entity object.voidremoveProperty(ContentEntityObject entity, String key)Remove the property associated with the content entity object.voidsetStringProperty(ContentEntityObject entity, String key, @Nullable String value)Associate a string property with a content entity object, or null if that property is not set.voidsetTextProperty(ContentEntityObject entity, String key, String value)Associate a text property with a content entity object, or null if that property is not set.voidtransferProperties(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 Detail
-
create
public static ReadThroughCachingContentPropertyManager create(ConfluencePropertySetManager propertySetManager, com.atlassian.cache.CacheFactory cacheFactory)
-
getStringProperty
public @Nullable String getStringProperty(ContentEntityObject entity, String key)
Description copied from interface:ContentPropertyManagerGet a string property associated with a content entity object, or null if that property is not set. String properties can not be longer than 255 characters- Specified by:
getStringPropertyin 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
public void setStringProperty(ContentEntityObject entity, String key, @Nullable String value)
Description copied from interface:ContentPropertyManagerAssociate a string property with a content entity object, or null if that property is not set. String properties can not be longer than 255 characters. If a property is set longer than 255 characters, it will be truncated.- Specified by:
setStringPropertyin interfaceContentPropertyManager- Parameters:
entity- the entity the property is associated withkey- the key with which to look up the propertyvalue- the value to set
-
getTextProperty
public @Nullable String getTextProperty(ContentEntityObject entity, String key)
Description copied from interface:ContentPropertyManagerGet a text property associated with a content entity object, or null if that property is not set. Text properties can be longer than 255 characters, but I suspect anything over 4096 characters will break Oracle.- Specified by:
getTextPropertyin 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
-
setTextProperty
public void setTextProperty(ContentEntityObject entity, String key, String value)
Description copied from interface:ContentPropertyManagerAssociate a text property with a content entity object, or null if that property is not set.- Specified by:
setTextPropertyin interfaceContentPropertyManager- Parameters:
entity- the entity the property is associated withkey- the key with which to look up the propertyvalue- the value to set
-
removeProperty
public void removeProperty(ContentEntityObject entity, String key)
Description copied from interface:ContentPropertyManagerRemove the property associated with the content entity object.- Specified by:
removePropertyin interfaceContentPropertyManager- Parameters:
entity- the entity the property is associated withkey- the key with which to look up the property
-
removeProperties
public void removeProperties(ContentEntityObject entity)
Description copied from interface:ContentPropertyManagerRemove all the properties associated with the content entity object.- Specified by:
removePropertiesin interfaceContentPropertyManager- Parameters:
entity- the entity the property is associated with
-
transferProperties
public void transferProperties(ContentEntityObject source, ContentEntityObject destination)
Description copied from interface:ContentPropertyManagerCopies 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
Draftto be transferred to the persisted content entity object.- Specified by:
transferPropertiesin interfaceContentPropertyManager- Parameters:
source- the entity to copy and remove properties fromdestination- the entity to copy properties to
-
-