railo.runtime.tag
Class Directory

java.lang.Object
  extended by railo.runtime.ext.tag.TagImpl
      extended by railo.runtime.tag.Directory
All Implemented Interfaces:
javax.servlet.jsp.tagext.Tag

public final class Directory
extends TagImpl

Handles interactions with directories.


Field Summary
static ResourceFilter DIRECTORY_FILTER
           
static ResourceFilter FILE_FILTER
           
static int LIST_INFO_ARRAY_NAME
           
static int LIST_INFO_ARRAY_PATH
           
static int LIST_INFO_QUERY_ALL
           
static int LIST_INFO_QUERY_NAME
           
static int NAMECONFLICT_ERROR
           
static int NAMECONFLICT_OVERWRITE
           
static int NAMECONFLICT_UNDEFINED
           
static int TYPE_ALL
           
static int TYPE_DIR
           
static int TYPE_FILE
           
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
Directory()
           
 
Method Summary
static void actionCopy(PageContext pc, Resource directory, String strDestination, String serverPassword, Object acl, int storage, ResourceFilter filter, boolean recurse, int nameconflict)
           
static void actionCreate(PageContext pc, Resource directory, String serverPassword, boolean doParent, int mode, Object acl, int storage)
          create a directory
static void actionDelete(PageContext pc, Resource dir, boolean forceDelete, String serverPassword)
          delete directory
static Object actionList(PageContext pageContext, Resource directory, String serverPassword, int type, ResourceFilter filter, ResourceAndResourceNameFilter nameFilter, int listInfo, boolean recurse, String sort)
          list all files and directories inside a directory
static void actionRename(PageContext pc, Resource directory, String strNewdirectory, String serverPassword, Object acl, int storage)
          rename a directory to a new Name
 int doEndTag()
           
 int doStartTag()
           
 void release()
           
 void setAcl(Object acl)
           
 void setAcl(String acl)
          set the value acl used only for s3 resources, for all others ignored
 void setAction(String action)
          set the value action Defines the action to be taken with directory(ies) specified in directory.
 void setDestination(String destination)
           
 void setDirectory(String directory)
          set the value directory The name of the directory to perform the action against.
 void setFilter(Object filter)
          sets a filter
 void setFilter(String pattern)
           
 void setFilter(UDF filter)
           
 void setListinfo(String strListinfo)
           
 void setMode(String mode)
          set the value mode Used with action = "Create" to define the permissions for a directory on UNIX and Linux platforms.
 void setName(String name)
          set the value name Required for action = "list".
 void setNameconflict(String nameconflict)
          set the value nameconflict Action to take if destination directory is the same as that of a file in the directory.
 void setNewdirectory(String newdirectory)
          set the value newdirectory Required for action = "rename".
 void setRecurse(boolean recurse)
           
 void setServerpassword(String serverPassword)
           
 void setSort(String sort)
          set the value sort Optional for action = "list".
 void setStorage(String storage)
          set the value storage used only for s3 resources, for all others ignored
 void setStoreacl(Object acl)
           
 void setStorelocation(String storage)
           
 void setType(String strType)
           
static int toNameconflict(String nameconflict)
           
 
Methods inherited from class railo.runtime.ext.tag.TagImpl
getParent, required, required, required, required, setPageContext, setPageContext, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_ALL

public static final int TYPE_ALL
See Also:
Constant Field Values

TYPE_FILE

public static final int TYPE_FILE
See Also:
Constant Field Values

TYPE_DIR

public static final int TYPE_DIR
See Also:
Constant Field Values

DIRECTORY_FILTER

public static final ResourceFilter DIRECTORY_FILTER

FILE_FILTER

public static final ResourceFilter FILE_FILTER

LIST_INFO_QUERY_ALL

public static final int LIST_INFO_QUERY_ALL
See Also:
Constant Field Values

LIST_INFO_QUERY_NAME

public static final int LIST_INFO_QUERY_NAME
See Also:
Constant Field Values

LIST_INFO_ARRAY_NAME

public static final int LIST_INFO_ARRAY_NAME
See Also:
Constant Field Values

LIST_INFO_ARRAY_PATH

public static final int LIST_INFO_ARRAY_PATH
See Also:
Constant Field Values

NAMECONFLICT_ERROR

public static final int NAMECONFLICT_ERROR
See Also:
Constant Field Values

NAMECONFLICT_OVERWRITE

public static final int NAMECONFLICT_OVERWRITE
See Also:
Constant Field Values

NAMECONFLICT_UNDEFINED

