Examples of UploadService


Examples of org.exoplatform.upload.UploadService

        return service.getUploadResource(uploadId);
    }

    public InputStream[] getUploadDataAsStreams() throws FileNotFoundException {
        List<InputStream> holder = new ArrayList<InputStream>();
        UploadService service = getApplicationComponent(UploadService.class);
        for (int i = 0; i < uploadIds.size(); i++) {
            UploadResource uploadResource = service.getUploadResource(uploadIds.get(i));
            if (uploadResource == null)
                continue;
            File file = new File(uploadResource.getStoreLocation());
            holder.add(new FileInputStream(file));
        }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

        }
        return holder.toArray(new InputStream[holder.size()]);
    }

    public InputStream getUploadDataAsStream(String uploadId) throws FileNotFoundException {
        UploadService service = getApplicationComponent(UploadService.class);
        UploadResource uploadResource = service.getUploadResource(uploadId);
        if (uploadResource == null)
            return null;
        else
            return new FileInputStream(new File(uploadResource.getStoreLocation()));
    }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

    private boolean isAutoUpload = false;

    public UIFormUploadInput(String name, String bindingExpression) {
        super(name, bindingExpression, String.class);
        uploadId_ = Integer.toString(Math.abs(hashCode()));
        UploadService service = getApplicationComponent(UploadService.class);
        service.addUploadLimit(uploadId_, null); // Use the limit set by the service. Warning, the service can allow no size
                                                 // limit (value to 0)
        setComponentConfig(UIFormUploadInput.class, null);
    }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

    }

    public UIFormUploadInput(String name, String bindingExpression, int limit) {
        super(name, bindingExpression, String.class);
        uploadId_ = Integer.toString(Math.abs(hashCode()));
        UploadService service = getApplicationComponent(UploadService.class);
        service.addUploadLimit(uploadId_, Integer.valueOf(limit)); // Use the limit set by constructor.
        setComponentConfig(UIFormUploadInput.class, null);
    }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

    public UIFormUploadInput(String name, String bindingExpression, boolean isAutoUpload) {
        super(name, bindingExpression, String.class);
        uploadId_ = Integer.toString(Math.abs(hashCode()));
        this.isAutoUpload = isAutoUpload;
        UploadService service = getApplicationComponent(UploadService.class);
        service.addUploadLimit(uploadId_, null);
        setComponentConfig(UIFormUploadInput.class, null);
    }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

    public UIFormUploadInput(String name, String bindingExpression, int limit, boolean isAutoUpload) {
        super(name, bindingExpression, String.class);
        uploadId_ = Integer.toString(Math.abs(hashCode()));
        this.isAutoUpload = isAutoUpload;
        UploadService service = getApplicationComponent(UploadService.class);
        service.addUploadLimit(uploadId_, Integer.valueOf(limit)); // Use the limit set by constructor.
        setComponentConfig(UIFormUploadInput.class, null);
    }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

    public void decode(Object input, WebuiRequestContext context) {
        uploadResource_ = null;
        boolean hasUpload = "true".equals(input);
        if (hasUpload) {
            UploadService service = getApplicationComponent(UploadService.class);
            uploadResource_ = service.getUploadResource(uploadId_);
        }
    }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

   public UIFormUploadInput(String name, String bindingExpression)
   {
      super(name, bindingExpression, String.class);
      uploadId_ = Integer.toString(Math.abs(hashCode()));
      UploadService service = getApplicationComponent(UploadService.class);
      service.addUploadLimit(uploadId_, null); // Use the limit set by the service. Warning, the service can allow no size limit (value to 0)
      setComponentConfig(UIFormUploadInput.class, null);
   }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

   public UIFormUploadInput(String name, String bindingExpression, int limit)
   {
      super(name, bindingExpression, String.class);
      uploadId_ = Integer.toString(Math.abs(hashCode()));
      UploadService service = getApplicationComponent(UploadService.class);
      service.addUploadLimit(uploadId_, Integer.valueOf(limit)); // Use the limit set by constructor.
      setComponentConfig(UIFormUploadInput.class, null);
   }
View Full Code Here

Examples of org.exoplatform.upload.UploadService

   public UIFormUploadInput(String name, String bindingExpression, boolean isAutoUpload)
   {
      super(name, bindingExpression, String.class);
      uploadId_ = Integer.toString(Math.abs(hashCode()));
      this.isAutoUpload = isAutoUpload;
      UploadService service = getApplicationComponent(UploadService.class);
      service.addUploadLimit(uploadId_, null);
      setComponentConfig(UIFormUploadInput.class, null);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.