Package com.atlassian.jira.propertyset
Class DefaultJiraPropertySetFactory
java.lang.Object
com.atlassian.jira.propertyset.DefaultJiraPropertySetFactory
- All Implemented Interfaces:
JiraPropertySetFactory
Default implementation of the JiraPropertySetFactory. It relies heavily on the
OFBizPropertySet
CachingOfBizPropertySet
.- Since:
- v3.12
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ClassLoader
protected final JiraCachingPropertySetManager
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJiraPropertySetFactory
(JiraCachingPropertySetManager jiraCachingPropertySetManager, OfBizPropertyEntryStore ofBizPropertyEntryStore, CachingApplicationPropertiesManager cachingApplicationPropertiesManager, ProjectPropertiesManager projectPropertiesManager, UserPropertyManager userPropertyManager) Constructor for use by the DI container. -
Method Summary
Modifier and TypeMethodDescriptioncom.opensymphony.module.propertyset.PropertySet
buildCachingDefaultPropertySet
(String entityName) Returns a cachingPropertySet
for the given entity name and an assumed entity ID of1
.com.opensymphony.module.propertyset.PropertySet
buildCachingDefaultPropertySet
(String entityName, boolean bulkLoad) This is the old form ofJiraPropertySetFactory.buildCachingDefaultPropertySet(String)
.com.opensymphony.module.propertyset.PropertySet
buildCachingPropertySet
(com.opensymphony.module.propertyset.PropertySet propertySet, boolean bulkLoad) Returns aPropertySet
that caches the return values of thePropertySet
that is provided.com.opensymphony.module.propertyset.PropertySet
buildCachingPropertySet
(String entityName, Long entityId) Returns a cachingPropertySet
for the given entity name and ID.com.opensymphony.module.propertyset.PropertySet
buildCachingPropertySet
(String entityName, Long entityId, boolean bulkLoad) This is the old form ofJiraPropertySetFactory.buildCachingPropertySet(String, Long)
.com.opensymphony.module.propertyset.PropertySet
buildMemoryPropertySet
(String entityName, Long entityId) Returns an in-memory copy of a property set from the database.com.opensymphony.module.propertyset.PropertySet
buildNoncachingPropertySet
(String entityName) Returns a non-cachingPropertySet
for the given entity name and an assumed entity ID of1
.com.opensymphony.module.propertyset.PropertySet
buildNoncachingPropertySet
(String entityName, Long entityId) Returns a non-cachingPropertySet
for the given entity name and ID.
-
Field Details
-
classLoader
-
jiraCachingPropertySetManager
-
-
Constructor Details
-
DefaultJiraPropertySetFactory
public DefaultJiraPropertySetFactory(JiraCachingPropertySetManager jiraCachingPropertySetManager, OfBizPropertyEntryStore ofBizPropertyEntryStore, CachingApplicationPropertiesManager cachingApplicationPropertiesManager, ProjectPropertiesManager projectPropertiesManager, UserPropertyManager userPropertyManager) Constructor for use by the DI container.- Since:
- 6.1
-
-
Method Details
-
buildCachingPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName, Long entityId) Description copied from interface:JiraPropertySetFactory
Returns a cachingPropertySet
for the given entity name and ID.- Parameters:
entityName
- the entity name for the entity that owns this property setentityId
- the entity ID for the entity that owns this property set- Returns:
- a caching
PropertySet
-
buildNoncachingPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName) Description copied from interface:JiraPropertySetFactory
Returns a non-cachingPropertySet
for the given entity name and an assumed entity ID of1
.- Specified by:
buildNoncachingPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
entityName
- the entity name for the entity that owns this property set- Returns:
- a non-caching
PropertySet
-
buildNoncachingPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName, Long entityId) Description copied from interface:JiraPropertySetFactory
Returns a non-cachingPropertySet
for the given entity name and ID.- Specified by:
buildNoncachingPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
entityName
- the entity name for the entity that owns this property setentityId
- the entity ID for the entity that owns this property set- Returns:
- a non-caching
PropertySet
-
buildCachingDefaultPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName) Description copied from interface:JiraPropertySetFactory
Returns a cachingPropertySet
for the given entity name and an assumed entity ID of1
.- Specified by:
buildCachingDefaultPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
entityName
- the entity name for the entity that owns this property set- Returns:
- a caching
PropertySet
-
buildCachingDefaultPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName, boolean bulkLoad) Description copied from interface:JiraPropertySetFactory
This is the old form ofJiraPropertySetFactory.buildCachingDefaultPropertySet(String)
. ItsbulkLoad
option is no longer significant.- Specified by:
buildCachingDefaultPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
entityName
- the entity name for the entity that owns this property setbulkLoad
- Ignored- Returns:
- a caching
PropertySet
-
buildCachingPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName, Long entityId, boolean bulkLoad) Description copied from interface:JiraPropertySetFactory
This is the old form ofJiraPropertySetFactory.buildCachingPropertySet(String, Long)
. ItsbulkLoad
option is no longer significant.- Specified by:
buildCachingPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
entityName
- the entity name for the entity that owns this property setentityId
- the entity ID for the entity that owns this property setbulkLoad
- Ignored- Returns:
- a caching
PropertySet
-
buildCachingPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(com.opensymphony.module.propertyset.PropertySet propertySet, boolean bulkLoad) Description copied from interface:JiraPropertySetFactory
Returns aPropertySet
that caches the return values of thePropertySet
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.- Specified by:
buildCachingPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
propertySet
- thePropertySet
to which requests should be delegated when the request is not cachedbulkLoad
- Iftrue
, 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
-
buildMemoryPropertySet
@Nonnull public com.opensymphony.module.propertyset.PropertySet buildMemoryPropertySet(String entityName, Long entityId) Description copied from interface:JiraPropertySetFactory
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.- Specified by:
buildMemoryPropertySet
in interfaceJiraPropertySetFactory
- Parameters:
entityName
- the entity name for the entity that owns this property setentityId
- 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.
-