com.atlassian.jira.functest.config
Class ConfigCrudHelper<T extends ConfigObjectWithId>

java.lang.Object
  extended by com.atlassian.jira.functest.config.ConfigCrudHelper<T>

public abstract class ConfigCrudHelper<T extends ConfigObjectWithId>
extends Object

A class that can help implementing CRUD operations on the XML backup.

Since:
v4.3

Constructor Summary
ConfigCrudHelper(org.dom4j.Document document, ConfigSequence configSeqence, String elementName)
           
 
Method Summary
protected abstract  void deleteObject(org.dom4j.Element element, T deleteObject)
           
protected abstract  T elementToObject(org.dom4j.Element element)
           
 List<T> load()
           
protected abstract  void newObject(org.dom4j.Element element, T newObject, Long newId)
           
 boolean save(List<T> newList)
           
protected abstract  void updateObject(org.dom4j.Element element, T updateObject, T oldObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigCrudHelper

public ConfigCrudHelper(org.dom4j.Document document,
                        ConfigSequence configSeqence,
                        String elementName)
Method Detail

load

public List<T> load()

save

public boolean save(List<T> newList)

elementToObject

protected abstract T elementToObject(org.dom4j.Element element)

updateObject

protected abstract void updateObject(org.dom4j.Element element,
                                     T updateObject,
                                     T oldObject)

newObject

protected abstract void newObject(org.dom4j.Element element,
                                  T newObject,
                                  Long newId)

deleteObject

protected abstract void deleteObject(org.dom4j.Element element,
                                     T deleteObject)


Copyright © 2002-2012 Atlassian. All Rights Reserved.