Package helma.objectmodel

Examples of helma.objectmodel.ObjectNotFoundException


     * @throws ObjectNotFoundException
     */
    public static XmlIDGenerator getIDGenerator(File file)
            throws ObjectNotFoundException {
        if (!file.exists()) {
            throw new ObjectNotFoundException("IDGenerator not found in idgen.xml");
        }

        try {
            Document document = XmlUtil.parse(new FileInputStream(file));
            org.w3c.dom.Element tmp = (Element) document.getDocumentElement()
                    .getElementsByTagName("counter")
                    .item(0);

            return new XmlIDGenerator(Long.parseLong(XmlUtil.getTextContent(tmp)));
        } catch (Exception e) {
            throw new ObjectNotFoundException(e.toString());
        }
    }
View Full Code Here

TOP

Related Classes of helma.objectmodel.ObjectNotFoundException

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.