Gridarta Editor
net.sf.gridarta.preferences.FilePreferences Class Referenceabstract

Implements a Preferences that stores all values in a Storage instance. More...

+ Inheritance diagram for net.sf.gridarta.preferences.FilePreferences:
+ Collaboration diagram for net.sf.gridarta.preferences.FilePreferences:

Public Member Functions

void flush () throws BackingStoreException
 RefusedBequest More...
 
String get (@NotNull final String key, @Nullable final String def)
 RefusedBequest More...
 
boolean getBoolean (@NotNull final String key, final boolean def)
 
double getDouble (@NotNull final String key, final double def)
 
float getFloat (@NotNull final String key, final float def)
 
int getInt (@NotNull final String key, final int def)
 
long getLong (@NotNull final String key, final long def)
 
void sync () throws BackingStoreException
 RefusedBequest More...
 

Protected Member Functions

String [] childrenNamesSpi () throws BackingStoreException
 
AbstractPreferences childSpi (@NotNull final String name)
 
 FilePreferences (@Nullable final AbstractPreferences parent, @NotNull final String name, @NotNull final NodeType nodeType, @NotNull final Storage storage)
 Create a new instance. More...
 
void flushSpi () throws BackingStoreException
 
String getSpi (@NotNull final String key)
 
Storage getStorage ()
 Return the storage instance used for loading/saving values. More...
 
String [] keysSpi () throws BackingStoreException
 
void putSpi (@NotNull final String key, @NotNull final String value)
 
void removeNodeSpi () throws BackingStoreException
 
void removeSpi (@NotNull final String key)
 
void syncSpi () throws BackingStoreException
 

Private Attributes

final String fullName
 The full path name of this node. More...
 
final NodeType nodeType
 The node type of this node. More...
 
final Storage storage
 The Storage instance used for loading/saving values. More...
 

Static Private Attributes

static final Category LOG = Logger.getLogger(FilePreferences.class)
 The Logger for printing log messages. More...
 

Detailed Description

Implements a Preferences that stores all values in a Storage instance.

Author
Andreas Kirschbaum

Definition at line 36 of file FilePreferences.java.

Constructor & Destructor Documentation

◆ FilePreferences()

net.sf.gridarta.preferences.FilePreferences.FilePreferences ( @Nullable final AbstractPreferences  parent,
@NotNull final String  name,
@NotNull final NodeType  nodeType,
@NotNull final Storage  storage 
)
protected

Create a new instance.

Parameters
parentthe parent node, or
null
if this node is the root node
namethe name of this node
nodeTypethe node type of this node
storagethe storage instance used for loading/saving values

Definition at line 71 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.nodeType, and net.sf.gridarta.preferences.FilePreferences.storage.

Member Function Documentation

◆ childrenNamesSpi()

String [] net.sf.gridarta.preferences.FilePreferences.childrenNamesSpi ( ) throws BackingStoreException
protected

Definition at line 96 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.childrenNames().

+ Here is the call graph for this function:

◆ childSpi()

AbstractPreferences net.sf.gridarta.preferences.FilePreferences.childSpi ( @NotNull final String  name)
protected

Definition at line 105 of file FilePreferences.java.

◆ flush()

void net.sf.gridarta.preferences.FilePreferences.flush ( ) throws BackingStoreException

RefusedBequest

Definition at line 118 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.sync().

+ Here is the call graph for this function:

◆ flushSpi()

void net.sf.gridarta.preferences.FilePreferences.flushSpi ( ) throws BackingStoreException
protected

Definition at line 110 of file FilePreferences.java.

◆ get()

String net.sf.gridarta.preferences.FilePreferences.get ( @NotNull final String  key,
@Nullable final String  def 
)

RefusedBequest

Definition at line 131 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.getSpi(), and net.sf.gridarta.preferences.FilePreferences.putSpi().

+ Here is the call graph for this function:

◆ getBoolean()

