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 ClassLoaderprotected 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.PropertySetbuildCachingDefaultPropertySet(String entityName) Returns a cachingPropertySetfor the given entity name and an assumed entity ID of1.com.opensymphony.module.propertyset.PropertySetbuildCachingDefaultPropertySet(String entityName, boolean bulkLoad) This is the old form ofJiraPropertySetFactory.buildCachingDefaultPropertySet(String).com.opensymphony.module.propertyset.PropertySetbuildCachingPropertySet(com.opensymphony.module.propertyset.PropertySet propertySet, boolean bulkLoad) Returns aPropertySetthat caches the return values of thePropertySetthat is provided.com.opensymphony.module.propertyset.PropertySetbuildCachingPropertySet(String entityName, Long entityId) Returns a cachingPropertySetfor the given entity name and ID.com.opensymphony.module.propertyset.PropertySetbuildCachingPropertySet(String entityName, Long entityId, boolean bulkLoad) This is the old form ofJiraPropertySetFactory.buildCachingPropertySet(String, Long).com.opensymphony.module.propertyset.PropertySetbuildMemoryPropertySet(String entityName, Long entityId) Returns an in-memory copy of a property set from the database.com.opensymphony.module.propertyset.PropertySetbuildNoncachingPropertySet(String entityName) Returns a non-cachingPropertySetfor the given entity name and an assumed entity ID of1.com.opensymphony.module.propertyset.PropertySetbuildNoncachingPropertySet(String entityName, Long entityId) Returns a non-cachingPropertySetfor 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:JiraPropertySetFactoryReturns a cachingPropertySetfor 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:JiraPropertySetFactoryReturns a non-cachingPropertySetfor the given entity name and an assumed entity ID of1.- Specified by:
buildNoncachingPropertySetin 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:JiraPropertySetFactoryReturns a non-cachingPropertySetfor the given entity name and ID.- Specified by:
buildNoncachingPropertySetin 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:JiraPropertySetFactoryReturns a cachingPropertySetfor the given entity name and an assumed entity ID of1.- Specified by:
buildCachingDefaultPropertySetin 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:JiraPropertySetFactoryThis is the old form ofJiraPropertySetFactory.buildCachingDefaultPropertySet(String). ItsbulkLoadoption is no longer significant.- Specified by:
buildCachingDefaultPropertySetin 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:JiraPropertySetFactoryThis is the old form ofJiraPropertySetFactory.buildCachingPropertySet(String, Long). ItsbulkLoadoption is no longer significant.- Specified by:
buildCachingPropertySetin 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:JiraPropertySetFactoryReturns aPropertySetthat caches the return values of thePropertySetthat 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
propertySetis supplied to this method multiple times.- Specified by:
buildCachingPropertySetin interfaceJiraPropertySetFactory- Parameters:
propertySet- thePropertySetto 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
PropertySetwhich 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:JiraPropertySetFactoryReturns 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:
buildMemoryPropertySetin 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
PropertySetheld completely in memory. Changes will not be written to the database.
-