Class Files


  • public class Files
    extends java.lang.Object
    File accessor.
    • Constructor Summary

      Constructors 
      Constructor Description
      Files​(java.lang.Class<? extends BaseAction> actionClass, java.lang.String id, java.lang.String basedir, java.lang.String wildcard)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.struts.action.ActionForward download​(DynActionForm form)
      Send a file content to output stream.
      java.lang.String getDownloadPermissionAction()
      File download permission action for checking it using p:check.
      java.lang.String getDownloadURL()
      File download URL, e.g.: '/admin/app.do?action=downloadLogUpdate'.
      java.lang.String getId()
      Unique string ID of the files set.
      java.util.List<java.io.File> list()
      List of files matching wildcard sorted in reversed order by modification time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Files

        public Files​(java.lang.Class<? extends BaseAction> actionClass,
                     java.lang.String id,
                     java.lang.String basedir,
                     java.lang.String wildcard)
    • Method Detail

      • getId

        public java.lang.String getId()
        Unique string ID of the files set.
        Returns:
      • getDownloadURL

        public java.lang.String getDownloadURL()
        File download URL, e.g.: '/admin/app.do?action=downloadLogUpdate'. A name param has to be added at the end.
        Returns:
      • getDownloadPermissionAction

        public java.lang.String getDownloadPermissionAction()
        File download permission action for checking it using p:check.
        Returns:
      • list

        public java.util.List<java.io.File> list()
        List of files matching wildcard sorted in reversed order by modification time.
        Returns:
      • download

        public org.apache.struts.action.ActionForward download​(DynActionForm form)
                                                        throws BGIllegalArgumentException,
                                                               java.io.IOException,
                                                               java.io.FileNotFoundException
        Send a file content to output stream.
        Parameters:
        form -
        Returns:
        always 'null'.
        Throws:
        BGIllegalArgumentException
        java.io.IOException
        java.io.FileNotFoundException