Package com.sun.enterprise.resource.beans

Examples of com.sun.enterprise.resource.beans.MailResource


     *
     */
    public static JavaEEResource toMailJavaEEResource(
        com.sun.enterprise.config.serverbeans.MailResource mailResourceConfig, ResourceInfo resourceInfo) {

        com.sun.enterprise.resource.beans.MailResource mailResource = new MailResource(resourceInfo);

        //jr.setDescription(rbean.getDescription()); // FIXME: getting error
        mailResource.setEnabled(ConnectorsUtil.parseBoolean(mailResourceConfig.getEnabled()));
        mailResource.setStoreProtocol(mailResourceConfig.getStoreProtocol());
        mailResource.setStoreProtocolClass(mailResourceConfig.getStoreProtocolClass());
        mailResource.setTransportProtocol(mailResourceConfig.getTransportProtocol());
        mailResource.setTransportProtocolClass(mailResourceConfig.getTransportProtocolClass());
        mailResource.setMailHost(mailResourceConfig.getHost());
        mailResource.setUsername(mailResourceConfig.getUser());
        mailResource.setMailFrom(mailResourceConfig.getFrom());
        mailResource.setDebug(ConnectorsUtil.parseBoolean(mailResourceConfig.getDebug()));

        // sets the properties
        List<Property> properties = mailResourceConfig.getProperty();
        if (properties != null) {

            for(Property property : properties){
                ResourceProperty rp = new ResourcePropertyImpl(property.getName(), property.getValue());
                mailResource.addProperty(rp);
            }
        }
        return mailResource;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.resource.beans.MailResource

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.