Package oracle.adf.model.adapter

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


                    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

                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

            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

            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

            }
            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

     */
    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

            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

        }
        StringWriter sw = new StringWriter();
        try {
            node.print(sw);
        } catch (IOException e) {
            throw new AdapterException(e);
        }
        return sw.toString();
    }
View Full Code Here

     */
    public static DocumentBuilder getBuilder() {
        try {
            return docBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw new AdapterException(e);
        }
    }
View Full Code Here

TOP

Related Classes of oracle.adf.model.adapter.AdapterException

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.