View Javadoc

1    /*
2     * This is free software; you can redistribute it and/or modify it
3     * under the terms of the GNU Lesser General Public License as
4     * published by the Free Software Foundation; either version 2.1 of
5     * the License, or (at your option) any later version.
6     *
7     * This software is distributed in the hope that it will be useful,
8     * but WITHOUT ANY WARRANTY; without even the implied warranty of
9     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10    * Lesser General Public License for more details.
11    *
12    * You should have received a copy of the GNU Lesser General Public
13    * License along with this software; if not, write to the Free
14    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
15    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
16    */
17  
18  package installtoolkit.wix;
19  
20  import org.dom4j.Element;
21  
22  /**
23   * Wrapper class to hold the informations for a startmenue / desktop link.
24   * 
25   * @author Christian Elberfeld <elberfeld@web.de>
26   *
27   */
28  public class Shortcut {
29  
30  	protected String file;
31  	protected String name;
32  	protected String icon;
33  	protected String workingdir;
34  	protected String arguments;
35  	
36  	public Shortcut(Element elem) {
37  	
38  		this.file = elem.attributeValue("File");
39  		this.name = elem.attributeValue("Name");
40  		this.icon = elem.attributeValue("Icon",null);
41  		this.workingdir = elem.attributeValue("Workingdir",null);
42  		this.arguments = elem.attributeValue("Arguments",null);
43  				
44  	}
45  	
46  	
47  	/**
48  	 * @see Object#toString()
49  	 */
50  	@Override
51  	public String toString() {
52  		
53  		return "Shortcut [File: "+this.file+" / Name: "+this.name+" / Icon: "+this.icon+" / Workingdir: "+this.workingdir+" / Arguments: "+this.arguments+"]";
54  	}
55  
56  
57  
58  	public String getFile() {
59  		return file;
60  	}
61  
62  
63  
64  	public void setFile(String file) {
65  		this.file = file;
66  	}
67  
68  
69  
70  	public String getName() {
71  		return name;
72  	}
73  
74  
75  
76  	public void setName(String name) {
77  		this.name = name;
78  	}
79  
80  
81  
82  	public String getIcon() {
83  		return icon;
84  	}
85  
86  
87  
88  	public void setIcon(String icon) {
89  		this.icon = icon;
90  	}
91  
92  
93  
94  	public String getArguments() {
95  		return arguments;
96  	}
97  
98  
99  
100 	public void setArguments(String arguments) {
101 		this.arguments = arguments;
102 	}
103 
104 
105 
106 	public String getWorkingdir() {
107 		return workingdir;
108 	}
109 
110 
111 
112 	public void setWorkingdir(String workingdir) {
113 		this.workingdir = workingdir;
114 	}
115 
116 
117 	
118 }