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

File DocumentInfoAPI.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart0.png
83% of files have more coverage

Code metrics

2
18
15
1
111
71
16
0.89
1.2
15
1.07

Classes

Class Line # Actions
DocumentInfoAPI 25 18 0% 16 35
0.00%
 

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.plugin.packaging;
21   
22    import com.xpn.xwiki.XWikiContext;
23    import com.xpn.xwiki.api.Api;
24   
 
25    public class DocumentInfoAPI extends Api
26    {
27    private DocumentInfo doc;
28   
 
29  0 toggle public DocumentInfoAPI(DocumentInfo doc, XWikiContext context)
30    {
31  0 super(context);
32  0 this.doc = doc;
33    }
34   
 
35  0 toggle public DocumentInfo getDocInfo()
36    {
37  0 if (hasProgrammingRights()) {
38  0 return this.doc;
39    }
40  0 return null;
41    }
42   
 
43  0 toggle public boolean isNew()
44    {
45  0 return this.doc.isNew();
46    }
47   
 
48  0 toggle public int getFileType()
49    {
50  0 return this.doc.getFileType();
51    }
52   
 
53  0 toggle public void setFileType(int fileType)
54    {
55  0 this.doc.setFileType(fileType);
56    }
57   
 
58  0 toggle public String getFullName()
59    {
60  0 return this.doc.getFullName();
61    }
62   
63    /**
64    * @return the language of the described document
65    * @since 2.2M1
66    */
 
67  0 toggle public String getLanguage()
68    {
69  0 return this.doc.getLanguage();
70    }
71   
 
72  0 toggle public int isInstallable()
73    {
74  0 return this.doc.isInstallable();
75    }
76   
 
77  0 toggle public int getAction()
78    {
79  0 return this.doc.getAction();
80    }
81   
 
82  0 toggle public void setAction(int action)
83    {
84  0 this.doc.setAction(action);
85    }
86   
 
87  0 toggle public int testInstall(XWikiContext context)
88    {
89  0 return this.doc.testInstall(false, context);
90    }
91   
 
92  0 toggle public int testInstall(boolean isAdmin, XWikiContext context)
93    {
94  0 return this.doc.testInstall(isAdmin, context);
95    }
96   
 
97  0 toggle public static String installStatusToString(int status)
98    {
99  0 return DocumentInfo.installStatusToString(status);
100    }
101   
 
102  0 toggle public static String actionToString(int status)
103    {
104  0 return DocumentInfo.actionToString(status);
105    }
106   
 
107  0 toggle public static int actionToInt(String status)
108    {
109  0 return DocumentInfo.actionToInt(status);
110    }
111    }