hep.aida.ref.plotter.style.registry
Class BaseStyleStore
- java.lang.Object
-
- hep.aida.ref.plotter.style.registry.BaseStyleStore
-
- All Implemented Interfaces:
- IStyleStore
- Direct Known Subclasses:
- XMLStyleStore
public abstract class BaseStyleStore extends java.lang.Object implements IStyleStore
This abstract class as "In-Memory" copy of persistent Store and implements transient style/rule manipulations. Exact "commit" operations are left to concrete implementations, like XMLStyleStore, DBStyleSTore, etc.
-
-
Field Summary
-
Fields inherited from interface hep.aida.ref.plotter.style.registry.IStyleStore
STYLE_PREVIEW_TYPE, STYLE_STORE_NAME
-
-
Constructor Summary
Constructors Constructor and Description BaseStyleStore(java.lang.String storeName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidaddStoreEntry(StyleStoreEntry entry)voidaddStyle(java.lang.String styleName, IPlotterStyle style)voidaddStyle(java.lang.String styleName, IPlotterStyle style, IStyleRule rule)voidclose()Close all connections and free all resources.abstract voidcommit()Write all information from Store to the undelying persistent facility: XML file, database, etc.IStyleRulecreateRule()This StyleStore creates IStyleRule based on the JEL libraryjava.lang.String[]getAllStyleNames()java.util.PropertiesgetProperties()IStyleRulegetRuleForStyle(java.lang.String styleName)StyleStoreEntrygetStoreEntry(java.lang.String styleName)java.lang.StringgetStoreName()java.lang.StringgetStoreType()IPlotterStylegetStyle(java.lang.String styleName)booleanhasStyle(java.lang.String styleName)booleanisReadOnly()voidmoveDown(java.lang.String styleName)voidmoveDown(StyleStoreEntry entry)voidmoveUp(java.lang.String styleName)voidmoveUp(StyleStoreEntry entry)voidremoveRuleForStyle(java.lang.String styleName)IPlotterStyleremoveStyle(java.lang.String styleName)Remove Style and Rule associated with it from the StorevoidsetRuleForStyle(java.lang.String styleName, IStyleRule rule)java.lang.StringtoString()
-
-
-
Method Detail
-
getProperties
public java.util.Properties getProperties()
-
getStoreEntry
public StyleStoreEntry getStoreEntry(java.lang.String styleName)
-
addStoreEntry
public void addStoreEntry(StyleStoreEntry entry)
-
moveUp
public void moveUp(java.lang.String styleName)
- Specified by:
moveUpin interfaceIStyleStore
-
moveUp
public void moveUp(StyleStoreEntry entry)
-
moveDown
public void moveDown(java.lang.String styleName)
- Specified by:
moveDownin interfaceIStyleStore
-
moveDown
public void moveDown(StyleStoreEntry entry)
-
getStoreName
public java.lang.String getStoreName()
- Specified by:
getStoreNamein interfaceIStyleStore
-
getStoreType
public java.lang.String getStoreType()
- Specified by:
getStoreTypein interfaceIStyleStore
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin interfaceIStyleStore
-
addStyle
public void addStyle(java.lang.String styleName, IPlotterStyle style)- Specified by:
addStylein interfaceIStyleStore
-
addStyle
public void addStyle(java.lang.String styleName, IPlotterStyle style, IStyleRule rule)- Specified by:
addStylein interfaceIStyleStore
-
hasStyle
public boolean hasStyle(java.lang.String styleName)
- Specified by:
hasStylein interfaceIStyleStore
-
getStyle
public IPlotterStyle getStyle(java.lang.String styleName)
- Specified by:
getStylein interfaceIStyleStore
-
removeStyle
public IPlotterStyle removeStyle(java.lang.String styleName)
Description copied from interface:IStyleStoreRemove Style and Rule associated with it from the Store- Specified by:
removeStylein interfaceIStyleStore
-
getAllStyleNames
public java.lang.String[] getAllStyleNames()
- Specified by:
getAllStyleNamesin interfaceIStyleStore
-
createRule
public IStyleRule createRule()
This StyleStore creates IStyleRule based on the JEL library- Specified by:
createRulein interfaceIStyleStore
-
getRuleForStyle
public IStyleRule getRuleForStyle(java.lang.String styleName)
- Specified by:
getRuleForStylein interfaceIStyleStore
-
setRuleForStyle
public void setRuleForStyle(java.lang.String styleName, IStyleRule rule)- Specified by:
setRuleForStylein interfaceIStyleStore
-
removeRuleForStyle
public void removeRuleForStyle(java.lang.String styleName)
- Specified by:
removeRuleForStylein interfaceIStyleStore
-
commit
public abstract void commit()
Write all information from Store to the undelying persistent facility: XML file, database, etc.- Specified by:
commitin interfaceIStyleStore
-
close
public void close()
Close all connections and free all resources. Store is not usable after this method is executed.- Specified by:
closein interfaceIStyleStore
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG