docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 5.4System Developer Manual JavaReference for Roxen Java classes
Copyright © 2018, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

AbstractLocationModule
ExperimentalModule
FileExtensionModule
Frame
HTTP
LastResortModule
LocationModule
Module
ParserModule
ProviderModule
RXML
RXML.Backtrace
RoxenClassLoader
RoxenConfiguration
RoxenFileResponse
RoxenLib
RoxenRXMLResponse
RoxenRequest
RoxenResponse
RoxenStringResponse
SecurityModule
SimpleTagCaller
UniqueModule

AbstractLocationModule

: Class AbstractLocationModule

com.roxen.roxen
Class AbstractLocationModule


java.lang.Object
  |
  +--com.roxen.roxen.Module
        |
        +--com.roxen.roxen.AbstractLocationModule
public abstract class AbstractLocationModule
extends Module
implements LocationModule

An abstract adaptor class that provides default implementations for most methods in the LocationModule interface.

A module inheriting this class must either create a module variable location using defvar, or provide a different implementation of the queryLocation method.

See Also:
LocationModule, Module

Fields inherited from class com.roxen.roxen.Module
TYPE_DIR, TYPE_DIR_LIST, TYPE_FILE, TYPE_FILE_LIST, TYPE_FLAG, TYPE_FLOAT, TYPE_FONT, TYPE_INT, TYPE_INT_LIST, TYPE_LOCATION, TYPE_MODULE, TYPE_MULTIPLE_INT, TYPE_MULTIPLE_STRING, TYPE_PASSWORD, TYPE_STRING, TYPE_STRING_LIST, TYPE_TEXT, TYPE_TEXT_FIELD, TYPE_TOGGLE, VAR_DEVELOPER, VAR_EXPERT, VAR_INITIAL, VAR_MORE
 
Constructor Summary
AbstractLocationModule()
           
 
Method Summary
 java.lang.String[] findDir(java.lang.String f, RoxenRequest id)
          List the contents of a directory.
 java.lang.String queryLocation()
          Returns the URL path handled by this module.
 java.lang.String realFile(java.lang.String f, RoxenRequest id)
          Get the real filename of a file.
 int[] statFile(java.lang.String f, RoxenRequest id)
          Get the attributes of a file or directory.
 
Methods inherited from class com.roxen.roxen.Module
defvar, defvar, findInternal, info, myConfiguration, query, queryInt, queryInternalLocation, queryName, queryString, set, set, start, status, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLocationModule


public AbstractLocationModule()
Method Detail

queryLocation


public java.lang.String queryLocation()
Returns the URL path handled by this module. Per default, this is the contents of the module variable location.
Specified by:
queryLocation in interface LocationModule
Returns:
the path name

findDir


public java.lang.String[] findDir(java.lang.String f,
                                  RoxenRequest id)
List the contents of a directory.
Specified by:
findDir in interface LocationModule
Parameters:
f - the path of the directory relative to the location of this module
id - the request object
Returns:
a list of filenames, or null if no such directory exists.

realFile


public java.lang.String realFile(java.lang.String f,
                                 RoxenRequest id)
Get the real filename of a file.
Specified by:
realFile in interface LocationModule
Parameters:
f - the path of the file relative to the location of this module
id - the request object
Returns:
the path of the file in the host filesystem, or null if this resource is not a real file.

statFile


public int[] statFile(java.lang.String f,
                      RoxenRequest id)
Get the attributes of a file or directory. The attributes are a set of 7 integers. These are: mode, size, atime, mtime, ctime, uid, gid.
Specified by:
statFile in interface LocationModule
Parameters:
f - the path of the file or directory relative to the location of this module
id - the request object
Returns:
the attributes of this file or directory, or null if this information is not available.