Package org.apache.juneau.config.event
Class ConfigEvent
java.lang.Object
org.apache.juneau.config.event.ConfigEvent
Represents a change to a config.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConfigEvent(ConfigEventType type, String config, String section, String key, String value, String modifiers, String comment, List<String> preLines) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the entry comment.Returns the configuration name.getKey()Returns the entry name.Returns the modifiers on this entry.Returns the section or entry lines.Returns the section name.getType()Returns the event type.getValue()Returns the entry value.static ConfigEventremoveEntry(String config, String section, String key) Removes a value from a configuration.static ConfigEventremoveSection(String config, String section) Removes a section from the config.static ConfigEventsetEntry(String config, String section, String key, String value, String modifiers, String comment, List<String> prelines) Sets or replaces a value in a configuration.static ConfigEventsetSection(String config, String section, List<String> prelines) Adds a new empty section to the config.toString()
- 
Constructor Details- 
ConfigEventprotected ConfigEvent(ConfigEventType type, String config, String section, String key, String value, String modifiers, String comment, List<String> preLines) Constructor.- Parameters:
- type- - The event type.
- config- - The configuration name.
- section- - The section name.
- key- - The entry name.
- value- - The entry value.
- modifiers- - The entry modifiers.
- comment- - Optional comment string to add on the same line as the entry.
- preLines- - Optional comment lines that occur before this entry.
 
 
- 
- 
Method Details- 
setEntrypublic static ConfigEvent setEntry(String config, String section, String key, String value, String modifiers, String comment, List<String> prelines) Sets or replaces a value in a configuration.- Parameters:
- config- The configuration name.
- section- The section name.
 Must not be- null .
- key- The entry name.
 Must not be- null .
- value- The entry value.
 Can be- null to remove an entry.
- comment- Optional comment string to add on the same line as the entry.
- modifiers- Optional entry modifiers.
- prelines- Comment lines that occur before this entry.
 Must not be- null .
- Returns:
- A new ConfigEventobject.
 
- 
removeEntryRemoves a value from a configuration.- Parameters:
- config- The configuration name.
- section- The section name.
 Must not be- null .
- key- The entry name.
 Must not be- null .
- Returns:
- A new ConfigEventobject.
 
- 
setSectionAdds a new empty section to the config.- Parameters:
- config- The configuration name.
- section- The section name.
- prelines- Comment lines that occur before this section.
 Must not be- null .
- Returns:
- A new ConfigEventobject.
 
- 
removeSectionRemoves a section from the config.- Parameters:
- config- The configuration name.
- section- The section name.
- Returns:
- A new ConfigEventobject.
 
- 
getTypeReturns the event type.- Returns:
- The event type.
 
- 
getConfigReturns the configuration name.- Returns:
- The configuration name.
 
- 
getSectionReturns the section name.- Returns:
- The section name.
 
- 
getKeyReturns the entry name.- Returns:
- The entry name.
 
- 
getValueReturns the entry value.- Returns:
- The entry value.
 
- 
getCommentReturns the entry comment.- Returns:
- The entry comment.
 
- 
getPreLinesReturns the section or entry lines.- Returns:
- The section or entry lines.
 
- 
getModifiersReturns the modifiers on this entry.- Returns:
- The modifier characters.
   
 Nevernull .
 
- 
toString
 
-