com.sun.rave.web.ui.model
Interface ResourceModel


public interface ResourceModel


Method Summary
 boolean canRead(java.lang.String resourceName)
          This methods checks if the resource path in question can be accessed by the user trying to select or view it.
 boolean canWrite(java.lang.String resourceName)
          This methods checks if the resource path in question can be accessed for writes by the user.
 java.lang.String getAbsoluteRoot()
          Returns the root value of the file system in question.
 java.lang.String getCurrentDir()
          This method is called to get the current directory of the resuource list being displayed in the filechooser's listbox
 java.lang.String getDelimiterChar()
           
 java.lang.String getEscapeChar()
           
 java.lang.String getFilterValue()
          Return the filter String currently in use.
 ResourceItem[] getFolderContent(java.lang.String folder, boolean disableFiles, boolean disableFolders)
          Returns the list of objects in the container represented by the current directory.
 java.lang.String getParentFolder()
           
 ResourceItem getResourceItem(java.lang.String itemKey)
          Given a ResourceItem key return the ResourceItem.
 java.lang.String[] getRoots()
           
 java.lang.Object[] getSelectedContent(java.lang.String[] content, boolean selectFolders)
           
 java.lang.String getSeparatorString()
          Return the separator String for this resource system.
 java.lang.String getServerName()
          Get the Server namefrom where the resources are being loaded.
 java.lang.String getSortValue()
          Return the sort field that is currently active.
 boolean isFolderType(java.lang.String path)
          Returns true if the supplied absolute path is a folder type.
 void setAbsoluteRoot(java.lang.String absRoot)
          Sets the root value of the resource system in question.
 void setCurrentDir(java.lang.String dir)
          This method is called to set the current directory of the resuource list that would be displayed in the next display cycle.
 void setFilterValue(java.lang.String filterString)
          Set the filter String entered by the user in the Filter text field.
 void setServerName(java.lang.String serverName)
          Set the server name from where the resources are being loaded.
 void setSortValue(java.lang.String sortField)
          Set the sort field chosen by the user from the drop down menu.
 

Method Detail

getAbsoluteRoot

java.lang.String getAbsoluteRoot()
Returns the root value of the file system in question. For example, in the default implementation of this interface for local filesystems the root value would be "/" in Unix and "C:\" on Windows.

Returns:
returns the absolute root (directory for files and folders).

setAbsoluteRoot

void setAbsoluteRoot(java.lang.String absRoot)
Sets the root value of the resource system in question. For example, in the default implementation of this interface for local filesystems the root value could be set to "/" in Unix and "C:\" on Windows.

Parameters:
absRoot - - the value to be used as the root of this resource system

getSeparatorString

java.lang.String getSeparatorString()
Return the separator String for this resource system. For a file system chooser this would be File.separator.

Returns:
returns the separator String.

getServerName

java.lang.String getServerName()
Get the Server namefrom where the resources are being loaded.


setServerName

void setServerName(java.lang.String serverName)
Set the server name from where the resources are being loaded.

Parameters:
serverName - - the server name to be set

getFilterValue

java.lang.String getFilterValue()
Return the filter String currently in use.

Returns:
returns the filter String.

setFilterValue

void setFilterValue(java.lang.String filterString)
Set the filter String entered by the user in the Filter text field.

Parameters:
filterString - - the filter string to be used subsequently.

getSortValue

java.lang.String getSortValue()
Return the sort field that is currently active.

Returns:
returns the sort field in use.

setSortValue

void setSortValue(java.lang.String sortField)
Set the sort field chosen by the user from the drop down menu.

Parameters:
sortField - - string representing sortField selected by the user.

getCurrentDir

java.lang.String getCurrentDir()
This method is called to get the current directory of the resuource list being displayed in the filechooser's listbox

Returns:
returns the current root (directory for files and folders).

setCurrentDir

void setCurrentDir(java.lang.String dir)
This method is called to set the current directory of the resuource list that would be displayed in the next display cycle.

Parameters:
dir - - the value to be set the new current root node.

getFolderContent

ResourceItem[] getFolderContent(java.lang.String folder,
                                boolean disableFiles,
                                boolean disableFolders)
Returns the list of objects in the container represented by the current directory. This method returns an Array of ResourecItem objects


getResourceItem

ResourceItem getResourceItem(java.lang.String itemKey)
Given a ResourceItem key return the ResourceItem.

Parameters:
- - the resource item key which is the same as the value of the Option element in the listbox.
Returns:
- the ResourceItem object

isFolderType

boolean isFolderType(java.lang.String path)
Returns true if the supplied absolute path is a folder type.

Parameters:
path - - the absolute path to the resource
Returns:
returns the current root (directory for files and folders).

canRead

boolean canRead(java.lang.String resourceName)
This methods checks if the resource path in question can be accessed by the user trying to select or view it.

Parameters:
resourceName - - the resource name to check for read access
Returns:
true if the user can select the resource specified by the resource name.

canWrite

boolean canWrite(java.lang.String resourceName)
This methods checks if the resource path in question can be accessed for writes by the user.

Parameters:
resourceName - - the resource name to check for write access
Returns:
true if the user can select the resource specified by the resource name for write.

getParentFolder

java.lang.String getParentFolder()

getEscapeChar

java.lang.String getEscapeChar()

getDelimiterChar

java.lang.String getDelimiterChar()

getSelectedContent

java.lang.Object[] getSelectedContent(java.lang.String[] content,
                                      boolean selectFolders)
                                      throws ResourceModelException
Throws:
ResourceModelException

getRoots

java.lang.String[] getRoots()