<commit_before>/*
 * $Id$
 * $Revision$
 * $Date$
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.markup.html;

import wicket.Application;
import wicket.Resource;
import wicket.ResourceReference;

/**
 * A convenience class for creating resource references to static resources.
 * 
 * @author <NAME>
 */
public class PackageResourceReference extends ResourceReference
{
	private static final long serialVersionUID = 1L;
	
	/**
	 * Constuctor to get a resource reference to a packaged resource.
	 * It will bind itself directly to the given application object, so
	 * that the resource will be created if it did not exist and added to 
	 * the application shared resources.
	 * 
	 * Package resources should be added by a IInitializer implementation
	 * So that all needed packaged resources are there on startup of the application. 
	 * 
	 * @param application
	 *            The application to bind to
	 * @param scope
	 *            The scope of the binding
	 * @param name
	 *            The name of the resource
	 * @see ResourceReference#ResourceReference(Class, String)
	 */
	public PackageResourceReference(Application application, Class scope, String name)
	{
		super(scope, name);
		bind(application);
	}

	/**
	 * Constuctor to get a resource reference to a packaged resource.
	 * It will bind itself directly to the given application object, so
	 * that the resource will be created if it did not exist and added to 
	 * the application shared resources.<commit_msg>added constructor with Style and Locale<commit_after>/*
 * $Id$
 * $Revision$
 * $Date$
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.markup.html;

import java.util.Locale;

import wicket.Application;
import wicket.Resource;
import wicket.ResourceReference;

/**
 * A convenience class for creating resource references to static resources.
 * 
 * @author <NAME>
 */
public class PackageResourceReference extends ResourceReference
{
	private static final long serialVersionUID = 1L;
	
	/**
	 * Constuctor to get a resource reference to a packaged resource.
	 * It will bind itself directly to the given application object, so
	 * that the resource will be created if it did not exist and added to 
	 * the application shared resources.
	 * 
	 * Package resources should be added by a IInitializer implementation
	 * So that all needed packaged resources are there on startup of the application. 
	 * 
	 * @param application
	 *            The application to bind to
	 * @param scope
	 *            The scope of the binding
	 * @param name
	 *            The name of the resource
	 * @param locale
	 *			  The Locale from which the search for the PackageResource must start 			 
	 * @param style 
	 * 			  The Style of the PackageResource
	 * 
	 * @see ResourceReference#ResourceReference(Class, String)
	 */
	public PackageResourceReference(Application application, Class scope, String name, Locale locale, String style)
	{
		super(scope, name);
		setLocale(locale);
		setStyle(style);
		bind(application);
	}

	/**
	 * Constuctor to get a resource reference to a packaged resource.
	 * It will bind itself directly to the given application object, so
	 * that the resource will be created if it did not exist and added to 
	 * the application shared resources.
	 * 
	 * Package resources should be added by a IInitializer implementation
	 * So that all needed packaged resources are there on startup of the application. 
	 * 
	 * @param application
	 *            The application to bind to
	 * @param scope
	 *            The scope of the binding
	 * @param name
	 *            The name of the resource
	 * @see ResourceReference#ResourceReference(Class, String)
	 */
	public PackageResourceReference(Application application, Class scope, String name)
	{
		super(scope, name);
		bind(application);
	}

	/**
	 * Constuctor to get a resource reference to a packaged resource.
	 * It will bind itself directly to the given application object, so
	 * that the resource will be created if it did not exist and added to 
	 * the application shared resources.
{'fraction_non_alphanumeric': 0.09196496572734196, 'fraction_numerical': 0.001904036557501904, 'mean_word_length': 3.548051948051948, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4939678', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1212, 'n_words': 621}