Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/CreateLinkAction.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/CreateLinkAction.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/CreateLinkAction.java	(working copy)
@@ -41,7 +41,6 @@
 import org.ametys.plugins.repository.AmetysObjectIterable;
 import org.ametys.plugins.repository.AmetysRepositoryException;
 import org.ametys.plugins.repository.ModifiableTraversableAmetysObject;
-import org.ametys.plugins.repository.RepositoryIntegrityViolationException;
 import org.ametys.runtime.upload.Upload;
 import org.ametys.runtime.upload.UploadManager;
 import org.ametys.web.repository.site.Site;
@@ -59,6 +58,9 @@
     /** The upload manager. */
     protected UploadManager _uploadManager;
     
+    /** The directory helper */
+    protected DirectoryHelper _directoryHelper;
+    
     /** The cocoon environment context. */
     protected Context _context;
     
@@ -68,6 +70,7 @@
         super.service(serviceManager);
         _siteManager = (SiteManager) serviceManager.lookup(SiteManager.ROLE);
         _uploadManager = (UploadManager) serviceManager.lookup(UploadManager.ROLE);
+        _directoryHelper = (DirectoryHelper) serviceManager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -109,7 +112,7 @@
             return result;
         }
         
-        ModifiableTraversableAmetysObject rootNode = DirectoryHelper.getLinksNode(site, language);
+        ModifiableTraversableAmetysObject rootNode = _directoryHelper.getLinksNode(site, language);
         
         DefaultLink link = createLink(url, rootNode);
         
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/LinkGenerator.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/LinkGenerator.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/LinkGenerator.java	(working copy)
@@ -37,11 +37,15 @@
     /** The Ametys object resolver. */
     protected AmetysObjectResolver _resolver;
     
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
         super.service(serviceManager);
         _resolver = (AmetysObjectResolver) serviceManager.lookup(AmetysObjectResolver.ROLE);
+        _directoryHelper = (DirectoryHelper) serviceManager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -55,7 +59,7 @@
         contentHandler.startDocument();
         
         DefaultLink link = _resolver.resolveById(id);
-        DirectoryHelper.saxLink(contentHandler, link, themeLabelOnly, false, false);
+        _directoryHelper.saxLink(contentHandler, link, themeLabelOnly, false, false);
         
         contentHandler.endDocument();
     }
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/LinkListGenerator.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/LinkListGenerator.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/link/LinkListGenerator.java	(working copy)
@@ -48,11 +48,15 @@
     /** The rendering context handler */
     private RenderingContextHandler _renderingContextHandler;
     
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
         super.service(serviceManager);
         _renderingContextHandler = (RenderingContextHandler) serviceManager.lookup(RenderingContextHandler.ROLE);
+        _directoryHelper = (DirectoryHelper) serviceManager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -97,7 +101,7 @@
         String[] themesArray = StringUtils.split(themes, ",");
         List<String> themesIdsList = ArrayUtils.isEmpty(themesArray) ? new ArrayList<String> () : Arrays.asList(themesArray);
         
-        List<DefaultLink> links = DirectoryHelper.getLinks(themesIdsList, login, siteName, language);
+        List<DefaultLink> links = _directoryHelper.getLinks(themesIdsList, login, siteName, language);
         
         String storageContext = null;
         
@@ -109,7 +113,7 @@
             
             if (login != null)
             {
-                storageContext = DirectoryHelper.getSiteName(request) + "/" + DirectoryHelper.getLanguage(request) + "/" + zoneItem.getId();
+                storageContext = _directoryHelper.getSiteName(request) + "/" + _directoryHelper.getLanguage(request) + "/" + zoneItem.getId();
             }
         }
         
@@ -120,7 +124,7 @@
             // Sax the amount of deleted themes 
             _saxDeletedThemes(siteName, language, themesIdsList);
             