boolean net.sf.gridarta.preferences.FilePreferences.getBoolean ( @NotNull final String  key,
final boolean  def 
)

Definition at line 169 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.putSpi().

+ Here is the call graph for this function:

◆ getDouble()

double net.sf.gridarta.preferences.FilePreferences.getDouble ( @NotNull final String  key,
final double  def 
)

Definition at line 176 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.putSpi().

+ Here is the call graph for this function:

◆ getFloat()

float net.sf.gridarta.preferences.FilePreferences.getFloat ( @NotNull final String  key,
final float  def 
)

Definition at line 183 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.putSpi().

+ Here is the call graph for this function:

◆ getInt()

int net.sf.gridarta.preferences.FilePreferences.getInt ( @NotNull final String  key,
final int  def 
)

Definition at line 190 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.putSpi().

+ Here is the call graph for this function:

◆ getLong()

long net.sf.gridarta.preferences.FilePreferences.getLong ( @NotNull final String  key,
final long  def 
)

Definition at line 197 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.putSpi().

+ Here is the call graph for this function:

◆ getSpi()

String net.sf.gridarta.preferences.FilePreferences.getSpi ( @NotNull final String  key)
protected

Definition at line 205 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.getValue().

Referenced by net.sf.gridarta.preferences.FilePreferences.get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStorage()

Storage net.sf.gridarta.preferences.FilePreferences.getStorage ( )
protected

Return the storage instance used for loading/saving values.

Returns
the storage instance

Definition at line 90 of file FilePreferences.java.

References net.sf.gridarta.preferences.FilePreferences.storage.

◆ keysSpi()

String [] net.sf.gridarta.preferences.FilePreferences.keysSpi ( ) throws BackingStoreException
protected

Definition at line 215 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.getKeys().

+ Here is the call graph for this function:

◆ putSpi()

void net.sf.gridarta.preferences.FilePreferences.putSpi ( @NotNull final String  key,
@NotNull final String  value 
)
protected

◆ removeNodeSpi()

void net.sf.gridarta.preferences.FilePreferences.removeNodeSpi ( ) throws BackingStoreException
protected

Definition at line 233 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.removeNode().

+ Here is the call graph for this function:

◆ removeSpi()

void net.sf.gridarta.preferences.FilePreferences.removeSpi ( @NotNull final String  key)
protected

Definition at line 242 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.removeValue().

+ Here is the call graph for this function:

◆ sync()

void net.sf.gridarta.preferences.FilePreferences.sync ( ) throws BackingStoreException

RefusedBequest

Definition at line 259 of file FilePreferences.java.

References net.sf.gridarta.preferences.Storage.sync().

+ Here is the call graph for this function:

◆ syncSpi()

void net.sf.gridarta.preferences.FilePreferences.syncSpi ( ) throws BackingStoreException
protected

Definition at line 251 of file FilePreferences.java.

Member Data Documentation

◆ fullName

final String net.sf.gridarta.preferences.FilePreferences.fullName
private

The full path name of this node.

It is used as a key in the preferences file.

Definition at line 55 of file FilePreferences.java.

◆ LOG

final Category net.sf.gridarta.preferences.FilePreferences.LOG = Logger.getLogger(FilePreferences.class)
staticprivate

The Logger for printing log messages.

Definition at line 42 of file FilePreferences.java.

◆ nodeType

final NodeType net.sf.gridarta.preferences.FilePreferences.nodeType
private

The node type of this node.

Definition at line 48 of file FilePreferences.java.

Referenced by net.sf.gridarta.preferences.FilePreferences.FilePreferences().

◆ storage

final Storage net.sf.gridarta.preferences.FilePreferences.storage
private

The Storage instance used for loading/saving values.

Definition at line 61 of file FilePreferences.java.

Referenced by net.sf.gridarta.preferences.FilePreferences.FilePreferences(), and net.sf.gridarta.preferences.FilePreferences.getStorage().


The documentation for this class was generated from the following file: