public class

DefaultJiraPropertySetFactory

extends Object
implements JiraPropertySetFactory
java.lang.Object
   ↳ com.atlassian.jira.propertyset.DefaultJiraPropertySetFactory

Class Overview

Default implementation of the JiraPropertySetFactory. It relies heavily on the com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet CachingOfBizPropertySet.

Summary

Public Constructors
@Deprecated DefaultJiraPropertySetFactory()
This constructor is deprecated. This is a component. Get it injected or ask the ComponentAccessor for it instead of constructing it.
DefaultJiraPropertySetFactory(JiraCachingPropertySetManager jiraCachingPropertySetManager, OfBizPropertyEntryStore ofBizPropertyEntryStore)
Constructor for use by the DI container.
Public Methods
@Nonnull PropertySet buildCachingDefaultPropertySet(String entityName, boolean bulkLoad)
@Nonnull PropertySet buildCachingDefaultPropertySet(String entityName)
Returns a caching PropertySet for the given entity name and an assumed entity ID of 1.
@Nonnull PropertySet buildCachingPropertySet(String entityName, Long entityId)
Returns a caching PropertySet for the given entity name and ID.
@Nonnull PropertySet buildCachingPropertySet(PropertySet propertySet, boolean bulkLoad)
Returns a PropertySet that caches the return values of the PropertySet that is provided.
@Nonnull PropertySet buildCachingPropertySet(String entityName, Long entityId, boolean bulkLoad)
This is the old form of buildCachingPropertySet(String, Long).
@Nonnull PropertySet buildMemoryPropertySet(String entityName, Long entityId)
Returns an in-memory copy of a property set from the database.
@Nonnull PropertySet buildNoncachingPropertySet(String entityName, Long entityId)
Returns a non-caching PropertySet for the given entity name and ID.
@Nonnull PropertySet buildNoncachingPropertySet(String entityName)
Returns a non-caching PropertySet for the given entity name and an assumed entity ID of 1.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.propertyset.JiraPropertySetFactory

Public Constructors

@Deprecated public DefaultJiraPropertySetFactory ()

This constructor is deprecated.
This is a component. Get it injected or ask the ComponentAccessor for it instead of constructing it.

Constructor for use by plugins that wrongly instantiate their own instance, e.g. see JRADEV-23709.

public DefaultJiraPropertySetFactory (JiraCachingPropertySetManager jiraCachingPropertySetManager, OfBizPropertyEntryStore ofBizPropertyEntryStore)

Constructor for use by the DI container.

Parameters
jiraCachingPropertySetManager required

Public Methods

@Nonnull public PropertySet buildCachingDefaultPropertySet (String entityName, boolean bulkLoad)

This is the old form of buildCachingDefaultPropertySet(String). Its bulkLoad option is no longer significant.

Parameters
entityName the entity name for the entity that owns this property set
bulkLoad Ignored
Returns

@Nonnull public PropertySet buildCachingDefaultPropertySet (String entityName)

Returns a caching PropertySet for the given entity name and an assumed entity ID of 1.

Parameters
entityName the entity name for the entity that owns this property set
Returns

@Nonnull public PropertySet buildCachingPropertySet (String entityName, Long entityId)

Returns a caching PropertySet for the given entity name and ID.

Parameters
entityName the entity name for the entity that owns this property set
entityId the entity ID for the entity that owns this property set
Returns

@Nonnull public PropertySet buildCachingPropertySet (PropertySet propertySet, boolean bulkLoad)

Returns a PropertySet that caches the return values of the PropertySet that is provided. This can be used to provide short-term caching around another property set implementation, but its use is now discouraged.

WARNING: These property sets are not cluster-safe and generally not safe to hold onto for extended time periods. They do not share cache state with any other cached property set, even if exactly the same delegate propertySet is supplied to this method multiple times.

Parameters
propertySet the PropertySet to which requests should be delegated when the request is not cached
bulkLoad If true, then all properties will be loaded into the cache during initialisation of the property set.
Returns
  • a PropertySet which wraps the supplied property set with a short term, non-cluster-safe cache

@Nonnull public PropertySet buildCachingPropertySet (String entityName, Long entityId, boolean bulkLoad)

This is the old form of buildCachingPropertySet(String, Long). Its bulkLoad option is no longer significant.

Parameters
entityName the entity name for the entity that owns this property set
entityId the entity ID for the entity that owns this property set
bulkLoad Ignored
Returns

@Nonnull public PropertySet buildMemoryPropertySet (String entityName, Long entityId)

Returns an in-memory copy of a property set from the database. This property set will not have its configuration saved to the database on each change. It is up to the caller of this method to manually synchronize the returned property set with the database.

Parameters
entityName the entity name for the entity that owns this property set
entityId the entity ID for the entity that owns this property set
Returns
  • a PropertySet held completely in memory. Changes will not be written to the database.

@Nonnull public PropertySet buildNoncachingPropertySet (String entityName, Long entityId)

Returns a non-caching PropertySet for the given entity name and ID.

Parameters
entityName the entity name for the entity that owns this property set
entityId the entity ID for the entity that owns this property set
Returns

@Nonnull public PropertySet buildNoncachingPropertySet (String entityName)

Returns a non-caching PropertySet for the given entity name and an assumed entity ID of 1.

Parameters
entityName the entity name for the entity that owns this property set
Returns