teichmann@475: package org.dive4elements.artifactdatabase.state; ingo@358: ingo@358: import java.io.Serializable; ingo@358: ingo@358: import org.w3c.dom.Node; ingo@358: ingo@358: ingo@358: /** ingo@358: * @author Ingo Weinzierl ingo@358: */ ingo@358: public interface Settings extends Serializable { ingo@358: ingo@358: /** ingo@358: * Adds a new Section to this Settings object. ingo@358: * ingo@358: * @param section the new Section. ingo@358: */ ingo@358: void addSection(Section section); ingo@358: ingo@358: /** ingo@358: * Returns the number of Sections in this Settings object. ingo@358: * ingo@358: * @return the number of sections. ingo@358: */ ingo@358: int getSectionCount(); ingo@358: ingo@358: /** ingo@358: * Returns the section at position pos. ingo@358: * ingo@358: * @param pos the position of the target Section. ingo@358: * ingo@358: * @return the Section at position pos or null if no Section is ingo@358: * existing at pos. ingo@358: */ ingo@358: Section getSection(int pos); ingo@358: ingo@358: /** ingo@359: * Removes a Section if it is existing in this Settings. ingo@359: * ingo@359: * @param section The section that should be removed. ingo@359: */ ingo@359: void removeSection(Section section); ingo@359: ingo@359: /** ingo@358: * Transforms this Settings object into a XML representation. Therefore, ingo@358: * each Section object's toXML method is called to append its XML ingo@358: * representation to the final document. ingo@358: * ingo@358: * @param parent The parent node. ingo@358: */ ingo@358: void toXML(Node parent); ingo@358: } ingo@358: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :