1 package org.apache.archiva.webdav;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.archiva.metadata.repository.storage.RelocationException;
23 import org.apache.jackrabbit.webdav.DavException;
24
25 import javax.servlet.http.HttpServletResponse;
26
27
28
29 public class BrowserRedirectException
30 extends DavException
31 {
32 final String location;
33
34 public BrowserRedirectException( String location )
35 {
36 super( HttpServletResponse.SC_MOVED_PERMANENTLY );
37 this.location = location;
38 }
39
40
41
42
43
44
45
46 public BrowserRedirectException( String location, RelocationException.RelocationType relocationType )
47 {
48 super( relocationType == RelocationException.RelocationType.TEMPORARY
49 ? HttpServletResponse.SC_MOVED_TEMPORARILY
50 : HttpServletResponse.SC_MOVED_PERMANENTLY );
51
52 this.location = location;
53 }
54
55 public String getLocation()
56 {
57 return location;
58 }
59 }