Package org.apache.qpid.server.configuration

Examples of org.apache.qpid.server.configuration.ConfigurationEntry


        assertValidStateTransition(provider, State.ACTIVE, State.DELETED);
    }

    public void testGroupProviderInvalidStateTransitions() throws Exception
    {
        ConfigurationEntry providerEntry = getGroupProviderConfigurationEntry();
        assertAllInvalidStateTransitions(providerEntry);
    }
View Full Code Here


        assertAllInvalidStateTransitions(providerEntry);
    }

    public void testAuthenticationProviderValidStateTransitions()
    {
        ConfigurationEntry providerEntry = getAuthenticationProviderConfigurationEntry();
        assertAllValidStateTransitions(providerEntry);
    }
View Full Code Here

        assertAllValidStateTransitions(providerEntry);
    }

    public void testAuthenticationProviderInvalidStateTransitions()
    {
        ConfigurationEntry providerEntry = getAuthenticationProviderConfigurationEntry();
        assertAllInvalidStateTransitions(providerEntry);
    }
View Full Code Here

        assertAllInvalidStateTransitions(providerEntry);
    }

    public void testPortValidStateTransitions()
    {
        ConfigurationEntry providerEntry = getPortConfigurationEntry();
        assertAllValidStateTransitions(providerEntry);
    }
View Full Code Here

        assertAllValidStateTransitions(providerEntry);
    }

    public void testPortInvalidStateTransitions()
    {
        ConfigurationEntry providerEntry = getPortConfigurationEntry();
        assertAllInvalidStateTransitions(providerEntry);
    }
View Full Code Here

        return recoverer.create(_recovererProvider, entry, _broker);
    }

    private ConfigurationEntry createConfigurationEntry(String type, Map<String, Object> attributes, ConfigurationEntryStore store)
    {
        return new ConfigurationEntry(UUID.randomUUID(), type, attributes, Collections.<UUID>emptySet(), store);
    }
View Full Code Here

        return createConfigurationEntry(GroupProvider.class.getSimpleName(), attributes , _store);
    }

    private ConfigurationEntry getPortConfigurationEntry()
    {
        ConfigurationEntry authProviderEntry = getAuthenticationProviderConfigurationEntry();
        AuthenticationProvider authProvider = (AuthenticationProvider)createConfiguredObject(authProviderEntry);

        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(Port.NAME, getTestName());
        attributes.put(Port.PROTOCOLS, Collections.<Protocol>singleton(Protocol.HTTP));
View Full Code Here

        return _store;
    }

    public void testGetRootEntry()
    {
        ConfigurationEntry brokerConfigEntry = _store.getRootEntry();
        assertNotNull("Root entry does not exist", brokerConfigEntry);
        assertEquals("Unexpected id", _brokerId, brokerConfigEntry.getId());
        assertEquals("Unexpected type ", Broker.class.getSimpleName(), brokerConfigEntry.getType());
        Map<String, Object> attributes = brokerConfigEntry.getAttributes();
        assertNotNull("Attributes cannot be null", attributes);
        for (Map.Entry<String, Object> attribute : _brokerAttributes.entrySet())
        {
            assertEquals("Unexpected attribute " + attribute.getKey(), attribute.getValue(), attributes.get(attribute.getKey()));
        }
View Full Code Here

        }
    }

    public void testGetEntry()
    {
        ConfigurationEntry authenticationProviderConfigEntry = _store.getEntry(_authenticationProviderId);
        assertNotNull("Provider with id " + _authenticationProviderId + " should exist", authenticationProviderConfigEntry);
        assertEquals("Unexpected id", _authenticationProviderId, authenticationProviderConfigEntry.getId());
        assertEquals("Unexpected type ", AuthenticationProvider.class.getSimpleName(), authenticationProviderConfigEntry.getType());
        Map<String, Object> attributes = authenticationProviderConfigEntry.getAttributes();
        assertNotNull("Attributes cannot be null", attributes);
        assertEquals("Unexpected attributes", _authenticationProviderAttributes, attributes);
    }
View Full Code Here

        attributes.put(PreferencesProvider.NAME, "test-provider");
        File file = TestFileUtils.createTempFile(this, ".prefs.json", "{\"test_user\":{\"pref1\": \"pref1Value\", \"pref2\": 1.0} }");
        try
        {
            attributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());
            ConfigurationEntry entry = new ConfigurationEntry(id, PreferencesProvider.class.getSimpleName(), attributes, Collections.<UUID>emptySet(), mock(ConfigurationEntryStore.class));
            PreferencesProvider provider = recoverer.create(mock(RecovererProvider.class), entry, _authenticationProvider);
            assertNotNull("Preferences provider was not recovered", provider);
            assertEquals("Unexpected name", "test-provider", provider.getName());
            assertEquals("Unexpected id", id, provider.getId());
            assertEquals("Unexpected path", file.getAbsolutePath(), provider.getAttribute(FileSystemPreferencesProvider.PATH));
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.ConfigurationEntry

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.