edu.wisc.trace.urcsdk.target.uisocket
Class AbstractUISocketElement

java.lang.Object
  extended by edu.wisc.trace.urcsdk.target.uisocket.AbstractUISocketElement
All Implemented Interfaces:
IUISocketElement, java.lang.Cloneable
Direct Known Subclasses:
UISocketCommand, UISocketConstant, UISocketNotification, UISocketVariable

public abstract class AbstractUISocketElement
extends java.lang.Object
implements IUISocketElement

AbstractUISocketElement is the abstract representation of a UI Socket Element. All other forms of socket element extend this class (Target version).

Version:
$Revision: 1.21 $
Author:
Andrew Martin, Trace R&D Center

Field Summary
protected  java.lang.String id
           
protected  java.util.logging.Logger logger
           
protected  java.lang.String ref
           
protected  boolean secret
           
protected  boolean sensitive
           
protected  TargetSession session
           
protected  UISocket socket
           
protected  UISocketDocument socketDocument
           
protected  boolean timeout
           
protected  java.lang.String type
           
protected  java.lang.Object value
           
 
Constructor Summary
AbstractUISocketElement()
          Creates a new AbstractUISocketElement instance.
AbstractUISocketElement(UISocket socket)
          Creates a new AbstractUISocketElement instance.
AbstractUISocketElement(UISocketDocument parent, UISocket socket, org.w3c.dom.Element rootElement)
          Creates a new AbstractUISocketElement instance.
 
Method Summary
 java.lang.Object clone()
          Returnes a copy of the object
 java.lang.String getId()
          Returns the Id of the UISocketElement
 java.lang.String getRef()
          Returns the Ref of this element.
 TargetSession getSession()
          Get the TargetSession for this IUISocketElement
 UISocket getSocket()
          Returns the UISocket object associated with this element.
 UISocketDocument getSocketDocument()
          Returns the parent UISocketDocument of this element
 java.lang.String getType()
          Returns the type of this element.
 java.lang.Object getValue()
          Returns the current value of this element.
 boolean internalSetValue(java.lang.Object value)
          Sets this element's current value and update the Client
 boolean isWritable()
          Returns true if this element is writable.
 void parse(org.w3c.dom.Element rootElement)
          Parses the given element for the data required to create a UISocketElement
 void setSession(TargetSession sess)
          Sets the TargetSession for this IUISocketElement
 void setSocket(UISocket socket)
          Sets the UISocket associated with this element.
 void setSocketDocument(UISocketDocument socketDocument)
          Sets the UISocketDocument associated with this element.
 boolean setValue(java.lang.Object value)
          Sets this element's current value and update the Client
 java.lang.String toString()
          Returns a String representation of this object.
abstract  java.lang.Object validate(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

logger

protected java.util.logging.Logger logger

socketDocument

protected UISocketDocument socketDocument

ref

protected java.lang.String ref

secret

protected boolean secret

sensitive

protected boolean sensitive

socket

protected UISocket socket

timeout

protected boolean timeout

type

protected java.lang.String type

value

protected java.lang.Object value

session

protected TargetSession session
Constructor Detail

AbstractUISocketElement

public AbstractUISocketElement()
Creates a new AbstractUISocketElement instance.


AbstractUISocketElement

public AbstractUISocketElement(UISocket socket)
Creates a new AbstractUISocketElement instance.

Parameters:
socket - the parent UISocket

AbstractUISocketElement

public AbstractUISocketElement(UISocketDocument parent,
                               UISocket socket,
                               org.w3c.dom.Element rootElement)
                        throws UrcException
Creates a new AbstractUISocketElement instance.

Parameters:
parent - an UISocketDocument value
socket - an UISocket value
rootElement - an Element value
Throws:
UrcException - if an error occurs
Method Detail

clone

public java.lang.Object clone()
Returnes a copy of the object

Specified by:
clone in interface IUISocketElement
Overrides:
clone in class java.lang.Object
Returns:
an Object value

getId

public java.lang.String getId()
Returns the Id of the UISocketElement

Specified by:
getId in interface IUISocketElement
Returns:
a String value

getSocketDocument

public UISocketDocument getSocketDocument()
Returns the parent UISocketDocument of this element

Returns:
an UISocketDocument value

validate

public abstract java.lang.Object validate(java.lang.String value)

getRef

public java.lang.String getRef()
Returns the Ref of this element.

Returns:
a String value

getSocket

public UISocket getSocket()
Returns the UISocket object associated with this element.

Returns:
an UISocket value

getType

public java.lang.String getType()
Returns the type of this element.

Specified by:
getType in interface IUISocketElement
Returns:
a String value

getValue

public java.lang.Object getValue()
Returns the current value of this element.

Specified by:
getValue in interface IUISocketElement
Returns:
an Object value

isWritable

public boolean isWritable()
Returns true if this element is writable.

Specified by:
isWritable in interface IUISocketElement
Returns:
a boolean value

parse

public void parse(org.w3c.dom.Element rootElement)
           throws UrcException
Parses the given element for the data required to create a UISocketElement

Specified by:
parse in interface IUISocketElement
Parameters:
rootElement - the Element object to parse
Throws:
UrcException - if an error occurs

setSocketDocument

public void setSocketDocument(UISocketDocument socketDocument)
Sets the UISocketDocument associated with this element.

Parameters:
socketDocument - the new UISocketDocument object

setSocket

public void setSocket(UISocket socket)
Sets the UISocket associated with this element.

Parameters:
socket - the new UISocket object

setValue

public boolean setValue(java.lang.Object value)
                 throws UrcException
Sets this element's current value and update the Client

Parameters:
value - the new value
Returns:
returns true if successful
Throws:
UrcException

internalSetValue

public boolean internalSetValue(java.lang.Object value)
                         throws UrcException
Sets this element's current value and update the Client

Parameters:
value - the new value
Returns:
returns true if successful
Throws:
UrcException

setSession

public void setSession(TargetSession sess)
Sets the TargetSession for this IUISocketElement

Parameters:
sess - a TargetSession

getSession

public TargetSession getSession()
Get the TargetSession for this IUISocketElement

Returns:
TargetSession

toString

public java.lang.String toString()
Returns a String representation of this object.

Specified by:
toString in interface IUISocketElement
Overrides:
toString in class java.lang.Object
Returns:
a String value


Copyright © 2006 Trace R&D Center, University of Wisconsin-Madison. All Rights Reserved.