/*
* Copyright (c) 2002-2012 Alibaba Group Holding Limited.
* All rights reserved.
*
* 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 com.alibaba.citrus.service.resource;
/**
* 代表一个<code><resource></code>、<code><resource-alias></code>或
* <code><resource-filters></code>的匹配结果。
*
* @author Michael Zhou
*/
public interface ResourceMatchResult {
/** 取得已经匹配的名称。 */
String getResourceName();
/** 将匹配部分替换成指定字符串。 */
String substitute(String substitution);
/** 保存最近匹配的状态,避免递归回溯时状态被破坏。 */
void saveLastResult();
/** 恢复最近匹配的状态。 */
void restoreLastResult();
}