Package org.apache.torque.generator

Examples of org.apache.torque.generator.GeneratorException


                    Namespace.ROOT_NAMESPACE);

            outlet = outletConfiguration.getOutlet(outletQName);
            if (outlet == null)
            {
                throw new GeneratorException("TraverseAllAction : The outlet "
                        + outletName
                        + " does not exist");
            }
        }

        SourceElement currentElement = controllerState.getSourceElement();
        String detokenizedElementToTraverseName
                = tokenReplacer.process(elementsToTraverseName);

        List<SourceElement> selectedElements
                = SourcePath.getElements(
                        currentElement,
                        detokenizedElementToTraverseName);
        if (!acceptEmpty && selectedElements.isEmpty())
        {
            throw new GeneratorException(
                    "TraverseAllAction : selected element "
                        + elementsToTraverseName
                        + " does not exist and acceptEmpty was set to false");
        }
View Full Code Here


        Outlet outlet = controllerState.getUnitConfiguration()
                .getOutletConfiguration()
                .getOutlet(qualifiedOutletName);
        if (outlet == null)
        {
            throw new GeneratorException("ApplyAction : The outlet "
                    + outletName
                    + " does not exist");
        }

        SourceElement currentElement = controllerState.getSourceElement();
        String detokenizedPath = tokenReplacer.process(path);

        List<SourceElement> selectedElements
                = SourcePath.getElements(currentElement, detokenizedPath);
        if (selectedElements.isEmpty())
        {
            if (!acceptNotSet)
            {
                throw new GeneratorException(
                        "ApplyAction : selected path "
                            + path
                            + " does not match an element"
                            + " and acceptNotSet was set to false");
            }
            return new OutletResult("");
        }
        if (selectedElements.size() > 1)
        {
            throw new GeneratorException(
                    "ApplyAction : selected path "
                        + path
                        + " contains more than one element ("
                        + selectedElements.size()
                        + " times)");
View Full Code Here

            filenameOutlet.beforeExecute(controllerState);
            OutletResult filenameResult
                = filenameOutlet.execute(controllerState);
            if (!filenameResult.isStringResult())
            {
                throw new GeneratorException(
                        "The result of a filename generation must be a String,"
                        + " not a byte array");
            }
            String filename = filenameResult.getStringResult();
            filenameOutlet.afterExecute(controllerState);
View Full Code Here

        {
            if (acceptNotSet)
            {
                return new OutletResult("");
            }
            throw new GeneratorException("OptionAction: The option "
                    + optionName
                    + " is not set");
        }
        return new OutletResult(option.toString());
    }
View Full Code Here

                targetFile,
                encoding);

        if (!generationResult.isStringResult())
        {
            throw new GeneratorException(
                    "The merge target file strategy onlys works"
                    + " for String generation results (target file="
                    + targetFile.getAbsolutePath() + ")");
        }
View Full Code Here

                    IOUtils.toByteArray(inputStream));
            return result;
        }
        catch (IOException e)
        {
            throw new GeneratorException("CopyOutlet with name "
                    + getName()
                    + ": cannot read Resource "
                    + path,
                e);
        }
View Full Code Here

            {
                return null;
            }
            else
            {
                throw new GeneratorException(
                        "Source element path "
                        + path
                        + " selects no element on source element "
                        + sourceElement.getName());
            }
        }
        if (sourceElements.size() > 1)
        {
            throw new GeneratorException(
                    "Source element path "
                    + path
                    + " selects more than a single element on source element "
                    + sourceElement.getName());
        }
View Full Code Here

        throws GeneratorException
    {
        SourceElement parent = toProcess.getParent();
        if (alreadyProcessed.contains(parent))
        {
            throw new GeneratorException(
                    "getParentPath(): invoked on a closed loop");
        }
        if (parent == null)
        {
            return;
View Full Code Here

TOP

Related Classes of org.apache.torque.generator.GeneratorException

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.