Package xdoclet

Examples of xdoclet.XDocletException


    public void validateOptions() throws XDocletException
    {
        super.validateOptions();

        if (getRemoteClassPattern() == null || getRemoteClassPattern().trim().equals("")) {
            throw new XDocletException(Translator.getString(XDocletMessages.class, XDocletMessages.PARAMETER_MISSING_OR_EMPTY, new String[]{"pattern"}));
        }

        if (getRemoteClassPattern().indexOf("{0}") == -1) {
            throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.PATTERN_HAS_NO_PLACEHOLDER));
        }
    }
View Full Code Here


            writer.close();

            return writer.getBuffer().toString();
        }
        catch (Exception e) {
            throw new XDocletException(e, "Exception when executing Velocity template!");
        }
//        finally {
//            f.delete();
//        }
    }
View Full Code Here

    {
        Log log = LogUtil.getLog(HomeTagsHandler.class, "getHomeInterface");

        // validate type
        if (!"remote".equals(type) && !"local".equals(type)) {
            throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.METHOD_ONLY_TAKES_REMOTE_OR_LOCAL, new String[]{"getHomeInterface", type}));
        }

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

        if (!isCreateMethod(currentMethod)) {
            String msg = Translator.getString(XDocletModulesEjbMessages.class,
                XDocletModulesEjbMessages.CURRENT_METHOD_NOT_CREATE,
                new String[]{currentMethod.toString()});

            throw new XDocletException(msg);
        }

        StringBuffer currentMethodName = new StringBuffer(currentMethod.getNameWithSignature(false));

        currentMethodName.insert(3, "Post");
View Full Code Here

        boolean superclasses = TypeConversionUtil.stringToBoolean(attributes.getProperty("superclasses"), false);
        String type = attributes.getProperty("type");
        String tagType = attributes.getProperty("tagName");

        if (type == null) {
            throw new XDocletException(Translator.getString(XDocletMessages.class,
                XDocletMessages.ATTRIBUTE_NOT_PRESENT_ERROR,
                new String[]{"type"}));
        }

        Set already = new HashSet();
View Full Code Here

        int index = sig.indexOf(" ");

        if (index >= 0) {
            return sig.substring(0, index);
        }
        throw new XDocletException("can not parse signature: " + sig);
    }
View Full Code Here

        int end = sig.indexOf("(");

        if (start >= 0 && end > start) {
            return sig.substring(start, start + 1).toUpperCase() + sig.substring(start + 1, end);
        }
        throw new XDocletException("Cannot parse signature: " + sig);
    }
View Full Code Here

        String sig = currentSignature();
        int start = sig.indexOf(" ");
        int stop = sig.indexOf("(");

        if (start < 0 || stop < 0) {
            throw new XDocletException("Cannot parse signature: " + sig);
        }
        return sig.substring(start + 1, stop);
    }
View Full Code Here

        String sig = currentSignature();
        int start = sig.indexOf("(");
        int stop = sig.indexOf(")");

        if (start < 0 || stop < 0) {
            throw new XDocletException("Cannot parse signature: " + sig);
        }
        return sig.substring(start + 1, stop);
    }
View Full Code Here

    public void validateOptions() throws XDocletException
    {
        super.validateOptions();

        if (getMessageDrivenClassPattern() == null || getMessageDrivenClassPattern().trim().equals("")) {
            throw new XDocletException(Translator.getString(XDocletMessages.class, XDocletMessages.PARAMETER_MISSING_OR_EMPTY, new String[]{"pattern"}));
        }

        if (getMessageDrivenClassPattern().indexOf("{0}") == -1) {
            throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.PATTERN_HAS_NO_PLACEHOLDER));
        }
    }
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.