KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > agent > client > util > DownloadableFile


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program 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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.agent.client.util;
21
22 import java.io.File JavaDoc;
23 import java.util.Vector JavaDoc;
24
25
26 /**
27  * Represents a file that may be downloaded.
28  *
29  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
30  */

31 public class DownloadableFile {
32     
33     // Private instance variables
34

35     private String JavaDoc applicationName;
36     private boolean executable;
37     private boolean readOnly;
38     private Vector JavaDoc aliases;
39     private File JavaDoc target;
40     private String JavaDoc name;
41     private long checksum;
42     
43     /**
44      * Constructor.
45      *
46      * @param name
47      * @param applicationName
48      * @param executable
49      * @param readOnly
50      * @param writable
51      * @param target
52      */

53     public DownloadableFile(String JavaDoc name, String JavaDoc applicationName, boolean executable, boolean readOnly, File JavaDoc target, long checksum) {
54         super();
55         this.name = name;
56         this.applicationName = applicationName;
57         this.executable = executable;
58         this.readOnly = readOnly;
59         this.target = target;
60         this.checksum = checksum;
61         aliases = new Vector JavaDoc();
62     }
63     
64     public void addAlias(String JavaDoc alias) {
65         aliases.addElement(alias);
66     }
67
68     /**
69      * @param applicationName the applicationName to set
70      */

71     public void setApplicationName(String JavaDoc applicationName) {
72         this.applicationName = applicationName;
73     }
74
75     /**
76      * @param executable the executable to set
77      */

78     public void setExecutable(boolean executable) {
79         this.executable = executable;
80     }
81
82     /**
83      * @return the readOnly
84      */

85     public boolean isReadOnly() {
86         return readOnly;
87     }
88
89     /**
90      * @param readOnly the readOnly to set
91      */

92     public void setReadOnly(boolean readOnly) {
93         this.readOnly = readOnly;
94     }
95
96     /**
97      * @return the applicationName
98      */

99     public String JavaDoc getApplicationName() {
100         return applicationName;
101     }
102
103     /**
104      * @return the executable
105      */

106     public boolean isExecutable() {
107         return executable;
108     }
109
110     /**
111      * @return
112      */

113     public Vector JavaDoc getAliases() {
114         return aliases;
115     }
116
117     /**
118      * @return the target
119      */

120     public File JavaDoc getTarget() {
121         return target;
122     }
123
124     /**
125      * @param target the target to set
126      */

127     public void setTarget(File JavaDoc target) {
128         this.target = target;
129     }
130
131     /**
132      * @return the name
133      */

134     public String JavaDoc getName() {
135         return name;
136     }
137
138     /**
139      * @param name the name to set
140      */

141     public void setName(String JavaDoc name) {
142         this.name = name;
143     }
144
145     /**
146      * @return the checksum
147      */

148     public long getChecksum() {
149         return checksum;
150     }
151
152     /**
153      * @param checksum the checksum to set
154      */

155     public void setChecksum(long checksum) {
156         this.checksum = checksum;
157     }
158     
159     
160 }
Popular Tags