public static final int NAMECONFLICT_UNDEFINED
See Also:
Constant Field Values
Constructor Detail

Directory

public Directory()
Method Detail

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class TagImpl

setFilter

public void setFilter(Object filter)
               throws PageException
sets a filter

Parameters:
pattern -
Throws:
PageException

setFilter

public void setFilter(UDF filter)
               throws PageException
Throws:
PageException

setFilter

public void setFilter(String pattern)

setAcl

public void setAcl(String acl)
            throws ApplicationException
set the value acl used only for s3 resources, for all others ignored

Parameters:
charset - value to set
Throws:
ApplicationException

setAcl

public void setAcl(Object acl)

setStoreacl

public void setStoreacl(Object acl)

setStorage

public void setStorage(String storage)
                throws PageException
set the value storage used only for s3 resources, for all others ignored

Parameters:
charset - value to set
Throws:
PageException

setStorelocation

public void setStorelocation(String storage)
                      throws PageException
Throws:
PageException

setServerpassword

public void setServerpassword(String serverPassword)

setListinfo

public void setListinfo(String strListinfo)

setDirectory

public void setDirectory(String directory)
set the value directory The name of the directory to perform the action against.

Parameters:
directory - value to set

setAction

public void setAction(String action)
set the value action Defines the action to be taken with directory(ies) specified in directory.

Parameters:
action - value to set

setSort

public void setSort(String sort)
set the value sort Optional for action = "list". Ignored by all other actions. The query columns by which to sort the directory listing. Any combination of columns from query output can be specified in comma-separated list. You can specify ASC (ascending) or DESC (descending) as qualifiers for column names. ASC is the default

Parameters:
sort - value to set

setMode

public void setMode(String mode)
             throws PageException
set the value mode Used with action = "Create" to define the permissions for a directory on UNIX and Linux platforms. Ignored on Windows. Options correspond to the octal values of the UNIX chmod command. From left to right, permissions are assigned for owner, group, and other.

Parameters:
mode - value to set
Throws:
PageException

setNewdirectory

public void setNewdirectory(String newdirectory)
set the value newdirectory Required for action = "rename". Ignored by all other actions. The new name of the directory specified in the directory attribute.

Parameters:
newdirectory - value to set

setDestination

public void setDestination(String destination)

setName

public void setName(String name)
set the value name Required for action = "list". Ignored by all other actions. Name of output query for directory listing.

Parameters:
name - value to set

setRecurse

public void setRecurse(boolean recurse)
Parameters:
recurse - The recurse to set.

setNameconflict

public void setNameconflict(String nameconflict)
                     throws ApplicationException
set the value nameconflict Action to take if destination directory is the same as that of a file in the directory.

Parameters:
nameconflict - value to set
Throws:
ApplicationException

toNameconflict

public static int toNameconflict(String nameconflict)
                          throws ApplicationException
Throws:
ApplicationException

doStartTag

public int doStartTag()
               throws PageException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class TagImpl
Throws:
PageException

doEndTag

public int doEndTag()
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class TagImpl

actionList

public static Object actionList(PageContext pageContext,
                                Resource directory,
                                String serverPassword,
                                int type,
                                ResourceFilter filter,
                                ResourceAndResourceNameFilter nameFilter,
                                int listInfo,
                                boolean recurse,
                                String sort)
                         throws PageException
list all files and directories inside a directory

Throws:
PageException

actionCreate

public static void actionCreate(PageContext pc,
                                Resource directory,
                                String serverPassword,
                                boolean doParent,
                                int mode,
                                Object acl,
                                int storage)
                         throws PageException
create a directory

Throws:
PageException

actionDelete

public static void actionDelete(PageContext pc,
                                Resource dir,
                                boolean forceDelete,
                                String serverPassword)
                         throws PageException
delete directory

Parameters:
dir -
forceDelete -
Throws:
PageException

actionRename

public static void actionRename(PageContext pc,
                                Resource directory,
                                String strNewdirectory,
                                String serverPassword,
                                Object acl,
                                int storage)
                         throws PageException
rename a directory to a new Name

Throws:
PageException

actionCopy

public static void actionCopy(PageContext pc,
                              Resource directory,
                              String strDestination,
                              String serverPassword,
                              Object acl,
                              int storage,
                              ResourceFilter filter,
                              boolean recurse,
                              int nameconflict)
                       throws PageException
Throws:
PageException

setType

public void setType(String strType)
             throws ApplicationException
Parameters:
type - the type to set
Throws:
ApplicationException


Copyright © 2012 Railo