Package ariba.ui.aribaweb.util

Examples of ariba.ui.aribaweb.util.AWGenericException


    }

    protected static void expectNodeType (Node node, int type)
    {
        if (node == null || node.getNodeType() != type) {
            throw new AWGenericException(Fmt.S("expected node type %s",
                                              type));
        }
    }
View Full Code Here


        tag - namespaces are not supported.
    */
    public static void expectTag (Element elem, String tag)
    {
        if (!elem.getTagName().equals(tag)) {
            throw new AWGenericException(Fmt.S(
                "expected element tagged %s, got %s",
                tag, elem.getTagName()));
        }
    }
View Full Code Here

                    Element e = element.getOwnerDocument().createElement(fieldPath.car());
                    element.appendChild(e);
                }
                super.setFieldValue(target, fieldPath, value);
            } catch (DOMException e) {
                throw new AWGenericException(e);
            }
        }
View Full Code Here

                    element.appendChild(e);
                } else {
                    element.setAttribute(key, value.toString());
                }
            } catch (DOMException e) {
                throw new AWGenericException(e);
            }
        }
View Full Code Here

            try {
                InputStreamReader isr = new InputStreamReader(inputStream, AWCharacterEncoding.UTF8.name);
                userRules = AWUtil.getString(isr);
            }
            catch (UnsupportedEncodingException unsupportedEncodingException) {
                throw new AWGenericException(unsupportedEncodingException);
            }

            // Read ruls
            int sepStart = userRules.indexOf(RuleFileDelimeterStart);
            if (sepStart != -1) {
View Full Code Here

        return true;
    }

    public void reinit (Object value)
    {
        throw new AWGenericException("reinit not supported for: " + getClass().getName() + " " + this);
    }
View Full Code Here

        else {
            String message = Fmt.S(
                "%s: attempt to compute intValue for binding not bound to an String or Number."
                + "Component: %s binding: (%s=\"%s\")",
                getClass().getName(), object, bindingName(), bindingDescription());
            throw new AWGenericException(message);
        }
        return intValue;
    }
View Full Code Here

        else {
            String message = Fmt.S(
                "%s: attempt to compute doubleValue for binding not bound to an String or Number."
                + "Component: %s binding: (%s=\"%s\")",
                getClass().getName(), object, bindingName(), bindingDescription());
            throw new AWGenericException(message);
        }
        return doubleValue;
    }
View Full Code Here

        See 5) from above
     */
    private static AWBinding formatterBinding (String bindingName, String formatterString)
    {
        if (formatterString.length() < 2) {
            throw new AWGenericException("invalid formatter binding: " + formatterString);
        }
        char firstChar = formatterString.charAt(0);
        if (firstChar == '$') {
            return fieldBinding(bindingName, formatterString.substring(1), null);
        }
        else if (firstChar == '^') {
            // we allow ^ without $
            return fieldBinding(bindingName, formatterString, null);
        }
        else {
            throw new AWGenericException("invalid formatter binding: " + formatterString);
        }
    }
View Full Code Here

     */
    private static AWBinding constantBinding (String bindingName, String constantString)
    {
        AWBinding constantBinding = null;
        if (constantString.length() < 2) {
            throw new AWGenericException("invalid constant binding: " + constantString);
        }
        char firstChar = constantString.charAt(0);
        if (constantString.equals(TrueKey) || constantString.equals(FalseKey)) {
            Boolean booleanObject = Boolean.valueOf(constantString);
            constantBinding = new AWConstantBinding();
View Full Code Here

TOP

Related Classes of ariba.ui.aribaweb.util.AWGenericException

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.