com.sas.sasserver.tree
Interface LevelTreeInterface

All Superinterfaces:
com.sas.ComponentInterface, com.sas.collection.ContentsChangedSource, java.util.EventListener, LevelDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, java.io.ObjectInputValidation, java.beans.PropertyChangeListener, com.sas.beans.PropertyChangeSource, RemoteLevelTreeInterface, RemoteSASListInterface, java.io.Serializable, com.sas.models.TreeInterface, com.sas.beans.VetoableChangeSource, com.sas.ViewInterface
All Known Subinterfaces:
LevelTreeV2Interface, LevelTreeV3Interface
All Known Implementing Classes:
_rprxIOMLevelTree, _rprxIOMLevelTreeV2, _rprxIOMLevelTreeV3, _rprxJ2LevelTree, _rprxJ2LevelTreeV2, _rprxJ2LevelTreeV3, _rprxRemoteDesignTimeLevelTree, _rprxRemoteDesignTimeLevelTreeV2, _rprxRemoteDesignTimeLevelTreeV3, _rprxRemoteLevelTreeClient, _rprxRemoteLevelTreeV2Client, _rprxRemoteLevelTreeV3Client

public interface LevelTreeInterface
extends com.sas.ComponentInterface, com.sas.models.TreeInterface, RemoteLevelTreeInterface, RemoteSASListInterface, com.sas.collection.ContentsChangedSource, LevelDataInterface

LevelTreeInterface defines an interface that is used to talk to the SAS server to create a LevelTree which can be used to display a SAS level dataset.

The data set must be the structure known as the level data set structure.
An example of how to create a level data set in SAS can be found here.
Example on using the LeveTreeInterface in jsp:

  <html>
  <body>
  <%
  com.sas.rmi.Connection connection = new com.sas.rmi.Connection();
  connection.setHost("localhost");
   
  com.sas.rmi.Rocf rocf = new com.sas.rmi.Rocf();

  com.sas.sasserver.tree.LevelTreeInterface treeModel =
        (com.sas.sasserver.tree.LevelTreeInterface)
         com.sas.servlet.util.Util.newInstance(rocf, connection, 
               com.sas.sasserver.tree.LevelTreeInterface.class);
         
  treeModel.setDataSet("sasuser.orgtest");
  treeModel.setTextColumnName("Name");
  treeModel.setLevelColumnName("Level");
  treeModel.setIndexColumnName("Index");

  //Use TreeView to display
  com.sas.servlet.beans.html.TreeView tc = 
            new com.sas.servlet.beans.html.TreeView();
  tc.setUseTextAsLink(true);   
  tc.setModelInterface(treeModel);
  tc.setImagesLocation("images/");
  tc.write(out);
  rocf.stop();
  %>

  </body>
  </html>

 

See Also:
TreeView, Rocf

Field Summary
static java.lang.String contextClasspath
           
 
Method Summary
 void close()
          Closes the data set if it is open and set the data set to blank
 java.lang.String getDataSet()
          Returns the name of the level SAS data set.
 java.lang.String getDefaultImage()
          Returns name Image image to be displayed for all unexpanded nodes.
 java.lang.String getDefaultImageColumnName()
          Returns name of the column in the level data set that contains the name of the image to be displayed for unexpanded nodes.
 java.lang.String getExpandedImage()
          Returns name of the image to be displayed for expanded nodes.
 java.lang.String getExpandedImageColumnName()
          Returns name of the column in the level data set that contains the name of the image to be displayed for expanded nodes.
 java.lang.String[] getNameValuePairColumns()
          Returns the names of the columns in the level data set that contain values to be used as name value pairs when creating the complete link that is associated with the node in the JavaScript tree.
 java.lang.String getURL()
          Returns the link associated with all nodes in the tree.
 java.lang.String getURLColumnName()
          Returns the name of the column in the level data set that contains the link to be associated with the node in the JavaScript tree.
 java.lang.String getWhere()
          Returns the current where clause applied to the SAS data set.
 void setDataSet(java.lang.String ds)
          Sets the name of the level SAS data set.
 void setDefaultImage(java.lang.String Image)
          Sets the name of the image to be displayed for all unexpanded nodes.
 void setDefaultImageColumnName(java.lang.String Image)
          Sets the name of the column in the level data set that contains the name of the image to be displayed for unexpanded nodes.
 void setExpandedImage(java.lang.String Image)
          Sets the name of the image to be displayed expanded nodes.
 void setExpandedImageColumnName(java.lang.String Image)
          Sets the name of the column in the level data set that contains the name of the image to be displayed expanded nodes.
 void setNameValuePairColumns(java.lang.String[] cols)
          Sets the names of the columns in the level data set that contain values to be used as name value pairs when creating the complete link that is associated with the node in the JavaScript tree.
 void setURL(java.lang.String lnk)
          Sets the link associated with all nodes in the tree.
 void setURLColumnName(java.lang.String col)
          Sets the name of the column in the level data set that contains the link to be associated with the node in the JavaScript tree.
 void setWhere(java.lang.String wc)
          Sets a where clause on the current SAS Data set.
 void validate()
          Validates the model to make sure all required, properties are set as well as ckecks the validity of current properties.
 
Methods inherited from interface com.sas.sasserver.tree.RemoteLevelTreeInterface
_getDataSet, _getDefaultIcon, _getDefaultIconColumn, _getExpandedIcon, _getExpandedIconColumn, _getIndexColumn, _getLevelColumn, _getLink, _getLinkColumn, _getNameValuePairColumns, _getTextColumn, _getTreeNodes, _getWhere, _isValid, _setDataSet, _setDefaultIcon, _setDefaultIconColumn, _setExpandedIcon, _setExpandedIconColumn, _setIndexColumn, _setLevelColumn, _setLink, _setLinkColumn, _setNameValuePairColumns, _setTextColumn, _setWhere, _validate
 
