wt.prefs
Class AbstractPrefEntry

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

public abstract class AbstractPrefEntry
extends Object
implements PrefEntry, Externalizable



Supported API: true

Extendable: true

See Also:
Serialized Form

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

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

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

Supported API: false
private  void contextValidate(String a_Context)
           
abstract  void delete()
          

Supported API: false
 String getContext()
          Gets the value of the attribute: context.
 String getName()
          Gets the value of the attribute: name.
 String getNode()
          Gets the value of the attribute: node.
 String getParent()
          Gets the value of the attribute: parent.
 String getValue()
          Gets the value of the attribute: value.
private  void nameValidate(String a_Name)
           
private  void nodeValidate(String a_Node)
           
private  void parentValidate(String a_Parent)
           
abstract  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(AbstractPrefEntry thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
abstract  PrefEntry retrieve()
          

Supported API: false
abstract  PrefEntry[] retrieveAll()
          

Supported API: false
abstract  ArrayList search(String search, String[] contexts, boolean isLike)
          This will search the Preference Entry for the search string.
 void setContext(String a_Context)
          Sets the value of the attribute: context.
 void setName(String a_Name)
          Sets the value of the attribute: name.
 void setNode(String a_Node)
          Sets the value of the attribute: node.
 void setParent(String a_Parent)
          Sets the value of the attribute: parent.
 void setValue(String a_Value)
          Sets the value of the attribute: value.
abstract  void update()
          

Supported API: false
private  void valueValidate(String a_Value)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
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

parent

private String parent

name

private String name

value

private String value

node

private String node

context

private String context

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

AbstractPrefEntry

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


Supported API: false

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

AbstractPrefEntry

public AbstractPrefEntry()
                  throws WTException


Supported API: false

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
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
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(AbstractPrefEntry 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 abstract void delete()


Supported API: false

Specified by:
delete in interface PrefEntry

retrieve

public abstract PrefEntry retrieve()


Supported API: false

Specified by:
retrieve in interface PrefEntry
Returns:
PrefEntry

update

public abstract void update()


Supported API: false

Specified by:
update in interface PrefEntry

persist

public abstract void persist()


Supported API: false

Specified by:
persist in interface PrefEntry

retrieveAll

public abstract PrefEntry[] retrieveAll()


Supported API: false

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

children

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

Supported API: false

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

search

public abstract 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
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

getParent

public String getParent()
Gets the value of the attribute: parent.

Supported API: false

Specified by:
getParent in interface PrefEntry
Returns:
String

setParent

public void setParent(String a_Parent)
               throws WTPropertyVetoException
Sets the value of the attribute: parent.

Supported API: false

Specified by:
setParent in interface PrefEntry
Parameters:
a_Parent -
Throws:
WTPropertyVetoException

parentValidate

private void parentValidate(String a_Parent)
                     throws WTPropertyVetoException
Parameters:
a_Parent -
Throws:
WTPropertyVetoException

getName

public String getName()
Gets the value of the attribute: name.

Supported API: false

Specified by:
getName in interface PrefEntry
Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: name.

Supported API: false

Specified by:
setName in interface PrefEntry
Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getValue

public String getValue()
Gets the value of the attribute: value.

Supported API: false

Specified by:
getValue in interface PrefEntry
Returns:
String

setValue

public void setValue(String a_Value)
              throws WTPropertyVetoException
Sets the value of the attribute: value.

Supported API: false

Specified by:
setValue in interface PrefEntry
Parameters:
a_Value -
Throws:
WTPropertyVetoException

valueValidate

private void valueValidate(String a_Value)
                    throws WTPropertyVetoException
Parameters:
a_Value -
Throws:
WTPropertyVetoException

getNode

public String getNode()
Gets the value of the attribute: node.

Supported API: false

Specified by:
getNode in interface PrefEntry
Returns:
String

setNode

public void setNode(String a_Node)
             throws WTPropertyVetoException
Sets the value of the attribute: node.

Supported API: false

Specified by:
setNode in interface PrefEntry
Parameters:
a_Node -
Throws:
WTPropertyVetoException

nodeValidate

private void nodeValidate(String a_Node)
                   throws WTPropertyVetoException
Parameters:
a_Node -
Throws:
WTPropertyVetoException

getContext

public String getContext()
Gets the value of the attribute: context.

Supported API: false

Specified by:
getContext in interface PrefEntry
Returns:
String

setContext

public void setContext(String a_Context)
                throws WTPropertyVetoException
Sets the value of the attribute: context.

Supported API: false

Specified by:
setContext in interface PrefEntry
Parameters:
a_Context -
Throws:
WTPropertyVetoException

contextValidate

private void contextValidate(String a_Context)
                      throws WTPropertyVetoException
Parameters:
a_Context -
Throws:
WTPropertyVetoException