- java.lang.Object
-
- ilusr.persistencelib.configuration.XmlConfigurationObject
-
- textadventurelib.persistence.TriggerPersistenceObject
-
- All Implemented Interfaces:
ilusr.persistencelib.configuration.IXmlConfigurationObject,ilusr.persistencelib.configuration.PersistXml
- Direct Known Subclasses:
MultiPartTriggerPersistenceObject,PlayerTriggerPersistenceObject,ScriptedTriggerPersistenceObject,TextTriggerPersistenceObject
public abstract class TriggerPersistenceObject extends ilusr.persistencelib.configuration.XmlConfigurationObject- Author:
- Jeff Riggle
-
-
Constructor Summary
Constructors Constructor Description TriggerPersistenceObject(String type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddParameter(ilusr.persistencelib.configuration.XmlConfigurationObject parameter)protected voidclearParameters()Removes all parameters from the parameters section.abstract ITriggerconvertToTrigger()protected List<ilusr.persistencelib.configuration.XmlConfigurationObject>parameters()voidprepareXml()This must be called before saving the xml otherwise this object will not be saved correctly to the xml file.protected voidremoveParameter(ilusr.persistencelib.configuration.XmlConfigurationObject parameter)Stringtype()protected voidtype(String type)-
Methods inherited from class ilusr.persistencelib.configuration.XmlConfigurationObject
addChild, addChildren, addConfigurationProperties, addConfigurationProperty, children, clearChildren, clearConfigurationProperties, configurationProperties, getChildObject, getChildValue, getValueType, load, name, name, persist, removeChild, removeChildren, removeConfigurationProperties, removeConfigurationProperty, value, value
-
-
-
-
Constructor Detail
-
TriggerPersistenceObject
public TriggerPersistenceObject(String type) throws TransformerConfigurationException, ParserConfigurationException
- Parameters:
type- The type of Trigger (ex: Player, Text).- Throws:
TransformerConfigurationExceptionParserConfigurationException
-
-
Method Detail
-
type
public String type()
- Returns:
- The current actions type.
-
convertToTrigger
public abstract ITrigger convertToTrigger()
-
type
protected void type(String type)
- Parameters:
type- The new type of action.
-
addParameter
protected void addParameter(ilusr.persistencelib.configuration.XmlConfigurationObject parameter)
- Parameters:
parameter- A list of @see XmlConfigurationObject to add under the parameters section.
-
removeParameter
protected void removeParameter(ilusr.persistencelib.configuration.XmlConfigurationObject parameter)
- Parameters:
parameter- A list of @see XmlConfigurationObject to remove from the parameters section.
-
clearParameters
protected void clearParameters()
Removes all parameters from the parameters section.
-
parameters
protected List<ilusr.persistencelib.configuration.XmlConfigurationObject> parameters()
- Returns:
- A list of @see XmlConfigurationObject representing the parameters section of the xml.
-
prepareXml
public void prepareXml() throws TransformerConfigurationException, ParserConfigurationExceptionThis must be called before saving the xml otherwise this object will not be saved correctly to the xml file.
-
-