Package xdoclet

Examples of xdoclet.XDocletException


    }
   
    public void validateOptions() throws XDocletException {
        super.validateOptions();
        if (getDestinationFile() == null) {
            throw new XDocletException("Ant Doclet Subtaksk TagSubTaks: You have to set attribute 'destinationFile'.");           
        }
    }
View Full Code Here


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

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

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

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

        if (getDestinationFile() == null || getDestinationFile().trim().equals("")) {
            throw new XDocletException(Translator.getString(XDocletMessages.class, XDocletMessages.PARAMETER_MISSING_OR_EMPTY, new String[]{"destinationFile"}));
        }
    }
View Full Code Here

            if (entityCmpSubtask != null) {
                cmp = entityCmpSubtask.getCmpSpec();
            }
            else {
                throw new XDocletException(Translator.getString(XDocletModulesEjbMessages.class, XDocletModulesEjbMessages.CANT_GUESS_CMP_VERSION, new String[]{clazz.getQualifiedName()}));
            }
        }

        return EntityCmpSubTask.CmpSpecVersion.CMP_2_0.equals(cmp);
    }
View Full Code Here

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

        if (tagName == null || paramName == null) {
            throw new XDocletException(Translator.getString(XDocletModulesJmxMessages.class, XDocletModulesJmxMessages.MISSING_ATTRIBUTE));
        }

        List tags = Arrays.asList(getCurrentMethod().getDoc().getTags(tagName).toArray());
        XTag tag = (XTag) tags.get(index);
        String tagContent = tag.getValue();
View Full Code Here

     * @exception XDocletException  Describe the exception
     */
    public String indexedConstructorParamValue(Properties attributes) throws XDocletException
    {
        if (attributes == null)
            throw new XDocletException(Translator.getString(XDocletModulesJmxMessages.class, XDocletModulesJmxMessages.MISSING_ATTRIBUTE));
        String tagName = attributes.getProperty("tagName");
        String paramName = attributes.getProperty("paramName");

        if (tagName == null || paramName == null) {
            throw new XDocletException(Translator.getString(XDocletModulesJmxMessages.class, XDocletModulesJmxMessages.MISSING_ATTRIBUTE));
        }

        List tags = Arrays.asList(getCurrentConstructor().getDoc().getTags(tagName).toArray());
        XTag tag = (XTag) tags.get(index);

View Full Code Here

    protected String getMBeanName(XClass clazz) throws XDocletException
    {
        XTag bean_tag = clazz.getDoc().getTag("jmx:mbean");

        if (bean_tag == null) {
            throw new XDocletException(Translator.getString(XDocletMessages.class, XDocletMessages.CLASS_TAG_EXPECTED,
                new String[]{"@jmx:mbean", clazz.getQualifiedName()}));
        }

        String param_val = bean_tag.getAttributeValue("name");

        if (param_val == null) {
            throw new XDocletException(Translator.getString(XDocletMessages.class, XDocletMessages.CLASS_TAG_PARAMETER_EXPECTED,
                new String[]{"name", "@jmx:mbean", clazz.getQualifiedName()}));
        }

        return param_val;
    }
View Full Code Here

        return error(key, null);
    }

    static XDocletException error(String key, String[] args)
    {
        return new XDocletException(l(key, args));
    }
View Full Code Here

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

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

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

        Log log = LogUtil.getLog(EAServerSubTask.class, "validateOptions");

        log.debug("packageName = " + getPackageName());
        if (getPackageName() == null || getPackageName().equals("")) {
            throw new XDocletException(Translator.getString(XDocletMessages.class, XDocletMessages.PARAMETER_MISSING_OR_EMPTY, new String[]{"packageName"}));
        }
    }
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.