hep.aida.ref.plotter.style.registry
Class BaseStyleStore

java.lang.Object
  extended by 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
BaseStyleStore(java.lang.String storeName)
           
 
Method Summary
 void addStoreEntry(StyleStoreEntry entry)
           
 void addStyle(java.lang.String styleName, hep.aida.IPlotterStyle style)
           
 void addStyle(java.lang.String styleName, hep.aida.IPlotterStyle style, IStyleRule rule)
           
 void close()
          Close all connections and free all resources.
abstract  void commit()
          Write all information from Store to the undelying persistent facility: XML file, database, etc.
 IStyleRule createRule()
          This StyleStore creates IStyleRule based on the JEL library
 java.lang.String[] getAllStyleNames()
           
 java.util.Properties getProperties()
           
 IStyleRule getRuleForStyle(java.lang.String styleName)
           
 StyleStoreEntry getStoreEntry(java.lang.String styleName)
           
 java.lang.String getStoreName()
           
 java.lang.String getStoreType()
           
 hep.aida.IPlotterStyle getStyle(java.lang.String styleName)
           
 boolean hasStyle(java.lang.String styleName)
           
 boolean isReadOnly()
           
 void moveDown(java.lang.String styleName)
           
 void moveDown(StyleStoreEntry entry)
           
 void moveUp(java.lang.String styleName)
           
 void moveUp(StyleStoreEntry entry)
           
 void removeRuleForStyle(java.lang.String styleName)
           
 hep.aida.IPlotterStyle removeStyle(java.lang.String styleName)
          Remove Style and Rule associated with it from the Store
 void setRuleForStyle(java.lang.String styleName, IStyleRule rule)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseStyleStore

public BaseStyleStore(java.lang.String storeName)
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:
moveUp in interface IStyleStore

moveUp

public void moveUp(StyleStoreEntry entry)

moveDown

public void moveDown(java.lang.String styleName)
Specified by:
moveDown in interface IStyleStore

moveDown

public void moveDown(StyleStoreEntry entry)

getStoreName

public java.lang.String getStoreName()
Specified by:
getStoreName in interface IStyleStore

getStoreType

public java.lang.String getStoreType()
Specified by:
getStoreType in interface IStyleStore

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface IStyleStore

addStyle

public void addStyle(java.lang.String styleName,
                     hep.aida.IPlotterStyle style)
Specified by:
addStyle in interface IStyleStore

addStyle

public void addStyle(java.lang.String styleName,
                     hep.aida.IPlotterStyle style,
                     IStyleRule rule)
Specified by:
addStyle in interface IStyleStore

hasStyle

public boolean hasStyle(java.lang.String styleName)
Specified by:
hasStyle in interface IStyleStore

getStyle

public hep.aida.IPlotterStyle getStyle(java.lang.String styleName)
Specified by:
getStyle in interface IStyleStore

removeStyle

public hep.aida.IPlotterStyle removeStyle(java.lang.String styleName)
Description copied from interface: IStyleStore
Remove Style and Rule associated with it from the Store

Specified by:
removeStyle in interface IStyleStore

getAllStyleNames

public java.lang.String[] getAllStyleNames()
Specified by:
getAllStyleNames in interface IStyleStore

createRule

public IStyleRule createRule()
This StyleStore creates IStyleRule based on the JEL library

Specified by:
createRule in interface IStyleStore

getRuleForStyle

public IStyleRule getRuleForStyle(java.lang.String styleName)
Specified by:
getRuleForStyle in interface IStyleStore

setRuleForStyle

public void setRuleForStyle(java.lang.String styleName,
                            IStyleRule rule)
Specified by:
setRuleForStyle in interface IStyleStore

removeRuleForStyle

public void removeRuleForStyle(java.lang.String styleName)
Specified by:
removeRuleForStyle in interface IStyleStore

commit

public abstract void commit()
Write all information from Store to the undelying persistent facility: XML file, database, etc.

Specified by:
commit in interface IStyleStore

close

public void close()
Close all connections and free all resources. Store is not usable after this method is executed.

Specified by:
close in interface IStyleStore

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


jHepWork 1.1 (C) Chekanov