package com.atlassian.sal.crowd.pluginsettings;

import com.atlassian.crowd.model.salproperty.SALPropertyDAO;
import com.atlassian.sal.api.pluginsettings.PluginSettings;
import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory;

public class CrowdPluginSettingsFactory implements PluginSettingsFactory
{
    private final SALPropertyDAO salPropertyDAO;

    public CrowdPluginSettingsFactory(final SALPropertyDAO salPropertyDAO)
    {
        this.salPropertyDAO = salPropertyDAO;
    }

    public PluginSettings createGlobalSettings()
    {
        return new CrowdPluginSettings(null, this.salPropertyDAO);
    }

    public PluginSettings createSettingsForKey(String key)
    {
        return new CrowdPluginSettings(key, this.salPropertyDAO);
    }
}

@@ -106,16 +106,74 @@
 tyDAO;%0D%0A
+import com.atlassian.sal.api.component.ComponentLocator;%0D%0A
 import c
@@ -384,22 +384,16 @@
 private 
-final 
 SALPrope
@@ -460,98 +460,16 @@
 ory(
-final SALPropertyDAO salPropertyDAO)%0D%0A    %7B%0D%0A        this.salPropertyDAO = salPropertyDAO;
+)%0D%0A    %7B
 %0D%0A  
@@ -577,22 +577,20 @@
 s(null, 
-this.s
+getS
 alProper
@@ -584,34 +584,36 @@
  getSalPropertyD
-AO
+ao()
 );%0D%0A    %7D%0D%0A%0D%0A   
@@ -724,35 +724,234 @@
 ey, 
-this.salPropertyDAO);%0D%0A    
+getSalPropertyDao());%0D%0A    %7D%0D%0A%0D%0A%09private SALPropertyDAO getSalPropertyDao() %7B%0D%0A%09%09if (this.salPropertyDAO == null)%0D%0A%09%09%09this.salPropertyDAO = ComponentLocator.getComponent(SALPropertyDAO.class);%0D%0A%09%09return this.salPropertyDAO;%0D%0A%09
 %7D%0D%0A%7D

Upgrade to crowd 1.6.2. Had to reverse some changes in CrowdPluginSettingsFactory as Crowd does not expose SALPropertyDAO