Package org.xrace.model

Examples of org.xrace.model.Resource


        try
        {
          String fileName = upload.getClientFileName();
          if (resourceService.validateFormat(fileName, formats))
          {
            Resource resource = resourceService
                .newResourceFromFileName(upload
                    .getClientFileName());
            resourceService.upload(upload.getInputStream(),
                resource);
View Full Code Here


      File image1 = new ClassPathResource("image1.jpg").getFile();
      File image2 = new ClassPathResource("image2.gif").getFile();

      FileInputStream fis = new FileInputStream(image1);
      getResourceService().upload(fis,
          new Resource("image1.jpg", "jpg", "La image1"));
      fis.close();

      fis = new FileInputStream(image2);
      getResourceService().upload(fis,
          new Resource("image2.gif", "gif", "La image2"));
      fis.close();
    }
    catch (FileNotFoundException e)
    {
      throw new SystemeException(e);
View Full Code Here

    File file = new ClassPathResource(
        "org/xrace/service/importation/puces/importation_puces-cas_normal.csv")
        .getFile();

    FileInputStream fis = new FileInputStream(file);
    Resource resource = new Resource("file.csv", "csv", "Le fichier 1");
    getResourceService().upload(fis, resource);
    fis.close();

    importation.setImportFile(resource);
View Full Code Here

TOP

Related Classes of org.xrace.model.Resource

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.