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 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 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
static ResourceAndResourceNameFilter createFilter(Object filter)
          sets a filter
static ResourceAndResourceNameFilter createFilter(String pattern)
           
static ResourceAndResourceNameFilter createFilter(UDF filter)
           
 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 setDirectory(String directory)
          set the value directory The name of the directory to perform the action against.
 void setFilter(Object 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 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)
           
 
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
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
See Also:
Tag.release()

createFilter

public static ResourceAndResourceNameFilter createFilter(Object filter)
                                                  throws PageException
sets a filter

Parameters:
pattern -
Throws:
PageException

createFilter

public static ResourceAndResourceNameFilter createFilter(UDF filter)
                                                  throws PageException
Throws:
PageException

createFilter

public static ResourceAndResourceNameFilter createFilter(String pattern)
                                                  throws PageException
Throws:
PageException

setFilter

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

setFilter

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

setFilter

public void setFilter(String pattern)
               throws PageException
Throws:
PageException

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)
            throws ApplicationException
Throws:
ApplicationException

setStoreacl

public void setStoreacl(Object acl)
                 throws ApplicationException
Throws:
ApplicationException

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

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.

doStartTag

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

doEndTag

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

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

setType

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


Copyright © 2012 Railo