org.broadleafcommerce.common.web.resource.ResourceRequestExtensionHandler Maven / Gradle / Ivy
/*
* #%L
* BroadleafCommerce Common Libraries
* %%
* Copyright (C) 2009 - 2014 Broadleaf Commerce
* %%
* 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.
* #L%
*/
package org.broadleafcommerce.common.web.resource;
import org.broadleafcommerce.common.extension.ExtensionHandler;
import org.broadleafcommerce.common.extension.ExtensionResultHolder;
import org.broadleafcommerce.common.extension.ExtensionResultStatusType;
import org.springframework.core.io.Resource;
/**
* Provides extension points for dealing with requests for resources
*
* @author Andre Azzolini (apazzolini)
*/
public interface ResourceRequestExtensionHandler extends ExtensionHandler {
public static final String RESOURCE_ATTR = "RESOURCE_ATTR";
/**
* Populates the RESOURCE_ATTR field in the ExtensionResultHolder map with an instance of
* {@link Resource} if there is an override resource available for the current path.
*
* @param path
* @param erh
* @return the {@link ExtensionResultStatusType}
*/
public ExtensionResultStatusType getOverrideResource(String path, ExtensionResultHolder erh);
}