/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.url.internal;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.xwiki.component.annotation.Component;
import org.xwiki.configuration.ConfigurationSource;
import org.xwiki.url.URLConfiguration;

/**
 * Default implementation reading data from the {@code xwiki.properties} file.
 *
 * @version $Id$
 * @since 5.3M1
 */
@Component
@Singleton
public class DefaultURLConfiguration implements URLConfiguration
{
    /**
     * Prefix for configuration keys for the Resource module.
     */
    private static final String PREFIX = "url.";

    /**
     * Defines from where to read the Resource configuration data.
     */
    @Inject
    @Named("xwikiproperties")
    private ConfigurationSource configuration;

    @Override
    public String getURLFormatId()
    {
        // Note: the format corresponds to the component hint for the Resource Factory implementation to use.
        return this.configuration.getProperty(PREFIX + "format", "standard");
    }
}

@@ -968,21 +968,24 @@
 .inject.
-Named
+Provider
 ;%0Aimport
@@ -1594,46 +1594,25 @@
     
-@Named(%22xwikiproperties%22)%0A    private 
+private Provider%3C
 Conf
@@ -1622,24 +1622,25 @@
 rationSource
+%3E
  configurati
@@ -1843,16 +1843,22 @@
 uration.
+get().
 getPrope

Use default configuration source in the URL configuration