service-registry/src/main/java/de/evoila/osb/service/registry/manager/CloudSiteManager.java
@Override
    public void clear() {
        Iterator<CloudSite> iterator = getAll().iterator();
        while (iterator.hasNext()) {
            CloudSite site = iterator.next();

            List<ServiceBroker> serviceBrokers = site.getBrokers();
            for (ServiceBroker serviceBroker : serviceBrokers) {
                serviceBroker.getSites().remove(site);
                sbManager.update(serviceBroker);
            }

            List<CloudContext> cloudContexts = site.getContexts();
            for (CloudContext cloudContext : cloudContexts) {
                cloudContext.setSite(null);
                contextManager.update(cloudContext);
            }

            site.setBrokers(null);
            site.setContexts(null);
        }
        super.clear();
    }
/**
     * Clears all cloud sites from the storage.
     * Additionally removes entries from all {@linkplain ServiceBroker#sites} and the reference from {@linkplain CloudContext#site} first, before calling {@linkplain BasicManager#clear()}.
     */
Clears all cloud sites from the storage.
Additionally removes entries from all  ServiceBroker#sites and the reference from  CloudContext#site first, before calling  BasicManager#clear().
Clears all cloud sites from the storage . Additionally removes entries from all ServiceBroker#sites and the reference from CloudContext#site first before calling BasicManager#clear () .
@Override
    public void clear() {
        Iterator<CloudSite> iterator = getAll().iterator();
        while (iterator.hasNext()) {
            CloudSite site = iterator.next();
            List<ServiceBroker> serviceBrokers = site.getBrokers();
            for (ServiceBroker serviceBroker : serviceBrokers) {
                serviceBroker.getSites().remove(site);
                sbManager.update(serviceBroker);
            }
            List<CloudContext> cloudContexts = site.getContexts();
            for (CloudContext cloudContext : cloudContexts) {
                cloudContext.setSite(null);
                contextManager.update(cloudContext);
            }
            site.setBrokers(null);
            site.setContexts(null);
        }
        super.clear();
    }
@ Override public void clear ( ) { Iterator < CloudSite > iterator = getAll ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { CloudSite site = iterator . next ( ) ; List < ServiceBroker > serviceBrokers = site . getBrokers ( ) ; for ( ServiceBroker serviceBroker : serviceBrokers ) { serviceBroker . getSites ( ) . remove ( site ) ; sbManager . update ( serviceBroker ) ; } List < CloudContext > cloudContexts = site . getContexts ( ) ; for ( CloudContext cloudContext : cloudContexts ) { cloudContext . setSite ( null ) ; contextManager . update ( cloudContext ) ; } site . setBrokers ( null ) ; site . setContexts ( null ) ; } super . clear ( ) ; }
Clears all cloud sites from the storage.
Clears all cloud sites from the storage .