View Javadoc
1   package net.avcompris.commons3.api.exception;
2   
3   import java.util.ConcurrentModificationException;
4   
5   import javax.annotation.Nullable;
6   
7   /**
8    * This exception is thrown when a resource update could not take place because
9    * the "fromRevision" field specified in the update didn’t match the actual
10   * "revision" field in the database.
11   *
12   * @author dandriana
13   */
14  public final class IllegalStateUpdateException extends ServiceException {
15  
16  	private static final long serialVersionUID = -2892863391217283996L;
17  
18  	public IllegalStateUpdateException(@Nullable final String message) {
19  
20  		super(409, message);
21  	}
22  
23  	public IllegalStateUpdateException(@Nullable final String message, @Nullable final Throwable cause) {
24  
25  		super(409, message, cause);
26  	}
27  
28  	public IllegalStateUpdateException(@Nullable final ConcurrentModificationException cause) {
29  
30  		super(409, "The resource has been changed already.", cause);
31  	}
32  }