-            DirectoryHelper.saxLinks(contentHandler, links, DirectoryHelper.getContextVars(request), storageContext, login, boMode, true);
+            _directoryHelper.saxLinks(contentHandler, links, _directoryHelper.getContextVars(request), storageContext, login, boMode, true);
         }
         catch (Exception e)
         {
@@ -143,7 +147,7 @@
         int amount = 0;
         for (String themeId : themesIdsList)
         {
-            if (!DirectoryHelper.themeExists(themeId))
+            if (!_directoryHelper.themeExists(themeId))
             {
                 // The theme was deleted but it is still referenced by the service
                 getLogger().warn("The id '" + themeId + "' does not reference an existing theme.");
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectorySetUserPreferencesAction.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectorySetUserPreferencesAction.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectorySetUserPreferencesAction.java	(working copy)
@@ -49,12 +49,16 @@
     /** The rendering context handler */
     private RenderingContextHandler _renderingContextHandler;
     
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
         super.service(serviceManager);
         _userPrefManager = (UserPreferencesManager) serviceManager.lookup(UserPreferencesManager.ROLE + ".FO");
         _renderingContextHandler = (RenderingContextHandler) serviceManager.lookup(RenderingContextHandler.ROLE);
+        _directoryHelper = (DirectoryHelper) serviceManager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -71,8 +75,8 @@
             {
                 Map<String, String> values = new HashMap<String, String>();
                 
-                String siteName = DirectoryHelper.getSiteName(request);
-                String language = DirectoryHelper.getLanguage(request);
+                String siteName = _directoryHelper.getSiteName(request);
+                String language = _directoryHelper.getLanguage(request);
                 String zoneItemId = request.getParameter("zone-item-id");
                 
                 String storageContext = _getStorageContext(siteName, language, zoneItemId);
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectoryService.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectoryService.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectoryService.java	(working copy)
@@ -17,6 +17,9 @@
 
 import java.util.Arrays;
 
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
 import org.apache.commons.lang.StringUtils;
 
 import org.ametys.plugins.repository.metadata.CompositeMetadata;
@@ -28,6 +31,16 @@
  */
 public class LinkDirectoryService extends org.ametys.web.service.StaticService
 {
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
+    @Override
+    public void service(ServiceManager smanager) throws ServiceException
+    {
+        _directoryHelper = (DirectoryHelper) smanager.lookup(DirectoryHelper.ROLE);
+        super.service(smanager);
+    }
+    
     @Override
     public boolean isCacheable(Page currentPage, ZoneItem zoneItem)
     {
@@ -49,7 +62,7 @@
             String siteName = currentPage.getSiteName();
             String language = currentPage.getSitemapName();
             
-            return !DirectoryHelper.hasRestrictions(siteName, language, Arrays.asList(themesIds));
+            return !_directoryHelper.hasRestrictions(siteName, language, Arrays.asList(themesIds));
         }
 
         // Current page is null
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/DirectoryHelper.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/DirectoryHelper.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/DirectoryHelper.java	(working copy)
@@ -72,8 +72,11 @@
 /**
  * Link directory helper.
  */
-public final class DirectoryHelper implements Component, Contextualizable, LogEnabled, Serviceable
+public class DirectoryHelper implements Component, Contextualizable, LogEnabled, Serviceable
 {
+    /** Role allowing the directory helper to be looked up */
+    public static final String ROLE = DirectoryHelper.class.getName();
+    
     private static final String __PLUGIN_NODE_NAME = "linkdirectory";
     
     private static final String __LINKS_NODE_NAME = "ametys:directoryLinks";
@@ -81,29 +84,28 @@
     private static final String __THEMES_NODE_NAME = "ametys:themes";
     
     /** The logger */
-    private static Logger _logger;
+    private Logger _logger;
     
     /** The Ametys object resolver */
-    private static AmetysObjectResolver _ametysObjectResolver;
+    private AmetysObjectResolver _ametysObjectResolver;
     
     /** The users manager */
-    private static UsersManager _usersManager;
+    private UsersManager _usersManager;
 
     /** The groups manager */
-    private static GroupsManager _groupsManager;
+    private GroupsManager _groupsManager;
     
     /** The site manager */
-    private static SiteManager _siteManager;
+    private SiteManager _siteManager;
     
     /** The rendering context handler */
-    private static RenderingContextHandler _renderingContextHandler;
+    private RenderingContextHandler _renderingContextHandler;
     
     /** The user preferences manager */
-    private static UserPreferencesManager _userPreferencesManager;
+    private UserPreferencesManager _userPreferencesManager;
     
     /** The Avalon context */
-    private static Context _context;
-    
+    private Context _context;
     
     public void contextualize(Context context) throws ContextException
     {
@@ -131,7 +133,7 @@
      * @return the root plugin storage object.
      * @throws AmetysRepositoryException if a repository error occurs.
      */
-    public static ModifiableTraversableAmetysObject getPluginNode(Site site) throws AmetysRepositoryException
+    public ModifiableTraversableAmetysObject getPluginNode(Site site) throws AmetysRepositoryException
     {
         try
         {
@@ -152,7 +154,7 @@
      * @return the links root node.
      * @throws AmetysRepositoryException if a repository error occurs.
      */
-    public static ModifiableTraversableAmetysObject getLinksNode(Site site, String language) throws AmetysRepositoryException
+    public ModifiableTraversableAmetysObject getLinksNode(Site site, String language) throws AmetysRepositoryException
     {
         try
         {
@@ -178,7 +180,7 @@
      * @return the themes storage node.
      * @throws AmetysRepositoryException if a repository error occurs.
      */
-    public static ModifiableTraversableAmetysObject getThemesNode(Site site, String language) throws AmetysRepositoryException
+    public ModifiableTraversableAmetysObject getThemesNode(Site site, String language) throws AmetysRepositoryException
     {
         try
         {
@@ -314,7 +316,7 @@
      * @param language the site's language
      * @return the list of default links corresponding to the given themes
      */
-    public static List<DefaultLink> getLinks(List<String> themesIds, String login, String siteName, String language)
+    public List<DefaultLink> getLinks(List<String> themesIds, String login, String siteName, String language)
     {
         Site site = _siteManager.getSite(siteName);
         TraversableAmetysObject linksNode = getLinksNode(site, language);
@@ -354,7 +356,7 @@
      * @param themesIds the list of selected theme ids
      * @return true if the links of the service have access restrictions, false otherwise
      */
-    public static boolean hasRestrictions(String siteName, String language, List<String> themesIds)
+    public boolean hasRestrictions(String siteName, String language, List<String> themesIds)
     {
         AmetysObjectIterable<AmetysObject> links = null;
         
@@ -393,7 +395,7 @@
      * @param links the links to be tested
      * @return true if the link has a restricted access, false otherwise
      */
-    public static boolean isAccessRestricted(AmetysObjectIterable<AmetysObject> links)
+    public boolean isAccessRestricted(AmetysObjectIterable<AmetysObject> links)
     {
         while (links.hasNext())
         {
@@ -409,7 +411,7 @@
         return true;
     }
     
-    private static ModifiableTraversableAmetysObject getOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType) throws AmetysRepositoryException
+    private ModifiableTraversableAmetysObject getOrCreateNode(ModifiableTraversableAmetysObject parentNode, String nodeName, String nodeType) throws AmetysRepositoryException
     {
         ModifiableTraversableAmetysObject node;
         if (parentNode.hasChild(nodeName))
@@ -436,7 +438,7 @@
      * @throws SAXException If an error occurs while generating the SAX events
      * @throws UserPreferencesException if an exception occurs while getting the user preferences
      */
-    public static void saxLinks(ContentHandler contentHandler, List<DefaultLink> links, Map<String, String> contextVars, String storageContext, String login, boolean saxThemesLabelOnly, boolean saxLinksOnly) throws SAXException, UserPreferencesException
+    public void saxLinks(ContentHandler contentHandler, List<DefaultLink> links, Map<String, String> contextVars, String storageContext, String login, boolean saxThemesLabelOnly, boolean saxLinksOnly) throws SAXException, UserPreferencesException
     {
         String prefValues = null;
         String[] prefLinksIdsArray = null; 
@@ -473,7 +475,7 @@
      * @param saxLinksOnly true if we want to sax a link for an input data
      * @throws SAXException If an error occurs while generating the SAX events
      */
-    public static void saxLink (ContentHandler contentHandler, DefaultLink link, boolean saxThemesLabelOnly, boolean selected, boolean saxLinksOnly) throws SAXException
+    public void saxLink (ContentHandler contentHandler, DefaultLink link, boolean saxThemesLabelOnly, boolean selected, boolean saxLinksOnly) throws SAXException
     {
         AttributesImpl attrs = new AttributesImpl();
         attrs.addCDATAAttribute("id", link.getId());
@@ -542,7 +544,7 @@
      * @param language the site's language
      * @return the actual ids of the configured themes
      */
-    public static Map<String, List<String>> getThemesMap(List<String> configuredThemesNames, String siteName, String language)
+    public Map<String, List<String>> getThemesMap(List<String> configuredThemesNames, String siteName, String language)
     {
         Map<String, List<String>> themesMap = new HashMap<String, List<String>> ();
         List<String> correctThemesList = new ArrayList<String> ();
@@ -550,7 +552,7 @@
         
         for (int i = 0; i < configuredThemesNames.size(); i++)
         {
-            ModifiableTraversableAmetysObject themesNode = DirectoryHelper.getThemesNode(_siteManager.getSite(siteName), language);
+            ModifiableTraversableAmetysObject themesNode = getThemesNode(_siteManager.getSite(siteName), language);
             String configuredThemeName = configuredThemesNames.get(i);
             
             if (!themesNode.hasChild(configuredThemeName))
@@ -577,7 +579,7 @@
      * @param configuredThemesNames
      * @return the themes ids corresponding to the theme names
      */
-    public static List<String> getThemesIdsFromThemesNames(Site site, String language, List<String> configuredThemesNames)
+    public List<String> getThemesIdsFromThemesNames(Site site, String language, List<String> configuredThemesNames)
     {
         List<String> configuredThemesIds = new ArrayList<String>();
         
@@ -585,7 +587,7 @@
         {
             for (int i = 0; i < configuredThemesNames.size(); i++)
             {
-                ModifiableTraversableAmetysObject themesNode = DirectoryHelper.getThemesNode(site, language);
+                ModifiableTraversableAmetysObject themesNode = getThemesNode(site, language);
                 String configuredThemeName = configuredThemesNames.get(i);
 
                 if (themesNode.hasChild(configuredThemeName))
@@ -604,7 +606,7 @@
      * @param themeId the id of the theme to verify
      * @return true if the theme exists, false otherwise
      */
-    public static boolean themeExists(String themeId)
+    public boolean themeExists(String themeId)
     {
         return _ametysObjectResolver.hasAmetysObjectForId(themeId);
     }
@@ -614,7 +616,7 @@
      * @param request the request
      * @return the site's name
      */
-    public static String getSiteName(Request request)
+    public String getSiteName(Request request)
     {
         Page page = (Page) request.getAttribute(Page.class.getName());
         String siteName = null;
@@ -634,7 +636,7 @@
      * @param request the request
      * @return the site's language
      */
-    public static String getLanguage(Request request)
+    public String getLanguage(Request request)
     {
         String language = (String) request.getAttribute("sitemapLanguage");
         if (StringUtils.isEmpty(language))
@@ -650,7 +652,7 @@
      * @param request the request
      * @return the map of context variables
      */
-    public static Map<String, String> getContextVars(Request request)
+    public Map<String, String> getContextVars(Request request)
     {
         Map<String, String> contextVars = new HashMap<String, String> ();
         
@@ -666,7 +668,7 @@
      * @param link the link 
      * @throws SAXException If an error occurs while generating the SAX events
      */
-    private static void _saxThemes (ContentHandler contentHandler, DefaultLink link) throws SAXException
+    private void _saxThemes (ContentHandler contentHandler, DefaultLink link) throws SAXException
     {
         XMLUtils.startElement(contentHandler, "themes");
         
@@ -698,7 +700,7 @@
      * @param link
      * @throws SAXException
      */
-    private static void _saxThemesLabel (ContentHandler contentHandler, DefaultLink link) throws SAXException
+    private void _saxThemesLabel (ContentHandler contentHandler, DefaultLink link) throws SAXException
     {
         List<String> themesLabel = new ArrayList<String>();
         
@@ -724,7 +726,7 @@
      * @param link
      * @throws SAXException
      */
-    private static void _saxGrantedUsers(ContentHandler contentHandler, DefaultLink link) throws SAXException
+    private void _saxGrantedUsers(ContentHandler contentHandler, DefaultLink link) throws SAXException
     {
         XMLUtils.startElement(contentHandler, "granted-users");
         
@@ -748,7 +750,7 @@
      * @param link
      * @throws SAXException
      */
-    private static void _saxGrantedGroups(ContentHandler contentHandler, DefaultLink link) throws SAXException
+    private void _saxGrantedGroups(ContentHandler contentHandler, DefaultLink link) throws SAXException
     {
         XMLUtils.startElement(contentHandler, "granted-groups");
         
@@ -768,7 +770,7 @@
      * @param link the link 
      * @return true if the current user is allowed to see the link, false otherwise
      */
-    private static boolean _isCurrentUserGrantedAccess(DefaultLink link)
+    private boolean _isCurrentUserGrantedAccess(DefaultLink link)
     {
         RenderingContext renderingContext = _renderingContextHandler.getRenderingContext();
         
@@ -808,7 +810,7 @@
      * @param grantedGroups the list of granted groups
      * @return true if the user is granted access, false otherwise
      */
-    private static boolean _isGrantedAccess(String login, String[] grantedUsers, String[] grantedGroups)
+    private boolean _isGrantedAccess(String login, String[] grantedUsers, String[] grantedGroups)
     {
         Set<String> groups  = _groupsManager.getUserGroups(login);  
 
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectoryInputData.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectoryInputData.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/LinkDirectoryInputData.java	(working copy)
@@ -69,6 +69,9 @@
     /** The rendering context handler */
     private RenderingContextHandler _renderingContextHandler;
     
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
     /** Excalibur source resolver */
     private SourceResolver _sourceResolver;
     
@@ -97,6 +100,7 @@
     {
         _renderingContextHandler = (RenderingContextHandler) manager.lookup(RenderingContextHandler.ROLE);
         _sourceResolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
+        _directoryHelper = (DirectoryHelper) manager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -125,7 +129,7 @@
                 return true;
             }
             
-            String language = DirectoryHelper.getLanguage(request);
+            String language = _directoryHelper.getLanguage(request);
             
             Map<String, Boolean> configurableAndApplicableMap = _isConfigurableAndApplicable(_getTemplate(request));
             if (!configurableAndApplicableMap.get("applicable"))
@@ -142,9 +146,9 @@
             
             // Find the configured theme ids for this template 
             List<String> configuredThemesNames = _getConfiguredThemes(template, language);
-            List<String> configuredThemesIds = DirectoryHelper.getThemesIdsFromThemesNames(site, language, configuredThemesNames);
+            List<String> configuredThemesIds = _directoryHelper.getThemesIdsFromThemesNames(site, language, configuredThemesNames);
             
-            return !DirectoryHelper.hasRestrictions(DirectoryHelper.getSiteName(request), language, configuredThemesIds);
+            return !_directoryHelper.hasRestrictions(_directoryHelper.getSiteName(request), language, configuredThemesIds);
         }
         catch (Exception e)
         {
@@ -213,8 +217,8 @@
 
     private void _saxThemesLinks(ContentHandler contentHandler, String login, Request request) throws ProcessingException
     {
-        String language = DirectoryHelper.getLanguage(request);
-        String siteName = DirectoryHelper.getSiteName(request);
+        String language = _directoryHelper.getLanguage(request);
+        String siteName = _directoryHelper.getSiteName(request);
         try
         {
             List<String> configuredThemesNames = _getConfiguredThemes(_getTemplate(request), language);
@@ -225,17 +229,17 @@
             }
             
             // Get correct themes ids with their names and the names of the wrong themes
-            Map<String, List<String>> themesMap = DirectoryHelper.getThemesMap(configuredThemesNames, siteName, language);
+            Map<String, List<String>> themesMap = _directoryHelper.getThemesMap(configuredThemesNames, siteName, language);
             List<String> correctThemesIds = themesMap.get("themes");
             List<String> unknownThemesNames = themesMap.get("unknown-themes");
             
             if (correctThemesIds.isEmpty() && unknownThemesNames.isEmpty())
             { 
                 // Sax all links
-                List<DefaultLink> links = DirectoryHelper.getLinks(new ArrayList<String> (), login, siteName, language);
+                List<DefaultLink> links = _directoryHelper.getLinks(new ArrayList<String> (), login, siteName, language);
                 XMLUtils.startElement(contentHandler, "links");
                 
-                DirectoryHelper.saxLinks(contentHandler, links, DirectoryHelper.getContextVars(request), siteName + "/" + language, login, true, true);
+                _directoryHelper.saxLinks(contentHandler, links, _directoryHelper.getContextVars(request), siteName + "/" + language, login, true, true);
                 
                 XMLUtils.endElement(contentHandler, "links");
             }
@@ -256,12 +260,12 @@
                 }
                 
                 // Get the links corresponding to the correct configured themes names
-                List<DefaultLink> links = DirectoryHelper.getLinks(correctThemesIds, login, siteName, language);
+                List<DefaultLink> links = _directoryHelper.getLinks(correctThemesIds, login, siteName, language);
                 
                 XMLUtils.startElement(contentHandler, "links");
                 
                 // Sax the final set of links
-                DirectoryHelper.saxLinks(contentHandler, links, DirectoryHelper.getContextVars(request), siteName + "/" + language, login, true, true);
+                _directoryHelper.saxLinks(contentHandler, links, _directoryHelper.getContextVars(request), siteName + "/" + language, login, true, true);
                 
                 XMLUtils.endElement(contentHandler, "links");
             }
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/theme/CreateThemeAction.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/theme/CreateThemeAction.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/theme/CreateThemeAction.java	(working copy)
@@ -59,12 +59,16 @@
     /** The cocoon environment context. */
     protected Context _context;
     
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
         super.service(serviceManager);
         _siteManager = (SiteManager) serviceManager.lookup(SiteManager.ROLE);
         _uploadManager = (UploadManager) serviceManager.lookup(UploadManager.ROLE);
+        _directoryHelper = (DirectoryHelper) serviceManager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -86,7 +90,7 @@
         
         String originalLabel = StringUtils.defaultString((String) jsParameters.get("label"));
         
-        ModifiableTraversableAmetysObject rootNode = DirectoryHelper.getThemesNode(site, language);
+        ModifiableTraversableAmetysObject rootNode = _directoryHelper.getThemesNode(site, language);
         
         // Handle identical labels
         String label = originalLabel;
Index: main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/theme/ThemeListGenerator.java
===================================================================
--- main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/theme/ThemeListGenerator.java	(revision 31097)
+++ main/plugin-link-directory/src/org/ametys/plugins/linkdirectory/theme/ThemeListGenerator.java	(working copy)
@@ -41,11 +41,15 @@
 {
     private SiteManager _siteManager;
     
+    /** The directory helper */
+    private DirectoryHelper _directoryHelper;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
         super.service(serviceManager);
         _siteManager = (SiteManager) serviceManager.lookup(SiteManager.ROLE);
+        _directoryHelper = (DirectoryHelper) serviceManager.lookup(DirectoryHelper.ROLE);
     }
     
     @Override
@@ -89,7 +93,7 @@
             }
             
             Site site = _siteManager.getSite(siteName);
-            TraversableAmetysObject themesNode = DirectoryHelper.getThemesNode(site, language);
+            TraversableAmetysObject themesNode = _directoryHelper.getThemesNode(site, language);
             AmetysObjectIterable<DefaultTheme> themes = themesNode.getChildren();
             
             for (DefaultTheme theme : themes)
