com.sas.sasserver
Class SASListDelegate

com.sas.sasserver.SASListDelegate
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.collection.ContentsChangedListener, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.rmi.LocalModelInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
LevelTreeDelegate, NodeDelegate, SASListNodeDelegate

public class SASListDelegate
implements com.sas.rmi.LocalModelInterface, com.sas.collection.ContentsChangedListener

See Also:
Serialized Form

Field Summary
protected  com.sas.collection.ContentsChangedListenerList allContentsChangedListeners
          List of all the ContentsChangedListeners
protected  boolean hasChildren
          Whether or not this library has any children (SAS files)
protected  boolean libExists
          Flag whether the library actually exists
protected  com.sas.collection.hlist.HListInterface membersList
          Internal collection for storage of the hlist items
protected  boolean needs_refresh
          Flag which indicates whether the model needs to query the remote method for its data
protected  com.sas.collection.OrderedCollectionInterface parsedList
          Internal collection for storage of the string items
protected  int pendingEventGateCount
          Event count for EventGateInterface
 
Constructor Summary
SASListDelegate()
           
 
Method Summary
 void _setRemoteHandle(java.lang.Object o)
          Sets the proxy handle
 void addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
           
 void apply(com.sas.util.ApplyInterface action)
           
 java.lang.Object clone()
          Return a clone of the object.
 boolean contains(java.lang.Object element)
           
 void contentsChanged(com.sas.collection.ContentsChangedEvent cce)
           
 int count()
           
 void disableEvents()
           
 void enableEvents()
           
 boolean equals(com.sas.collection.StaticOrderedCollectionInterface orderedCollection)
           
protected  void fireContentsChanged()
          Fire a default contents changed event.
protected  void fireContentsChanged(com.sas.collection.ContentsChangedEvent event)
          Send a ContentsChangedEvent to all the ContentsChangedListener objects in the listener list.
 void firePropertyChange(java.lang.String prop, java.lang.Object oldv, java.lang.Object newv)
          Report a bound property update to any registered listeners.
 java.lang.Object get(int index)
           
 int getIndex(java.lang.Object element, int startIndex)
           
 java.util.Enumeration getItems()
           
 java.util.Enumeration getItems(int start, int end)
           
 int getLastIndex(java.lang.Object element, int startIndex)
           
 void initialize()
          Overrides the initialize method of Component to initialize local variables
protected  void parseList(com.sas.collection.hlist.HListInterface membersList, com.sas.collection.OrderedCollectionInterface parsedList)
          Parse the hlist returned from the _getMembers call into a string ordered collection based on what has been specified to be displayed.
 java.lang.Object remoteObject()
           
 void removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
           
protected  void resubmitQuery()
          Execute the query to get the names of SAS remote members with the current query information, if the needs_refresh flag is on
 java.lang.String toString()
          Returns the collection of items in a String by calling toString on the ordered collection of items
 

Field Detail

needs_refresh

protected transient boolean needs_refresh
Flag which indicates whether the model needs to query the remote method for its data


parsedList

protected transient com.sas.collection.OrderedCollectionInterface parsedList
Internal collection for storage of the string items


membersList

protected transient com.sas.collection.hlist.HListInterface membersList
Internal collection for storage of the hlist items


pendingEventGateCount

protected transient int pendingEventGateCount
Event count for EventGateInterface


hasChildren

protected transient boolean hasChildren
Whether or not this library has any children (SAS files)


libExists

protected transient boolean libExists
Flag whether the library actually exists


allContentsChangedListeners

protected transient com.sas.collection.ContentsChangedListenerList allContentsChangedListeners
List of all the ContentsChangedListeners

Constructor Detail

SASListDelegate

public SASListDelegate()
Method Detail

remoteObject

public java.lang.Object remoteObject()

_setRemoteHandle

public void _setRemoteHandle(java.lang.Object o)
Description copied from interface: LocalModelInterface

Sets the proxy handle

Specified by:
_setRemoteHandle in interface com.sas.rmi.LocalModelInterface

firePropertyChange

public void firePropertyChange(java.lang.String prop,
                               java.lang.Object oldv,
                               java.lang.Object newv)
Description copied from interface: ComponentInterface
Report a bound property update to any registered listeners. This method returns immediately without any action if there are no registered PropertyChangeEvent listeners. No event is fired if old and new are equal and non-null. This method corresponds to the java.beans.PropertyChangeSupport firePropertyChange method, which we cannot call directly since we have our own com.sas.beans.PropertyChangeEvent.

