Package org.apache.wicket.util.file

Examples of org.apache.wicket.util.file.Folder$FileFilter


{
    private final Folder baseFolder;

    public FileManager(final String baseFolder)
    {
        this.baseFolder = new Folder(baseFolder);
    }
View Full Code Here


   *            add a path that is lookup through the servlet context
   */
  @Override
  public void add(String path)
  {
    final Folder folder = new Folder(path);
    if (folder.exists())
    {
      log.debug("Added path '{}' as a folder.", path);
      super.add(folder);
    }
    else
View Full Code Here

      this.getClass().getName().replace('.', '/'), null, null, null, "txt", false);
    String path = getPath(resource);
    path = Strings.beforeLastPathComponent(path, '/') + "/sourcePath";

    // and execute
    executeMultiple(new Path(new Folder(path)));
  }
View Full Code Here

   * @param parameters
   *            Page parameters
   */
  public UploadPage(final PageParameters parameters)
  {
    Folder uploadFolder = getUploadFolder();

    // Create feedback panels
    final FeedbackPanel uploadFeedback = new FeedbackPanel("uploadFeedback");

    // Add uploadFeedback to the page itself
    add(uploadFeedback);

    // Add simple upload form, which is hooked up to its feedback panel by
    // virtue of that panel being nested in the form.
    final FileUploadForm simpleUploadForm = new FileUploadForm("simpleUpload");
    add(simpleUploadForm);

    // Add folder view
    add(new Label("dir", uploadFolder.getAbsolutePath()));
    fileListView = new FileListView("fileList", new LoadableDetachableModel<List<File>>()
    {
      @Override
      protected List<File> load()
      {
View Full Code Here

      this.getClass().getName().replace('.', '/'), null, null, null, "txt", false);
    String path = getPath(resource);
    path = Strings.beforeLastPathComponent(path, '/') + "/sourcePath";

    // and execute
    executeMultiple(new Path(new Folder(path)));
  }
View Full Code Here

   * @param parameters
   *            Page parameters
   */
  public UploadPage(final PageParameters parameters)
  {
    Folder uploadFolder = getUploadFolder();

    // Create feedback panels
    final FeedbackPanel uploadFeedback = new FeedbackPanel("uploadFeedback");

    // Add uploadFeedback to the page itself
    add(uploadFeedback);

    // Add simple upload form, which is hooked up to its feedback panel by
    // virtue of that panel being nested in the form.
    final FileUploadForm simpleUploadForm = new FileUploadForm("simpleUpload");
    add(simpleUploadForm);

    // Add folder view
    add(new Label("dir", uploadFolder.getAbsolutePath()));
    fileListView = new FileListView("fileList", new LoadableDetachableModel<List<File>>()
    {
      @Override
      protected List<File> load()
      {
View Full Code Here

   * @param parameters
   *            Page parameters
   */
  public MultiUploadPage(final PageParameters parameters)
  {
    Folder uploadFolder = getUploadFolder();

    // Create feedback panels
    final FeedbackPanel uploadFeedback = new FeedbackPanel("uploadFeedback");

    // Add uploadFeedback to the page itself
    add(uploadFeedback);

    // Add simple upload form, which is hooked up to its feedback panel by
    // virtue of that panel being nested in the form.
    final FileUploadForm simpleUploadForm = new FileUploadForm("simpleUpload");
    add(simpleUploadForm);

    // Add folder view
    add(new Label("dir", uploadFolder.getAbsolutePath()));
    fileListView = new FileListView("fileList", new LoadableDetachableModel<List<File>>()
    {
      @Override
      protected List<File> load()
      {
View Full Code Here

   * @param parameters
   *            Page parameters
   */
  public UploadPage(final PageParameters parameters)
  {
    Folder uploadFolder = getUploadFolder();

    // Create feedback panels
    final FeedbackPanel uploadFeedback = new FeedbackPanel("uploadFeedback");

    // Add uploadFeedback to the page itself
    add(uploadFeedback);

    // Add simple upload form, which is hooked up to its feedback panel by
    // virtue of that panel being nested in the form.
    final FileUploadForm simpleUploadForm = new FileUploadForm("simpleUpload");
    add(simpleUploadForm);

    // Add folder view
    add(new Label("dir", uploadFolder.getAbsolutePath()));
    fileListView = new FileListView("fileList", new LoadableDetachableModel<List<File>>()
    {
      @Override
      protected List<File> load()
      {
View Full Code Here

    IResourceStream resource = locator.locate(getClass(),this.getClass().getName().replace('.', '/'), null, null, "txt");
    String path = getPath(resource);
    path = Strings.beforeLastPathComponent(path, '/') + "/sourcePath";

    // and execute
    executeMultiple(new Path(new Folder(path)));
  }
View Full Code Here

  {
    super.init();

    getResourceSettings().setThrowExceptionOnMissingResource(false);

    uploadFolder = new Folder(System.getProperty("java.io.tmpdir"), "wicket-uploads");
    // Ensure folder exists
    uploadFolder.mkdirs();

    mountBookmarkablePage("/multi", MultiUploadPage.class);
    mountBookmarkablePage("/single", UploadPage.class);
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.file.Folder$FileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.