Implemeted action for uploading Wikipedia articles (thanks to D.Wunsch)
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / actions / mediawiki / config / AbstractWikipedia.java
1 package net.sourceforge.phpeclipse.wiki.actions.mediawiki.config;
2 //Parts of this sources are copied and modified from the jEdit Wikipedia plugin:
3 //http://www.djini.de/software/wikipedia/index.html
4 //
5 //The modified sources are available under the "Common Public License"
6 //with permission from the original author: Daniel Wunsch
7
8 public abstract class AbstractWikipedia implements IWikipedia {
9   private WikiProperties fProperties;
10
11   protected AbstractWikipedia(WikiProperties properties) {
12     this.fProperties = properties;
13   }
14
15   /**
16    * @return Returns the actionPath.
17    */
18   public String getActionPath() {
19     return fProperties.getString("actionPath");
20   }
21
22   /**
23    * @return Returns the actionPath2.
24    */
25   public String getActionPath2() {
26     return fProperties.getString("actionPath2");
27   }
28
29   /*
30    * (non-Javadoc)
31    * 
32    * @see net.sourceforge.phpeclipse.wiki.actions.mediawiki.config.IWikipedia#getActionUrl()
33    */
34   public String getActionUrl() {
35     return getBaseURL() + getActionPath();
36   }
37
38   /**
39    * @return Returns the baseURL.
40    */
41   public String getBaseURL() {
42     return fProperties.getString("baseURL");
43   }
44
45   /**
46    * @return Returns the charSet.
47    */
48   public String getCharSet() {
49     return fProperties.getString("charSet");
50   }
51
52   /**
53    * @return Returns the loginNoUser.
54    */
55   public String getLoginNoUser() {
56     return fProperties.getString("loginNoUser");
57   }
58
59   /**
60    * @return Returns the loginSuccess.
61    */
62   public String getLoginSuccess() {
63     return fProperties.getString("loginSuccess");
64   }
65
66   /**
67    * @return Returns the loginTitle.
68    */
69   public String getLoginTitle() {
70     return fProperties.getString("specialNs")+ ":Userlogin";
71   } 
72
73   /**
74    * @return Returns the loginWrongPw.
75    */
76   public String getLoginWrongPw() {
77     return fProperties.getString("loginWrongPw");
78   }
79
80   /**
81    * @return Returns the logoutSuccess.
82    */
83   public String getLogoutSuccess() {
84     return fProperties.getString("logoutSuccess");
85   }
86
87   /**
88    * @return Returns the logoutTitle.
89    */
90   public String getLogoutTitle() {
91     return fProperties.getString("specialNs")+ ":Userlogout";
92   }
93
94   /**
95    * @return Returns the metaNs.
96    */
97   public String getMetaNs() {
98     return fProperties.getString("metaNs");
99   }
100
101   /**
102    * @return Returns the readPath.
103    */
104   public String getReadPath() {
105     return fProperties.getString("readPath");
106   }
107
108   /**
109    * @return Returns the specialNs.
110    */
111   public String getSpecialNs() {
112     return fProperties.getString("specialNs");
113   }
114
115   /**
116    * @return Returns the uploadNoLogin.
117    */
118   public String getUploadNoLogin() {
119     return fProperties.getString("uploadNoLogin");
120   }
121
122   /**
123    * @return Returns the uploadSuccess.
124    */
125   public String getUploadSuccess() {
126     return fProperties.getString("uploadSuccess");
127   }
128  
129   /**
130    * @return Returns the uploadTitle.
131    */
132   public String getUploadTitle() {
133     return fProperties.getString("specialNs")+ ":Upload";
134   }
135 }