com.sas.swing.models.remotefileselector
Class Util

com.sas.swing.models.remotefileselector.Util

public abstract class Util

Utility methods used by the RemoteFileSelector.

Since:
3.1

Constructor Summary
Util()
           
 
Method Summary
static void parseIntoFoldersAndPaths(java.lang.String path, RemoteFileServerModelInterface model, java.util.List folderNames, java.util.List listOfPaths)
          Takes a given file system path and breaks it into the component pieces.
static java.lang.String stripBasePath(java.lang.String path, java.lang.String basePath)
          This methods strips the base path from the beginning of the path.
 

Constructor Detail

Util

public Util()
Method Detail

stripBasePath

public static java.lang.String stripBasePath(java.lang.String path,
                                             java.lang.String basePath)
This methods strips the base path from the beginning of the path. The returned path contains the folders that should be visible to the user.

Parameters:
path - entire path
basePath - parts of the path thar are removed from the beginning of the path, null is not a valid value for the basePath

parseIntoFoldersAndPaths

public static void parseIntoFoldersAndPaths(java.lang.String path,
                                            RemoteFileServerModelInterface model,
                                            java.util.List folderNames,
                                            java.util.List listOfPaths)
Takes a given file system path and breaks it into the component pieces. The complete path for the first folder in the folderNames list is the first item in the listOfPaths list. The list are populated in the same order. If a null is passed in for the listOfPaths parameter, then only the list of folderNames is populated. A null specified for the folderNames parameter will cause a NullPointerException.

Parameters:
path - path that is parsed to form the list of folderNames and the list of paths, if the path is null then no processing occurs
model - RemoteFileServerModel instance used to separate path
folderNames - empty list populated with the folderNames in the path
listOfPaths - empty list populated with the complete path associated with each folder



Copyright © 2009 SAS Institute Inc. All Rights Reserved.