Package org.apache.myfaces.trinidadinternal.config.upload

Examples of org.apache.myfaces.trinidadinternal.config.upload.CompositeUploadedFileProcessorImpl


            ChainedUploadedFileProcessor cufp[] =
            {
              (ChainedUploadedFileProcessor) clazz.newInstance()
            };
        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl(Arrays.asList(cufp)));
          }
          else
          {
            //this is full override usecase
            bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                         clazz.newInstance());
      }
         

        }
      catch (Exception e)
      {
        _LOG.severe("CANNOT_INSTANTIATE_UPLOADEDFILEPROCESSOR", e);
        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl());
      }
    }
    else
    {
        try
        {
          //chained processors usecase, Multiple processors
          List<ChainedUploadedFileProcessor> processors =
                  new ArrayList<ChainedUploadedFileProcessor>(classNames.length);
          for (String className : classNames)
          {
            Class<ChainedUploadedFileProcessor> clazz =
                    (Class<ChainedUploadedFileProcessor>) ClassLoaderUtils.loadClass(className);
            processors.add(clazz.newInstance());
          }
      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl(processors));
    }
        catch(Exception e)
        {
          _LOG.severe("CANNOT_INSTANTIATE_UPLOADEDFILEPROCESSOR", e);
          bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl());
        }
      }
    }
    else
    {
      //nothing specified, hence use default.
      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
              new CompositeUploadedFileProcessorImpl());
    }

    UploadedFileProcessor ufp = (UploadedFileProcessor)
      bean.getProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY);
View Full Code Here


            ChainedUploadedFileProcessor cufp[] =
            {
              (ChainedUploadedFileProcessor) clazz.newInstance()
            };
        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl(Arrays.asList(cufp)));
          }
          else
          {
            //this is full override usecase
            bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                         clazz.newInstance());
      }
         

        }
      catch (Exception e)
      {
        _LOG.severe("CANNOT_INSTANTIATE_UPLOADEDFILEPROCESSOR", e);
        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl());
      }
    }
    else
    {
        try
        {
          //chained processors usecase, Multiple processors
          List<ChainedUploadedFileProcessor> processors =
                  new ArrayList<ChainedUploadedFileProcessor>(classNames.length);
          for (String className : classNames)
          {
            Class<ChainedUploadedFileProcessor> clazz =
                    (Class<ChainedUploadedFileProcessor>) ClassLoaderUtils.loadClass(className);
            processors.add(clazz.newInstance());
          }
      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl(processors));
    }
        catch(Exception e)
        {
          _LOG.severe("CANNOT_INSTANTIATE_UPLOADEDFILEPROCESSOR", e);
          bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl());
        }
      }
    }
    else
    {
      //nothing specified, hence use default.
      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
              new CompositeUploadedFileProcessorImpl());
    }

    UploadedFileProcessor ufp = (UploadedFileProcessor)
      bean.getProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY);
View Full Code Here

            ChainedUploadedFileProcessor cufp[] =
            {
              (ChainedUploadedFileProcessor) clazz.newInstance()
            };
        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl(Arrays.asList(cufp)));
          }
          else
          {
            //this is full override usecase
            bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                         clazz.newInstance());
      }
         

        }
      catch (Exception e)
      {
        _LOG.severe("CANNOT_INSTANTIATE_UPLOADEDFILEPROCESSOR", e);
        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl());
      }
    }
    else
    {
        try
        {
          //chained processors usecase, Multiple processors
          List<ChainedUploadedFileProcessor> processors =
                  new ArrayList<ChainedUploadedFileProcessor>(classNames.length);
          for (String className : classNames)
          {
            Class<ChainedUploadedFileProcessor> clazz =
                    (Class<ChainedUploadedFileProcessor>) ClassLoaderUtils.loadClass(className);
            processors.add(clazz.newInstance());
          }
      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl(processors));
    }
        catch(Exception e)
        {
          _LOG.severe("CANNOT_INSTANTIATE_UPLOADEDFILEPROCESSOR", e);
          bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                  new CompositeUploadedFileProcessorImpl());
        }
      }
    }
    else
    {
      //nothing specified, hence use default.
      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
              new CompositeUploadedFileProcessorImpl());
    }

    UploadedFileProcessor ufp = (UploadedFileProcessor)
      bean.getProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.config.upload.CompositeUploadedFileProcessorImpl

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.