Package org.apache.archiva.admin.model.beans

Examples of org.apache.archiva.admin.model.beans.UiConfiguration


    @Test
    public void uiConfiguration()
        throws Exception
    {
        UiConfiguration ui = archivaAdministration.getUiConfiguration();
        assertNotNull( ui );
        // assert default values
        assertFalse( ui.isDisableEasterEggs() );
        assertTrue( ui.isAppletFindEnabled() );
        assertTrue( ui.isShowFindArtifacts() );

        ui.setAppletFindEnabled( false );
        ui.setShowFindArtifacts( false );
        ui.setDisableEasterEggs( true );

        archivaAdministration.updateUiConfiguration( ui );

        ui = archivaAdministration.getUiConfiguration();

        assertTrue( ui.isDisableEasterEggs() );
        assertFalse( ui.isAppletFindEnabled() );
        assertFalse( ui.isShowFindArtifacts() );
    }
View Full Code Here


    @Test
    public void uiConfigurationReadUpdate()
        throws Exception
    {
        UiConfiguration ui = getArchivaAdministrationService().getUiConfiguration();
        assertNotNull( ui );
        // assert default values
        assertFalse( ui.isDisableEasterEggs() );
        assertTrue( ui.isAppletFindEnabled() );
        assertTrue( ui.isShowFindArtifacts() );

        ui.setAppletFindEnabled( false );
        ui.setShowFindArtifacts( false );
        ui.setDisableEasterEggs( true );

        getArchivaAdministrationService().setUiConfiguration( ui );

        ui = getArchivaAdministrationService().getUiConfiguration();

        assertTrue( ui.isDisableEasterEggs() );
        assertFalse( ui.isAppletFindEnabled() );
        assertFalse( ui.isShowFindArtifacts() );
    }
View Full Code Here

    @Test
    public void searchWithSearchRequestBundleSymbolicNameTwoVersion()
        throws Exception
    {
        UiConfiguration uiConfiguration = new UiConfiguration();
        uiConfiguration.setApplicationUrl( null );
        getArchivaAdministrationService().setUiConfiguration( uiConfiguration );

        SearchService searchService = getSearchService( authorizationHeader );

        SearchRequest searchRequest = new SearchRequest();
View Full Code Here

    @Test
    public void uiConfiguration()
        throws Exception
    {
        UiConfiguration oldUi = archivaAdministration.getUiConfiguration();
        assertNotNull( oldUi );
        // assert default values
        assertFalse( oldUi.isDisableEasterEggs() );
        assertTrue( oldUi.isAppletFindEnabled() );
        assertTrue( oldUi.isShowFindArtifacts() );
        assertFalse( oldUi.isDisableRegistration() );

        UiConfiguration ui = archivaAdministration.getUiConfiguration();
        ui.setAppletFindEnabled( false );
        ui.setShowFindArtifacts( false );
        ui.setDisableEasterEggs( true );
        ui.setDisableRegistration( true );

        archivaAdministration.updateUiConfiguration( ui );

        ui = archivaAdministration.getUiConfiguration();

        assertTrue( ui.isDisableEasterEggs() );
        assertFalse( ui.isAppletFindEnabled() );
        assertFalse( ui.isShowFindArtifacts() );
        assertTrue( ui.isDisableRegistration() );

        archivaAdministration.updateUiConfiguration( oldUi );
    }
View Full Code Here

    @Test
    public void uiConfigurationReadUpdate()
        throws Exception
    {
        UiConfiguration ui = getArchivaAdministrationService().getUiConfiguration();
        assertNotNull( ui );
        // assert default values
        assertFalse( ui.isDisableEasterEggs() );
        assertFalse( ui.isDisableRegistration() );
        assertTrue( ui.isAppletFindEnabled() );
        assertTrue( ui.isShowFindArtifacts() );
        assertNull( ui.getApplicationUrl() );

        ui.setAppletFindEnabled( false );
        ui.setShowFindArtifacts( false );
        ui.setDisableEasterEggs( true );
        ui.setDisableRegistration( true );
        String url = "http://foo.fr/bar";
        ui.setApplicationUrl( url );

        getArchivaAdministrationService().setUiConfiguration( ui );

        ui = getArchivaAdministrationService().getUiConfiguration();

        assertTrue( ui.isDisableEasterEggs() );
        assertTrue( ui.isDisableRegistration() );
        assertFalse( ui.isAppletFindEnabled() );
        assertFalse( ui.isShowFindArtifacts() );
        assertEquals( url, ui.getApplicationUrl() );
    }
View Full Code Here

    @Test
    public void uiConfigurationUpdate_ApplicationUrlHasTrailingSlash()
        throws Exception {

        UiConfiguration ui = getArchivaAdministrationService().getUiConfiguration();
        assertNotNull( ui );
        assertNull( ui.getApplicationUrl() );

        String url = "http://foo.fr/bar/";
        ui.setApplicationUrl( url );

        getArchivaAdministrationService().setUiConfiguration( ui );

        ui = getArchivaAdministrationService().getUiConfiguration();

        assertEquals( "http://foo.fr/bar", ui.getApplicationUrl() );

        // test if multiple '/' is trailing
        url = "http://foo.fr/bar//";

        ui.setApplicationUrl(url);

        getArchivaAdministrationService().setUiConfiguration(ui);

        ui = getArchivaAdministrationService().getUiConfiguration();

        assertEquals( "http://foo.fr/bar", ui.getApplicationUrl() );
    }
View Full Code Here

        // force guest user creation if not exists
        if ( getUserService( authorizationHeader ).getGuestUser() == null )
        {
            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }
        UiConfiguration uiConfiguration = new UiConfiguration();
        uiConfiguration.setApplicationUrl( null );
        getArchivaAdministrationService().setUiConfiguration( uiConfiguration );
        createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );

        SearchService searchService = getSearchService( authorizationHeader );
