001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.wicket; 018 019import java.util.Locale; 020 021import org.apache.wicket.request.resource.IResource; 022 023/** 024 * A factory which creates resources for a given specification string. The format of the 025 * specification string is determined by the resource factory subclass. If the resource factory 026 * produced button images, the specification might include settings relevant to buttons such as the 027 * width, height and color of the button, as well as the text to draw on the button. 028 * 029 * @see org.apache.wicket.markup.html.image.resource.LocalizedImageResource 030 * @author Jonathan Locke 031 */ 032public interface IResourceFactory 033{ 034 /** 035 * @param specification 036 * The resource specification string 037 * @param locale 038 * The locale for the resource 039 * @param style 040 * The style of the resource (see {@link org.apache.wicket.Session}) 041 * @param variation 042 * The component's variation 043 * @return The resource 044 */ 045 IResource newResource(final String specification, final Locale locale, final String style, 046 final String variation); 047}