Examples of AdapterException


Examples of com.dooapp.fxform.adapter.AdapterException

    @Override
    public BigDecimal adaptFrom(String to) throws AdapterException {
        try {
            return new BigDecimal(decimalFormat.parse(to).doubleValue());
        } catch (ParseException e) {
            throw new AdapterException(e);
        }
    }
View Full Code Here

Examples of com.dooapp.fxform.adapter.AdapterException

        try {
            return adapter.adaptFrom(newValue);
        } catch (Exception e) {
            notAdaptableInputValue = new NotAdaptableInputValue(element, newValue, validator.get().getMessageInterpolator());
            constraintViolations.add(notAdaptableInputValue);
            throw new AdapterException(e);
        }
    }
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

                                                " should have constructor with single List<DataProvider> argument", e);
            }
            try {
                provider = (T) constructor.newInstance(nestedDataProvs);
            } catch (Exception e) {
                throw new AdapterException(e);
            }
        } else if (DataFilter.class.isAssignableFrom(cls)) {
            // DataFilter needs to be constructed with nested DataProvider as constructor arg
            DataControlProviderDefinition<DataProvider> nestedDataProvDef =
                providerDef.getNestedProviderDefinitions().get(0);
            Class<DataProvider> dfltDataProvImpl =
                (Class<DataProvider>) XMLDCConstants.DFLT_PROVIDERS.get(DataProvider.class);
            DataProvider nestedDataProv = newProviderInstance(nestedDataProvDef, DataProvider.class, dfltDataProvImpl);
            // now instantiate DataFilter with nested DataProvider
            Constructor<DataFilter> constructor;
            try {
                constructor = ((Class<DataFilter>) cls).getConstructor(DataProvider.class);
            } catch (NoSuchMethodException e) {
                throw new IllegalStateException(cls.getName() +
                                                " should have constructor with single DataProvider argument", e);
            }
            try {
                provider = (T) constructor.newInstance(nestedDataProv);
            } catch (Exception e) {
                throw new AdapterException(e);
            }
        } else {
            provider = Utils.newInstance(cls);
        }
        // supply all parameters to the instantiated class
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

                    getClass().getMethod("get" + propName.substring(0, 1).toUpperCase() + propName.substring(1));
                return method.invoke(this);
            } catch (NoSuchMethodException e) {
                // no getter method, just continue for normal processing
            } catch (Exception e) {
                throw new AdapterException(e);
            }
        }

        if (attributes.containsKey(key)) {
            Attribute attribute = attributes.get(key);
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

                getStructsCache().put(cacheKey, rootStruct);
                getNamedStructsCache().put(cacheKey, structCache);
            } catch (Exception e) {
                // logging the Error causes JDeveloper to throw the 'Unexpected Error Window'.
                logger.severe(e.getMessage(), e);
                throw new AdapterException(e);
            } finally {
                logger.end("building XML StructureDefinition");
            }
        }
        return getStructsCache().get(cacheKey);
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

            if (!iface.isAssignableFrom(cls)) {
                throw new IllegalArgumentException(className + " does not implement interface " + iface.getName());
            }
            return (Class<? extends T>) cls;
        } catch (ClassNotFoundException e) {
            throw new AdapterException(e);
        }
    }
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = dbf.newDocumentBuilder();
            Document doc = builder.parse(stream);
            return doc.getDocumentElement();
        } catch (Exception e) {
            throw new AdapterException(e);
        }
    }
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

            }
            DocumentBuilder docBuilder;
            try {
                docBuilder = builderFactory.newDocumentBuilder();
            } catch (ParserConfigurationException e) {
                throw new AdapterException(e);
            }
            Document document = docBuilder.newDocument();
            return document.createElementNS(schema.getTargetNS(), request.getRootNodeName());
        } catch (XSDException e) {
            throw new AdapterException(e);
        }
    }
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

     */
    public static <T> T newInstance(final Class<T> cls) {
        try {
            return cls.newInstance();
        } catch (InstantiationException e) {
            throw new AdapterException(e);
        } catch (IllegalAccessException e) {
            throw new AdapterException(e);
        }
    }
View Full Code Here

Examples of oracle.adf.model.adapter.AdapterException

            try {
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(new InputSource(new StringReader((String) obj)));
                return doc.getDocumentElement();
            } catch (Exception e) {
                throw new AdapterException(e);
            }
        }

        throw new IllegalArgumentException("Could not convert object of type: " + obj.getClass().getName() +
                                           " to org.w3c.dom.Element");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.