zhouxin
4 years ago
8 changed files with 92 additions and 58 deletions
@ -1,9 +1,14 @@
@@ -1,9 +1,14 @@
|
||||
package net.sf.webdav; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.security.Principal; |
||||
|
||||
public interface ITransaction { |
||||
|
||||
Principal getPrincipal(); |
||||
|
||||
HttpServletRequest getRequest(); |
||||
|
||||
HttpServletResponse getResponse(); |
||||
} |
||||
|
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
package net.sf.webdav; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.security.Principal; |
||||
|
||||
public class Transaction implements ITransaction { |
||||
private final Principal principal; |
||||
private final HttpServletRequest request; |
||||
private final HttpServletResponse response; |
||||
|
||||
public Transaction(Principal principal, HttpServletRequest request, HttpServletResponse response) { |
||||
this.principal = principal; |
||||
this.request = request; |
||||
this.response = response; |
||||
} |
||||
|
||||
@Override |
||||
public Principal getPrincipal() { |
||||
return principal; |
||||
} |
||||
|
||||
@Override |
||||
public HttpServletRequest getRequest() { |
||||
return request; |
||||
} |
||||
|
||||
@Override |
||||
public HttpServletResponse getResponse() { |
||||
return response; |
||||
} |
||||
} |
Loading…
Reference in new issue