001/* 002 Licensed to the Apache Software Foundation (ASF) under one 003 or more contributor license agreements. See the NOTICE file 004 distributed with this work for additional information 005 regarding copyright ownership. The ASF licenses this file 006 to you under the Apache License, Version 2.0 (the 007 "License"); you may not use this file except in compliance 008 with the License. You may obtain a copy of the License at 009 010 http://www.apache.org/licenses/LICENSE-2.0 011 012 Unless required by applicable law or agreed to in writing, 013 software distributed under the License is distributed on an 014 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 KIND, either express or implied. See the License for the 016 specific language governing permissions and limitations 017 under the License. 018 */ 019package org.apache.wiki.providers; 020 021import org.apache.wiki.api.exceptions.ProviderException; 022 023/** 024 * If the provider detects that someone has modified the repository 025 * externally, it should throw this exception. 026 * <p> 027 * Any provider throwing this exception should first clean up any references 028 * to the modified page it has, so that when we call this the next time, 029 * the page is handled as completely, and we don't get the same exception 030 * again. 031 * 032 * @since 2.1.25 033 */ 034public class RepositoryModifiedException 035 extends ProviderException 036{ 037 private static final long serialVersionUID = 0L; 038 039 protected final String m_page; 040 041 /** 042 * Constructs the exception. 043 * 044 * @param msg The message 045 * @param pageName The name of the page which was modified 046 */ 047 public RepositoryModifiedException( String msg, String pageName ) 048 { 049 super( msg ); 050 051 m_page = pageName; 052 } 053 054 /** 055 * Return the page name given in the constructor. 056 * 057 * @return The page name. 058 */ 059 public String getPageName() 060 { 061 return m_page; 062 } 063}