1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package com.xpn.xwiki.web

File XWikiForm.java

 

Coverage histogram

../../../../img/srcFileCovDistChart7.png
64% of files have more coverage

Code metrics

0
6
4
1
75
28
4
0.67
1.5
4
1

Classes

Class Line # Actions
XWikiForm 30 6 0% 4 3
0.770%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package com.xpn.xwiki.web;
21   
22    import javax.servlet.http.HttpServletRequest;
23   
24    import org.apache.struts.action.ActionForm;
25    import org.apache.struts.action.ActionMapping;
26   
27    /**
28    * @version $Id: 9cdbb7840f184b9ed6d790c088b41d3542d967ca $
29    */
 
30    public abstract class XWikiForm extends ActionForm
31    {
32    private XWikiRequest request;
33   
34    /**
35    * Reset all properties to their default values.
36    *
37    * @param request The servlet request we are processing
38    */
 
39  1890 toggle public void setRequest(HttpServletRequest request)
40    {
41  1891 this.request = new XWikiServletRequest(request);
42    }
43   
44    /**
45    * Reset all properties to their default values.
46    *
47    * @param mapping The mapping used to select this instance
48    * @param request The servlet request we are processing
49    */
 
50  1890 toggle @Override
51    public void reset(ActionMapping mapping, HttpServletRequest request)
52    {
53  1890 setRequest(request);
54  1890 readRequest();
55    }
56   
57    /**
58    * Reset all properties to their default values.
59    *
60    * @param mapping The mapping used to select this instance
61    * @param request The servlet request we are processing
62    */
 
63  0 toggle public void reset(ActionMapping mapping, XWikiRequest request)
64    {
65  0 this.request = request;
66  0 readRequest();
67    }
68   
 
69  2105 toggle public XWikiRequest getRequest()
70    {
71  2105 return this.request;
72    }
73   
74    public abstract void readRequest();
75    }