Methods inherited from interface com.sas.sasserver.RemoteSASListInterface
_getMembers
 
Methods inherited from interface com.sas.sasserver.tree.LevelDataInterface
getIndexColumnName, getLevelColumnName, getTextColumnName, setIndexColumnName, setLevelColumnName, setTextColumnName
 

Field Detail

contextClasspath

static final java.lang.String contextClasspath
See Also:
Constant Field Values
Method Detail

getDataSet

java.lang.String getDataSet()
Returns the name of the level SAS data set.

Returns:
SAS data set name
See Also:
setDataSet(java.lang.String)

setDataSet

void setDataSet(java.lang.String ds)
Sets the name of the level SAS data set. Setting the data set name to blank or changing from an existing data set to a different data set will clear the current where clause. Setting the data set name to blank will close the currently open data set, if one is open.

Parameters:
ds - - SAS data set name

getWhere

java.lang.String getWhere()
Returns the current where clause applied to the SAS data set. Setting the data set name to blank or changing from an existing data set to a different data set will clear the current where clause.

Returns:
current where clause

setWhere

void setWhere(java.lang.String wc)
Sets a where clause on the current SAS Data set. Due to the implentation of the Server Side model the where clause string can not exceed 800 bytes. Setting the data set name to blank or changing from an existing data set to a different data set will clear the current where clause.

Parameters:
wc - - where clause to be applied

getDefaultImageColumnName

java.lang.String getDefaultImageColumnName()
Returns name of the column in the level data set that contains the name of the image to be displayed for unexpanded nodes. If no image is defined for expanded nodes this image will be used for expanded nodes also. The image name must be an absolute or relative URL.

Returns:
name of column that contains image URL for the defaultImage.

setDefaultImageColumnName

void setDefaultImageColumnName(java.lang.String Image)
Sets the name of the column in the level data set that contains the name of the image to be displayed for unexpanded nodes. If no image is defined for expanded nodes this image will be used for expanded nodes also. The image name must be an absolute or relative URL.

Parameters:
Image - - name of column that contains image URL for defaultImage.

getDefaultImage

java.lang.String getDefaultImage()
Returns name Image image to be displayed for all unexpanded nodes. If no image is defined for expanded nodes this image will be used for all expanded nodes also. The image name must be an absolute or relative URL.

Returns:
image URL for the defaultImage.

setDefaultImage

void setDefaultImage(java.lang.String Image)
Sets the name of the image to be displayed for all unexpanded nodes. If no image is defined for expanded nodes this image will be used for all expanded nodes also. The image name must be an absolute or relative URL.

Parameters:
Image - - URL for defaultImage.

getExpandedImageColumnName

java.lang.String getExpandedImageColumnName()
Returns name of the column in the level data set that contains the name of the image to be displayed for expanded nodes. The image name must be an absolute or relative URL.

Returns:
name of column that contains image URL for the expandedImage.

setExpandedImageColumnName

void setExpandedImageColumnName(java.lang.String Image)
Sets the name of the column in the level data set that contains the name of the image to be displayed expanded nodes. The image name must be an absolute or relative URL.

Parameters:
Image - - name of column that contains image URL for the expandedImage.

getExpandedImage

java.lang.String getExpandedImage()
Returns name of the image to be displayed for expanded nodes. The image name must be an absolute or relative URL.

Returns:
URL for the expandedImage.

setExpandedImage

void setExpandedImage(java.lang.String Image)
Sets the name of the image to be displayed expanded nodes. The image name must be an absolute or relative URL.

Parameters:
Image - - image URL for the expandedImage.

getURLColumnName

java.lang.String getURLColumnName()
Returns the name of the column in the level data set that contains the link to be associated with the node in the JavaScript tree.

Returns:
name of column that contains the link values

setURLColumnName

void setURLColumnName(java.lang.String col)
Sets the name of the column in the level data set that contains the link to be associated with the node in the JavaScript tree.

Parameters:
col - - name of column that contains the link values

getURL

java.lang.String getURL()
Returns the link associated with all nodes in the tree. This is useful in cases where the link is the same for all nodes, but the values of the name value pairs are different.

Returns:
the value of the link

setURL

void setURL(java.lang.String lnk)
Sets the link associated with all nodes in the tree. This is useful in cases where the link is the same for all nodes, but the values of the name value pairs are different.

Parameters:
lnk - - the value of the link

getNameValuePairColumns

java.lang.String[] getNameValuePairColumns()
Returns the names of the columns in the level data set that contain values to be used as name value pairs when creating the complete link that is associated with the node in the JavaScript tree.

Returns:
an array of column names to be used as name value pairs on the link

setNameValuePairColumns

void setNameValuePairColumns(java.lang.String[] cols)
Sets the names of the columns in the level data set that contain values to be used as name value pairs when creating the complete link that is associated with the node in the JavaScript tree.

Parameters:
cols - - an array of column names to be used as name value pairs on the link

close

void close()
Closes the data set if it is open and set the data set to blank

Specified by:
close in interface RemoteLevelTreeInterface
See Also:
close()

validate

void validate()
              throws com.sas.table.TableException
Validates the model to make sure all required, properties are set as well as ckecks the validity of current properties. This method is called internally by the model before the getTreeNodes() executes. If the model is invalid a TableException is thrown, you can examine the error message, by calling the TableException.getMessage() method.

Throws:
Thrown - if the validation of the model fails
com.sas.table.TableException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.