void removeInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation )
throws RepositoryAdminException;
+ OrganisationInformation getOrganisationInformation()
+ throws RepositoryAdminException;
+
+ void setOrganisationInformation( OrganisationInformation organisationInformation )
+ throws RepositoryAdminException;
+
}
getArchivaConfiguration().getConfiguration().getRepositoryScanning().getInvalidContentConsumers() );
}
+ public OrganisationInformation getOrganisationInformation()
+ throws RepositoryAdminException
+ {
+ org.apache.maven.archiva.configuration.OrganisationInformation organisationInformation =
+ getArchivaConfiguration().getConfiguration().getOrganisationInfo();
+ if ( organisationInformation == null )
+ {
+ return null;
+ }
+ return new BeanReplicator().replicateBean( organisationInformation, OrganisationInformation.class );
+ }
+
+ public void setOrganisationInformation( OrganisationInformation organisationInformation )
+ throws RepositoryAdminException
+ {
+ Configuration configuration = getArchivaConfiguration().getConfiguration();
+ if ( organisationInformation != null )
+ {
+ org.apache.maven.archiva.configuration.OrganisationInformation organisationInformationModel =
+ new BeanReplicator().replicateBean( organisationInformation,
+ org.apache.maven.archiva.configuration.OrganisationInformation.class );
+ configuration.setOrganisationInfo( organisationInformationModel );
+ }
+ else
+ {
+ configuration.setOrganisationInfo( null );
+ }
+ saveConfiguration( configuration );
+ }
+
//-------------------------
//
//-------------------------
mockAuditListener.clearEvents();
}
+
+
+ public void organisationInfoUpdate()
+ throws Exception
+ {
+ OrganisationInformation organisationInformation = archivaAdministration.getOrganisationInformation();
+ assertNull( organisationInformation );
+
+ organisationInformation = new OrganisationInformation();
+ organisationInformation.setLogoLocation( "http://foo.com/bar.png" );
+ organisationInformation.setName( "foo org" );
+ organisationInformation.setUrl( "http:/foo.com" );
+
+ archivaAdministration.setOrganisationInformation( organisationInformation );
+
+ organisationInformation = archivaAdministration.getOrganisationInformation();
+ assertNotNull( organisationInformation );
+ assertEquals( "http://foo.com/bar.png", organisationInformation.getLogoLocation() );
+ assertEquals( "foo org", organisationInformation.getName() );
+ assertEquals( "http://foo.com", organisationInformation.getUrl() );
+
+ }
}