wt.prefs
Class FilePrefEntry

java.lang.Object
  extended bywt.prefs.AbstractPrefEntry
      extended bywt.prefs.FilePrefEntry
All Implemented Interfaces:
Externalizable, PrefEntry, Serializable

public class FilePrefEntry
extends AbstractPrefEntry
implements Externalizable



Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Fields inherited from class wt.prefs.AbstractPrefEntry
 
Fields inherited from interface wt.prefs.PrefEntry
CONTEXT, NAME, NODE, PARENT, VALUE
 
Constructor Summary
FilePrefEntry()
          

Supported API: false
FilePrefEntry(String parent, String node, String context, String name, String value)
          

Supported API: false
 
Method Summary
 String[] children(String[] search_context)
          Will return all the children of the given node

Supported API: false
 void delete()
          

Supported API: false
 void persist()
          

Supported API: false
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(FilePrefEntry thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 PrefEntry retrieve()
          

Supported API: false
 PrefEntry[] retrieveAll()
          

Supported API: false
 ArrayList search(String search, String[] contexts, boolean isLike)
          This will search the Preference Entry for the search string.
 void update()
          

Supported API: false
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.prefs.AbstractPrefEntry
getContext, getName, getNode, getParent, getValue, readVersion, setContext, setName, setNode, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

FilePrefEntry

public FilePrefEntry()
              throws WTException


Supported API: false

Throws:
WTException

FilePrefEntry

public FilePrefEntry(String parent,
                     String node,
                     String context,
                     String name,
                     String value)
              throws WTException


Supported API: false

Parameters:
parent -
node -
context -
name -
value -
Throws:
WTException
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractPrefEntry
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractPrefEntry
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(FilePrefEntry thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

delete

public void delete()


Supported API: false

Specified by:
delete in interface PrefEntry
Specified by:
delete in class AbstractPrefEntry

retrieve

public PrefEntry retrieve()


Supported API: false

Specified by:
retrieve in interface PrefEntry
Specified by:
retrieve in class AbstractPrefEntry
Returns:
PrefEntry

update

public void update()


Supported API: false

Specified by:
update in interface PrefEntry
Specified by:
update in class AbstractPrefEntry

persist

public void persist()


Supported API: false

Specified by:
persist in interface PrefEntry
Specified by:
persist in class AbstractPrefEntry

retrieveAll

public PrefEntry[] retrieveAll()


Supported API: false

Specified by:
retrieveAll in interface PrefEntry
Specified by:
retrieveAll in class AbstractPrefEntry
Returns:
PrefEntry[]

children

public String[] children(String[] search_context)
Will return all the children of the given node

Supported API: false

Specified by:
children in interface PrefEntry
Specified by:
children in class AbstractPrefEntry
Parameters:
search_context -
Returns:
String[]

search

public ArrayList search(String search,
                        String[] contexts,
                        boolean isLike)
                 throws WTException
This will search the Preference Entry for the search string. The string will be enclosed with '%' as a wildcard. Also '%' may appear elsewhere in the string indicating a wildcard. if two '%%' appear this represents an actual '%' character. This method should return an ArrayList of matching PrefSearch objects. If there are no items then the ArrayList should be empty but not null. PrefSearch API can be found in the Javadoc.

Supported API: true

Specified by:
search in interface PrefEntry
Specified by:
search in class AbstractPrefEntry
Parameters:
search - The string to search for
contexts - The list of search contexts to use for the search.
isLike - Whether the search is a LIKE search or exact match
Returns:
ArrayList
Throws:
WTException