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 com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet and JiraCachingPropertySet.

Since:
v3.12

Constructor Summary
DefaultJiraPropertySetFactory()
           
 
Method Summary
 com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName, boolean bulkLoad)
          Returns a PropertySet for a particular entity.
 com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(com.opensymphony.module.propertyset.PropertySet propertySet, boolean bulkLoad)
          Returns a caching PropertySet that wraps the provided propertyset.
 com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName, Long entityId, boolean bulkLoad)
          Returns a PropertySet.
 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 PropertySet for a particular entity.
 com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName, Long entityId)
          Returns a PropertySet based on a ofbiz delegator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJiraPropertySetFactory

public DefaultJiraPropertySetFactory()
Method Detail

buildNoncachingPropertySet

public com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName)
Description copied from interface: JiraPropertySetFactory
Returns a PropertySet for a particular entity. Specifies a default entity id of 1. Any access (read and write) to this PropertySet will result in a DB call.

Specified by:
buildNoncachingPropertySet in interface JiraPropertySetFactory
Parameters:
entityName - The entity name to lookup your properties. E.g. jira.svn.plugin
Returns:
a PropertySet backed by a com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.

buildNoncachingPropertySet

public com.opensymphony.module.propertyset.PropertySet buildNoncachingPropertySet(String entityName,
                                                                                  Long entityId)
Description copied from interface: JiraPropertySetFactory
Returns a PropertySet based on a ofbiz delegator. Any access (read and write) to this PropertySet will result in a DB call.

Specified by:
buildNoncachingPropertySet in interface JiraPropertySetFactory
Parameters:
entityName - The entity name to lookup your properties. E.g. jira.svn.plugin
entityId - The entity id if you multiple properties per entity name. (E.g. OSUser properties per user id)
Returns:
a PropertySet backed by a com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.

buildCachingDefaultPropertySet

public com.opensymphony.module.propertyset.PropertySet buildCachingDefaultPropertySet(String entityName,
                                                                                      boolean bulkLoad)
Description copied from interface: JiraPropertySetFactory
Returns a PropertySet for a particular entity. Entries in this set are cached in memory for better performance.Specifies a default entity id of 1. Please note that this is a write-through-cache, meaning that reads will be cached up, however any write will call through to the database and invalidate the relevant cache entry.

Specified by:
buildCachingDefaultPropertySet in interface JiraPropertySetFactory
Parameters:
entityName - The entity name to lookup your properties. E.g. jira.svn.plugin
bulkLoad - If true, all properties will be loaded during initialisation of the propertyset and cached
Returns:
a PropertySet backed by a caching property set

buildCachingPropertySet

public com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(String entityName,
                                                                               Long entityId,
                                                                               boolean bulkLoad)
Description copied from interface: JiraPropertySetFactory
Returns a PropertySet. Entries in this set are cached in memory for better performance. Please note that this is a write-through-cache, meaning that reads will be cached up, however any write will call through to the database and invalidate the relevant cache entry.

Specified by:
buildCachingPropertySet in interface JiraPropertySetFactory
Parameters:
entityName - The entity name to lookup your properties. E.g. jira.svn.plugin
entityId - The entity id if you multiple properties per entity name. (E.g. OSUser properties per user id)
bulkLoad - If true, all properties will be loaded during initialisation of the propertyset and cached
Returns:
a PropertySet backed by a caching property set

buildCachingPropertySet

public com.opensymphony.module.propertyset.PropertySet buildCachingPropertySet(com.opensymphony.module.propertyset.PropertySet propertySet,
                                                                               boolean bulkLoad)
Description copied from interface: JiraPropertySetFactory
Returns a caching PropertySet that wraps the provided propertyset. Entries in this set are cached in memory for better performance. Please note that this is a write-through-cache, meaning that reads will be cached up, however any write will call through to the database and invalidate the relevant cache entry.

Specified by:
buildCachingPropertySet in interface JiraPropertySetFactory
Parameters:
propertySet - A PropertySet to wrap by a caching property set
bulkLoad - If true, all properties will be loaded during initialisation of the propertyset and cached
Returns:
a PropertySet backed by a caching property set

buildMemoryPropertySet

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 to lookup your properties. E.g. jira.svn.plugin
entityId - The entity id if you multiple properties per entity name. (E.g. OSUser properties per user id)
Returns:
a PropertySet held completely in memory. Changes will not be written to the database.


Copyright © 2002-2008 Atlassian. All Rights Reserved.