Package org.apache.ftpserver.message

Examples of org.apache.ftpserver.message.MessageResourceFactory


     */
    private MessageResource parseMessageResource(final Element childElm,
            final ParserContext parserContext,
            final BeanDefinitionBuilder builder) {

        MessageResourceFactory mr = new MessageResourceFactory();

        if (StringUtils.hasText(childElm.getAttribute("languages"))) {
            String langString = childElm.getAttribute("languages");

            String[] languages = langString.split("[\\s,]+");

            mr.setLanguages(Arrays.asList(languages));
        }

        if (StringUtils.hasText(childElm.getAttribute("directory"))) {
            mr.setCustomMessageDirectory(new File(childElm
                    .getAttribute("directory")));

        }

        return mr.createMessageResource();
    }
View Full Code Here


     */
    @Override
    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        MessageResourceFactory factory = new MessageResourceFactory();
        factory.setLanguages(Arrays.asList(new String[] { "en", "zh-tw" }));
        server.setMessageResource(factory.createMessageResource());
       
        return server;
    }
View Full Code Here

     * @see org.apache.ftpserver.clienttests.ClientTestTemplate#createConfig()
     */
    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        MessageResourceFactory factory = new MessageResourceFactory();
        factory.setLanguages(Arrays.asList(new String[] { "en", "zh-tw" }));
        server.setMessageResource(factory.createMessageResource());
       
        return server;
    }
View Full Code Here

     * @see org.apache.ftpserver.clienttests.ClientTestTemplate#createConfig()
     */
    protected FtpServerFactory createServer() throws Exception {
        FtpServerFactory server = super.createServer();

        MessageResourceFactory factory = new MessageResourceFactory();
        factory.setLanguages(Arrays.asList(new String[] { "en", "zh-tw" }));
        server.setMessageResource(factory.createMessageResource());
       
        return server;
    }
View Full Code Here

     */
    private MessageResource parseMessageResource(final Element childElm,
            final ParserContext parserContext,
            final BeanDefinitionBuilder builder) {

        MessageResourceFactory mr = new MessageResourceFactory();

        if (StringUtils.hasText(childElm.getAttribute("languages"))) {
            String langString = childElm.getAttribute("languages");

            String[] languages = langString.split("[\\s,]+");

            mr.setLanguages(Arrays.asList(languages));
        }

        if (StringUtils.hasText(childElm.getAttribute("directory"))) {
            mr.setCustomMessageDirectory(new File(childElm
                    .getAttribute("directory")));

        }

        return mr.createMessageResource();
    }
View Full Code Here

     */
    private MessageResource parseMessageResource(final Element childElm,
            final ParserContext parserContext,
            final BeanDefinitionBuilder builder) {

        MessageResourceFactory mr = new MessageResourceFactory();

        if (StringUtils.hasText(childElm.getAttribute("languages"))) {
            String langString = childElm.getAttribute("languages");

            String[] languages = langString.split("[\\s,]+");

            mr.setLanguages(Arrays.asList(languages));
        }

        if (StringUtils.hasText(childElm.getAttribute("directory"))) {
            mr.setCustomMessageDirectory(new File(childElm
                    .getAttribute("directory")));

        }

        return mr.createMessageResource();
    }
View Full Code Here

     */
    private MessageResource parseMessageResource(final Element childElm,
            final ParserContext parserContext,
            final BeanDefinitionBuilder builder) {

        MessageResourceFactory mr = new MessageResourceFactory();

        if (StringUtils.hasText(childElm.getAttribute("languages"))) {
            String langString = childElm.getAttribute("languages");

            String[] languages = langString.split("[\\s,]+");

            mr.setLanguages(Arrays.asList(languages));
        }

        if (StringUtils.hasText(childElm.getAttribute("directory"))) {
            mr.setCustomMessageDirectory(new File(childElm
                    .getAttribute("directory")));

        }

        return mr.createMessageResource();
    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.message.MessageResourceFactory

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.