View Full Code Here

        // force guest user creation if not exists
        if ( getUserService( authorizationHeader ).getGuestUser() == null )
        {
            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }
        UiConfiguration uiConfiguration = new UiConfiguration();
        uiConfiguration.setApplicationUrl( null );
        getArchivaAdministrationService().setUiConfiguration( uiConfiguration );
        createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );

        SearchService searchService = getSearchService( authorizationHeader );
View Full Code Here

        // force guest user creation if not exists
        if ( getUserService( authorizationHeader ).getGuestUser() == null )
        {
            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }
        UiConfiguration uiConfiguration = new UiConfiguration();
        uiConfiguration.setApplicationUrl( null );
        getArchivaAdministrationService().setUiConfiguration( uiConfiguration );
        createAndIndexRepo( testRepoId, "src/test/repo-with-osgi" );

        SearchService searchService = getSearchService( authorizationHeader );
View Full Code Here

    @Test
    public void uiConfigurationReadUpdate()
        throws Exception
    {
        UiConfiguration ui = getArchivaAdministrationService().getUiConfiguration();
        assertNotNull( ui );
        // assert default values
        assertFalse( ui.isDisableEasterEggs() );
        assertFalse( ui.isDisableRegistration() );
        assertTrue( ui.isAppletFindEnabled() );
        assertTrue( ui.isShowFindArtifacts() );
        assertNull( ui.getApplicationUrl() );

        ui.setAppletFindEnabled( false );
        ui.setShowFindArtifacts( false );
        ui.setDisableEasterEggs( true );
        ui.setDisableRegistration( true );
        String url = "http://foo.fr/bar";
        ui.setApplicationUrl( url );

        getArchivaAdministrationService().setUiConfiguration( ui );

        ui = getArchivaAdministrationService().getUiConfiguration();

        assertTrue( ui.isDisableEasterEggs() );
        assertTrue( ui.isDisableRegistration() );
        assertFalse( ui.isAppletFindEnabled() );
        assertFalse( ui.isShowFindArtifacts() );
        assertEquals( url, ui.getApplicationUrl() );
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.admin.model.beans.UiConfiguration

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.