Package org.apache.qpid.server.model

Examples of org.apache.qpid.server.model.IntegrityViolationException


            Collection<Port> ports = new ArrayList<Port>(_broker.getPorts());
            for (Port port : ports)
            {
                if (storeName.equals(port.getAttribute(Port.KEY_STORE)))
                {
                    throw new IntegrityViolationException("Key store '" + storeName + "' can't be deleted as it is in use by a port:" + port.getName());
                }
            }

            return true;
        }
View Full Code Here


                {
                    for (TrustStore store : trustStores)
                    {
                        if(storeName.equals(store.getAttribute(TrustStore.NAME)))
                        {
                            throw new IntegrityViolationException("Trust store '"
                                                                  + storeName
                                                                  + "' can't be deleted as it is in use by a port: "
                                                                  + port.getName());
                        }
                    }
                }
            }

            Collection<AuthenticationProvider> authenticationProviders = new ArrayList<AuthenticationProvider>(_broker.getAuthenticationProviders());
            for (AuthenticationProvider authProvider : authenticationProviders)
            {
                if(authProvider.getAttributeNames().contains(SimpleLDAPAuthenticationManager.TRUST_STORE))
                {
                    Object attributeType = authProvider.getAttribute(AuthenticationProvider.TYPE);
                    Object attributeValue = authProvider.getAttribute(SimpleLDAPAuthenticationManager.TRUST_STORE);
                    if (SimpleLDAPAuthenticationManager.PROVIDER_TYPE.equals(attributeType)
                        && storeName.equals(attributeValue))
                    {
                        throw new IntegrityViolationException("Trust store '"
                                                              + storeName
                                                              + "' can't be deleted as it is in use by an authentication manager: "
                                                              + authProvider.getName());
                    }
                }
View Full Code Here

            Collection<Port> ports = new ArrayList<Port>(_broker.getPorts());
            for (Port port : ports)
            {
                if (port.getKeyStore() == this)
                {
                    throw new IntegrityViolationException("Key store '"
                                                          + storeName
                                                          + "' can't be deleted as it is in use by a port:"
                                                          + port.getName());
                }
            }
View Full Code Here

        for (Port port : ports)
        {
            if(port instanceof AbstractPortWithAuthProvider
               && ((AbstractPortWithAuthProvider<?>)port).getAuthenticationProvider() == this)
            {
                throw new IntegrityViolationException("Authentication provider '" + providerName + "' is set on port " + port.getName());
            }
        }

        close();
        if (_preferencesProvider != null)
View Full Code Here

            Collection<Port> ports = new ArrayList<Port>(_broker.getPorts());
            for (Port port : ports)
            {
                if (port.getKeyStore() == this)
                {
                    throw new IntegrityViolationException("Key store '"
                                                          + storeName
                                                          + "' can't be deleted as it is in use by a port:"
                                                          + port.getName());
                }
            }
View Full Code Here

            Collection<Port> ports = new ArrayList<Port>(_broker.getPorts());
            for (Port port : ports)
            {
                if (port.getKeyStore() == this)
                {
                    throw new IntegrityViolationException("Key store '" + storeName + "' can't be deleted as it is in use by a port:" + port.getName());
                }
            }
            deleted();
            return true;
        }
View Full Code Here

        for (Port port : ports)
        {
            if(port instanceof AbstractPortWithAuthProvider
               && ((AbstractPortWithAuthProvider<?>)port).getAuthenticationProvider() == this)
            {
                throw new IntegrityViolationException("Authentication provider '" + providerName + "' is set on port " + port.getName());
            }
        }

        close();
        if (_preferencesProvider != null)
View Full Code Here

            {
                for (TrustStore store : trustStores)
                {
                    if(storeName.equals(store.getAttribute(TrustStore.NAME)))
                    {
                        throw new IntegrityViolationException("Trust store '"
                                + storeName
                                + "' can't be deleted as it is in use by a port: "
                                + port.getName());
                    }
                }
            }
        }

        Collection<AuthenticationProvider> authenticationProviders = new ArrayList<AuthenticationProvider>(_broker.getAuthenticationProviders());
        for (AuthenticationProvider authProvider : authenticationProviders)
        {
            if(authProvider.getAttributeNames().contains(SimpleLDAPAuthenticationManager.TRUST_STORE))
            {
                Object attributeType = authProvider.getAttribute(AuthenticationProvider.TYPE);
                Object attributeValue = authProvider.getAttribute(SimpleLDAPAuthenticationManager.TRUST_STORE);
                if (SimpleLDAPAuthenticationManager.PROVIDER_TYPE.equals(attributeType)
                        && storeName.equals(attributeValue))
                {
                    throw new IntegrityViolationException("Trust store '"
                            + storeName
                            + "' can't be deleted as it is in use by an authentication manager: "
                            + authProvider.getName());
                }
            }
View Full Code Here

        Collection<Port> ports = new ArrayList<Port>(_broker.getPorts());
        for (Port port : ports)
        {
            if (port.getKeyStore() == this)
            {
                throw new IntegrityViolationException("Key store '" + storeName + "' can't be deleted as it is in use by a port:" + port.getName());
            }
        }
        deleted();
        setState(State.DELETED);
    }
View Full Code Here

        Collection<Port> ports = new ArrayList<Port>(_broker.getPorts());
        for (Port port : ports)
        {
            if (port.getKeyStore() == this)
            {
                throw new IntegrityViolationException("Key store '"
                        + storeName
                        + "' can't be deleted as it is in use by a port:"
                        + port.getName());
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.model.IntegrityViolationException

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.