Package org.xdoclet.plugin.ejb.interfaces

Source Code of org.xdoclet.plugin.ejb.interfaces.LocalInterfaceBase

/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.plugin.ejb.interfaces;

import org.generama.MergeableVelocityTemplateEngine;
import org.generama.WriterMapper;
import org.xdoclet.plugin.ejb.EjbConfig;
import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin;
import org.xdoclet.plugin.ejb.EjbUtils;

import com.thoughtworks.qdox.model.JavaClass;

/**
* DOCUMENT ME!
*
* @author Diogo Quintela
*
* TODO: Support @ejb.interface to help decide if we are going to generate or not
*/
public abstract class LocalInterfaceBase extends EjbJavaGeneratingPlugin {
    /**
     * DOCUMENT ME!
     *
     * @param templateEngine
     * @param metadataProvider
     * @param writerMapper
     *
     * @throws ClassNotFoundException
     */
    public LocalInterfaceBase(MergeableVelocityTemplateEngine templateEngine,
            WriterMapper writerMapper, EjbConfig config) {
        super(templateEngine, writerMapper, config);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param metadata TODO: DOCUMENT ME!
     *
     * @return TODO: DOCUMENT ME!
     */
    public boolean shouldGenerate(Object metadata) {
        JavaClass javaClass = (JavaClass) metadata;
        boolean generate = ejbUtils.shouldGenerate(metadata);
        generate = generate && EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.LOCAL);
        generate = generate && !ejbUtils.isMessageDrivenBean(javaClass);
        return generate;
    }
}
TOP

Related Classes of org.xdoclet.plugin.ejb.interfaces.LocalInterfaceBase

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.