Package xdoclet

Examples of xdoclet.XDocletException


    public String name(Properties attributes) throws XDocletException
    {
        String paramName = attributes.getProperty("paramName");

        if (paramName == null) {
            throw new XDocletException("paramName attribute is mandatory");
        }

        String name = null;
        StringTokenizer st = new StringTokenizer(paramName, ",");
View Full Code Here


    public void ifHasType(String template, Properties attributes) throws XDocletException
    {
        String paramName = attributes.getProperty("paramName");

        if (paramName == null) {
            throw new XDocletException("paramName attribute is mandatory");
        }

        if (currentMember == null) {
            // class level tags
            String type = currentTag.getAttributeValue(paramName);
View Full Code Here

     * @doc.tag                     type="content"
     */
    public String memberName(Properties attributes) throws XDocletException
    {
        if (currentMember == null) {
            throw new XDocletException("XDtEjbEnv:memberName can only be used inside forAllMemberTags or forAllMethodTags");
        }

        String name = currentMember.getName();
        String prefix = attributes.getProperty("prefix");

View Full Code Here

     * @doc.tag                     type="content"
     */
    public String memberType() throws XDocletException
    {
        if (currentMember == null) {
            throw new XDocletException("XDtEjbEnv:memberType can only be used inside forAllMemberTags or forAllMethodTags");
        }
        return currentMemberType();
    }
View Full Code Here

     * @doc.tag                     type="content"
     */
    public String methodSignature() throws XDocletException
    {
        if (currentMember == null || !(currentMember instanceof XMethod)) {
            throw new XDocletException("XDtEjbEnv:methodSignature can only be used inside forAllMemberTags or forAllMethodTags");
        }

        XMethod method = (XMethod) currentMember;
        StringBuffer sb = new StringBuffer();

View Full Code Here

    public void ifHasTag(String template, Properties attributes) throws XDocletException
    {
        String tags = attributes.getProperty("tagName");

        if (tags == null) {
            throw new XDocletException("tagName is mandatory");
        }

        String paramName = attributes.getProperty("paramName");
        String paramValue = attributes.getProperty("paramValue");
View Full Code Here

        boolean superclasses = TypeConversionUtil.stringToBoolean(attributes.getProperty("superclasses"), true);

        String tagName = attributes.getProperty("tagName");

        if (tagName == null) {
            throw new XDocletException("tagName is mandatory");
        }

        StringTokenizer st = new StringTokenizer(tagName, ",");

        while (st.hasMoreTokens()) {
View Full Code Here

    private boolean isParamValueEqual(Properties attributes) throws XDocletException
    {
        String value = attributes.getProperty("value");

        if (value == null) {
            throw new XDocletException("value is mandatory");
        }
        return value.equals(paramValue(attributes));
    }
View Full Code Here

     */
    public static String getComponentInterface(String type, XClass clazz) throws XDocletException
    {
        // validate type
        if (!"remote".equals(type) && !"local".equals(type) && !SERVICE_ENDPOINT.equals(type)) {
            throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.INTERFACE_INVALID_TYPE, new String[]{type}));
        }

        String fileName = clazz.getContainingPackage().getName();
        String name_pattern = null;
        String package_pattern = null;
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug("return_type=" + return_type);
        }
        if (return_type == null) {
            throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.ASK_FOR_BEAN_FROM_NULL_INTERFACE, new String[]{return_type}));
        }

        for (Iterator i = classes.iterator(); i.hasNext(); ) {
            XClass clazz = (XClass) i.next();

            if (log.isDebugEnabled()) {
                log.debug("clazz=" + clazz);
            }

            if (EntityTagsHandler.isEntity(clazz)) {
                String remote_intf_name = getComponentInterface("remote", clazz);
                String local_intf_name = getComponentInterface("local", clazz);

                if (log.isDebugEnabled()) {
                    log.debug("remote_intf_name=" + remote_intf_name);
                    log.debug("local_intf_name=" + local_intf_name);
                }

                if (return_type.equals(remote_intf_name) || return_type.equals(local_intf_name)) {
                    if (log.isDebugEnabled()) {
                        log.debug("Found! beanClassNameFromInterfaceName returns with: " + clazz.getQualifiedName());
                    }

                    return clazz.getQualifiedName();
                }
            }
        }
        if (log.isDebugEnabled()) {
            log.warn("NOT FOUND! bean class coreesponding to IF " + return_type);
        }
        throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.BEAN_CLASS_NOT_FOUND_FOR_INTERFACE, new String[]{return_type}));
    }
View Full Code Here

TOP

Related Classes of xdoclet.XDocletException

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.