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

File ObjectRemoveForm.java

 

Coverage histogram

../../../../img/srcFileCovDistChart8.png
54% of files have more coverage

Code metrics

0
7
3
1
54
28
4
0.57
2.33
3
1.33

Classes

Class Line # Actions
ObjectRemoveForm 25 7 0% 4 2
0.880%
 

Contributing tests

No tests hitting this source file were found.

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 org.slf4j.Logger;
23    import org.slf4j.LoggerFactory;
24   
 
25    public class ObjectRemoveForm extends ObjectAddForm
26    {
27    private int classId;
28   
29    private static final Logger LOGGER = LoggerFactory.getLogger(ObjectRemoveForm.class);
30   
 
31  2 toggle @Override
32    public void readRequest()
33    {
34  2 super.readRequest();
35  2 try {
36  2 setClassId(Integer.parseInt(getRequest().getParameter("classid")));
37    } catch (Exception ex) {
38  0 setClassId(-1);
39  0 LOGGER.warn("No or bad classid found while processing an objectremove request: "
40    + getRequest().getParameter("classid"));
41    }
42    }
43   
 
44  1 toggle public int getClassId()
45    {
46  1 return this.classId;
47    }
48   
 
49  2 toggle public void setClassId(int classId)
50    {
51  2 this.classId = classId;
52    }
53   
54    }