Examples of ConfigurationNotFoundException


Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    @Override
    public synchronized void removeDevice(String name) throws ConfigurationException {
        String pathName = deviceRef(name);
        if (!PreferencesUtils.nodeExists(rootPrefs, pathName))
            throw new ConfigurationNotFoundException();

        try {
            Preferences node = rootPrefs.node(pathName);
            node.removeNode();
            node.flush();
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    }

    public synchronized Device findDevice(String filter, String childName)
            throws ConfigurationException {
        if (!configurationExists())
            throw new ConfigurationNotFoundException();

        SearchControls ctls = new SearchControls();
        ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
        ctls.setCountLimit(1);
        ctls.setReturningAttributes(StringUtils.EMPTY_STRING);
        ctls.setReturningObjFlag(false);
        NamingEnumeration<SearchResult> ne = null;
        String childDN;
        try {
            ne = ctx.search(devicesDN, filter, ctls);
            if (!ne.hasMore())
                throw new ConfigurationNotFoundException(childName);

            childDN = ne.next().getNameInNamespace();
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        } finally {
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    }

    @Override
    public synchronized Device findDevice(String name) throws ConfigurationException {
        if (!configurationExists())
            throw new ConfigurationNotFoundException();

        return loadDevice(deviceRef(name));
    }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    }

    @Override
    public synchronized void merge(Device device) throws ConfigurationException {
        if (!configurationExists())
            throw new ConfigurationNotFoundException();

        String deviceDN = deviceRef(device.getDeviceName());
        Device prev = loadDevice(deviceDN);
        try {
            modifyAttributes(deviceDN, storeDiffs(prev, device, new ArrayList<ModificationItem>()));
            mergeChilds(prev, device, deviceDN);
            updateCertificates(prev, device);
        } catch (NameNotFoundException e) {
            throw new ConfigurationNotFoundException(e);
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        } catch (CertificateException e) {
            throw new ConfigurationException(e);
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    }

    @Override
    public synchronized void removeDevice(String name) throws ConfigurationException {
        if (!configurationExists())
            throw new ConfigurationNotFoundException();

        removeDeviceWithDN(deviceRef(name));
    }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    private void removeDeviceWithDN(String deviceDN) throws ConfigurationException {
        try {
            destroySubcontextWithChilds(deviceDN);
        } catch (NameNotFoundException e) {
            throw new ConfigurationNotFoundException(e);
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    public synchronized void persistCertificates(String dn, X509Certificate... certs)
            throws ConfigurationException {
        try {
            storeCertificates(dn, certs);
        } catch (NameNotFoundException e) {
            throw new ConfigurationNotFoundException(e);
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        } catch (CertificateEncodingException e) {
            throw new ConfigurationException(e);
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

        try {
            ModificationItem removeCert = new ModificationItem(
                    DirContext.REMOVE_ATTRIBUTE, new BasicAttribute(userCertificate));
            ctx.modifyAttributes(dn, new ModificationItem[] { removeCert });
        } catch (NameNotFoundException e) {
            throw new ConfigurationNotFoundException(e);
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

    @Override
    public synchronized X509Certificate[] findCertificates(String dn) throws ConfigurationException {
        try {
            return loadCertificates(dn);
        } catch (NameNotFoundException e) {
            throw new ConfigurationNotFoundException(e);
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        } catch (CertificateException e) {
            throw new ConfigurationException(e);
        }
View Full Code Here

Examples of org.dcm4che3.conf.api.ConfigurationNotFoundException

                       
            loadFrom(device, attrs);
            loadChilds(device, deviceDN);
            return device;
        } catch (NameNotFoundException e) {
            throw new ConfigurationNotFoundException("Device with specified name not found",e);
        } catch (NamingException e) {
            throw new ConfigurationException(e);
        } catch (CertificateException e) {
            throw new ConfigurationException(e);
        } finally {
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.