com.atlassian.jira.propertyset
Class DefaultJiraPropertySetFactory

java.lang.Object
  extended by com.atlassian.jira.propertyset.DefaultJiraPropertySetFactory
All Implemented Interfaces:
JiraPropertySetFactory

public class DefaultJiraPropertySetFactory
extends Object
implements JiraPropertySetFactory

Default implementation of the JiraPropertySetFactory. It relies heavily on the OFBizPropertySet CachingOfBizPropertySet.

Since:
v3.12

Constructor Summary
DefaultJiraPropertySetFactory()
          Deprecated. use DefaultJiraPropertySetFactory(JiraCachingPropertySetManager) instead
DefaultJiraPropertySetFactory(JiraCachingPropertySetManager jiraCachingPropertySetManager)
          Constructor for use by the DI container.
 
Method Summary
 com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName)
          Returns a caching PropertySet for the given entity name and an assumed entity ID of 1.
 com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName, boolean bulkLoad)
          This is the old form of JiraPropertySetFactory.buildCachingDefaultPropertySet(String).
 com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(com.opensymphony.module.propertyset.PropertySet propertySet, boolean bulkLoad)
          Returns a PropertySet that caches the return values of the PropertySet that is provided.
 com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName, Long entityId)
          Returns a non-caching PropertySet for the given entity name and ID.
 com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName, Long entityId, boolean bulkLoad)
          This is the old form of JiraPropertySetFactory.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-caching PropertySet for the given entity name and an assumed entity ID of 1.
 com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName, Long entityId)
          Returns a non-caching PropertySet for the given entity name and ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJiraPropertySetFactory

@Deprecated
public DefaultJiraPropertySetFactory()
Deprecated. use DefaultJiraPropertySetFactory(JiraCachingPropertySetManager) instead

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


DefaultJiraPropertySetFactory

public DefaultJiraPropertySetFactory(JiraCachingPropertySetManager jiraCachingPropertySetManager)
Constructor for use by the DI container.

Parameters:
jiraCachingPropertySetManager - required
Since:
6.1
Method Detail

buildNoncachingPropertySet

@Nonnull
public com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName)
Description copied from interface: JiraPropertySetFactory
Returns a non-caching PropertySet for the given entity name and an assumed entity ID of 1.

Specified by:
buildNoncachingPropertySet in interface JiraPropertySetFactory
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-caching PropertySet for the given entity name and ID.

Specified by:
buildNoncachingPropertySet in interface JiraPropertySetFactory
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 non-caching PropertySet

buildCachingDefaultPropertySet

@Nonnull
public com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName)
Description copied from interface: JiraPropertySetFactory
Returns a caching PropertySet for the given entity name and an assumed entity ID of 1.

Specified by:
buildCachingDefaultPropertySet in interface JiraPropertySetFactory
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 of JiraPropertySetFactory.buildCachingDefaultPropertySet(String). Its bulkLoad option is no longer significant.

Specified by:
buildCachingDefaultPropertySet in interface JiraPropertySetFactory
Parameters:
entityName - the entity name for the entity that owns this property set
bulkLoad - 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 of JiraPropertySetFactory.buildCachingPropertySet(String, Long). Its bulkLoad option is no longer significant.

Specified by:
buildCachingPropertySet in interface JiraPropertySetFactory
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:
a caching PropertySet

buildCachingPropertySet

@Nonnull
public com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName,
                                                                                       Long entityId)
Description copied from interface: JiraPropertySetFactory
Returns a non-caching PropertySet for the given entity name and ID.

Specified by:
buildCachingPropertySet in interface JiraPropertySetFactory
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 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 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.

Specified by:
buildCachingPropertySet in interface JiraPropertySetFactory
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

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 interface JiraPropertySetFactory
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.


Copyright © 2002-2014 Atlassian. All Rights Reserved.