class ModuleStateManagerImpl implements ModuleStateManager {

    @Override
    public void deactivateAllStates()
    {
        Collection<? extends String> activeStateIds;
        synchronized (myActiveStates)
        {
            activeStateIds = getActiveStateIds();
            myActiveStates.clear();
        }
        for (String stateId : activeStateIds)
        {
            StateDataExtended data;
            synchronized (myStateMap)
            {
                data = myStateMap.get(stateId);
            }
            if (data != null)
            {
                deactivateStates(data);
            }
        }
        saveToPreferences();
    }

    public  ModuleStateManagerImpl(PreferencesRegistry preferencesRegistry);

}