Specified by:
firePropertyChange in interface com.sas.ComponentInterface
Overrides:
firePropertyChange in class com.sas.Component
Parameters:
prop - The name of the property that was changed. null may be passed in to indicate that a generic change to the component (and not a specific property) was made.
oldv - The old value of the property. null may be passed in to indicate that the old value is unknown.
newv - The new value of the property. null may be passed in to indicate that the new value is unknown.
See Also:
ComponentInterface.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

parseList

protected void parseList(com.sas.collection.hlist.HListInterface membersList,
                         com.sas.collection.OrderedCollectionInterface parsedList)
Parse the hlist returned from the _getMembers call into a string ordered collection based on what has been specified to be displayed. This default implementation will assume the hlist has Strings already parsed for all items. Subclasses with sublists should override this method without calling super.

Parameters:
membersList - The filled in hlist returned from the _getMembers call
parsedList - The collection that will be emptied and filled with the parsed strings

resubmitQuery

protected void resubmitQuery()
Execute the query to get the names of SAS remote members with the current query information, if the needs_refresh flag is on


contains

public boolean contains(java.lang.Object element)
See Also:
StaticCollectionInterface.contains(java.lang.Object)

apply

public void apply(com.sas.util.ApplyInterface action)
See Also:
StaticCollectionInterface.apply(com.sas.util.ApplyInterface)

count

public int count()
See Also:
Countable.count()

getItems

public java.util.Enumeration getItems()
See Also:
Enumerable.getItems()

get

public java.lang.Object get(int index)
See Also:
IndexedGetInterface.get(int)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: Component
Return a clone of the object.

Overrides:
clone in class com.sas.Component
Returns:
a clone of the object.
Throws:
java.lang.CloneNotSupportedException - if the model attached to the component being cloned will not allow the clone to attach.
See Also:
StaticOrderedCollectionInterface.clone()

equals

public boolean equals(com.sas.collection.StaticOrderedCollectionInterface orderedCollection)
See Also:
StaticOrderedCollectionInterface.equals(com.sas.collection.StaticOrderedCollectionInterface)

getIndex

public int getIndex(java.lang.Object element,
                    int startIndex)
See Also:
StaticOrderedCollectionInterface.getIndex(java.lang.Object, int)

getItems

public java.util.Enumeration getItems(int start,
                                      int end)
See Also:
StaticOrderedCollectionInterface.getItems(int, int)

getLastIndex

public int getLastIndex(java.lang.Object element,
                        int startIndex)
See Also:
StaticOrderedCollectionInterface.getLastIndex(java.lang.Object, int)

toString

public java.lang.String toString()
Returns the collection of items in a String by calling toString on the ordered collection of items

Overrides:
toString in class java.lang.Object
Returns:
A string consisting of the comma separated items

contentsChanged

public void contentsChanged(com.sas.collection.ContentsChangedEvent cce)
Specified by:
contentsChanged in interface com.sas.collection.ContentsChangedListener

addContentsChangedListener

public void addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
See Also:
ContentsChangedSource.addContentsChangedListener(com.sas.collection.ContentsChangedListener)

removeContentsChangedListener

public void removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
See Also:
ContentsChangedSource.removeContentsChangedListener(com.sas.collection.ContentsChangedListener)

fireContentsChanged

protected void fireContentsChanged(com.sas.collection.ContentsChangedEvent event)
Send a ContentsChangedEvent to all the ContentsChangedListener objects in the listener list. The listener list is copied first, so the event is sent only to each item which is in the list at the time of this copy, even if adds or removes are performed after the send has started. Also sends the ContentsChangedEvent, which extends PropertyChangeEvent, to all registered propertyChangeListeners, if there are any.

Parameters:
the - event to send
See Also:
addContentsChangedListener(com.sas.collection.ContentsChangedListener), removeContentsChangedListener(com.sas.collection.ContentsChangedListener)

fireContentsChanged

protected void fireContentsChanged()
Fire a default contents changed event. A ContentsChangedEvent will be constructed with this as the source and fireContentsChanged will be called.

See Also:
fireContentsChanged(com.sas.collection.ContentsChangedEvent)

disableEvents

public void disableEvents()
See Also:
EventGateInterface.disableEvents()

enableEvents

public void enableEvents()
See Also:
EventGateInterface.enableEvents()

initialize

public void initialize()
Overrides the initialize method of Component to initialize local variables

Specified by:
initialize in interface com.sas.ComponentInterface
Overrides:
initialize in class com.sas.Component
See Also:
ComponentInterface.initialize()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.