]>
Commit | Line | Data |
---|---|---|
5a24e806 | 1 | /** @file\r |
2 | \r | |
3 | The file is used to save <farPackage> information.\r | |
4 | \r | |
5 | Copyright (c) 2006, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | package org.tianocore.frameworkwizard.far;\r | |
16 | \r | |
17 | import java.io.File;\r | |
18 | import java.util.List;\r | |
19 | \r | |
20 | import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r | |
21 | \r | |
22 | public class FarPackage {\r | |
23 | //\r | |
24 | // Class member\r | |
25 | //\r | |
26 | private FarFileItem farFile;\r | |
27 | \r | |
28 | private String guidValue;\r | |
29 | \r | |
30 | private String version;\r | |
31 | \r | |
32 | private String defaultPath;\r | |
33 | \r | |
34 | private List<FarPlatformItem> farPlatformList;\r | |
35 | \r | |
36 | private List<FarFileItem> contentList;\r | |
37 | \r | |
38 | public String getDefaultPath() {\r | |
39 | return defaultPath;\r | |
40 | }\r | |
41 | \r | |
42 | public void setDefaultPath(String defaultPath) {\r | |
43 | this.defaultPath = defaultPath;\r | |
44 | }\r | |
45 | \r | |
46 | public FarFileItem getFarFile() {\r | |
47 | return farFile;\r | |
48 | }\r | |
49 | \r | |
50 | public void setFarFile(FarFileItem farFile) {\r | |
51 | this.farFile = farFile;\r | |
52 | }\r | |
53 | \r | |
54 | public List<FarPlatformItem> getFarPlatformList() {\r | |
55 | return farPlatformList;\r | |
56 | }\r | |
57 | \r | |
58 | public void setFarPlatformList(List<FarPlatformItem> farPlatformList) {\r | |
59 | this.farPlatformList = farPlatformList;\r | |
60 | }\r | |
61 | \r | |
62 | public String getGuidValue() {\r | |
63 | return guidValue;\r | |
64 | }\r | |
65 | \r | |
66 | public void setGuidValue(String guidValue) {\r | |
67 | this.guidValue = guidValue;\r | |
68 | }\r | |
69 | \r | |
70 | public String getVersion() {\r | |
71 | return version;\r | |
72 | }\r | |
73 | \r | |
74 | public void setVersion(String version) {\r | |
75 | this.version = version;\r | |
76 | }\r | |
77 | \r | |
78 | public List<FarFileItem> getContentList() {\r | |
79 | return this.contentList;\r | |
80 | }\r | |
81 | \r | |
82 | public void setContentList(List<FarFileItem> contentList) {\r | |
83 | this.contentList = contentList;\r | |
84 | }\r | |
85 | \r | |
86 | public boolean isIdentityPkg(PackageIdentification pkgId) {\r | |
87 | File file = new File(farFile.getRelativeFilename());\r | |
88 | if (pkgId.getName() == file.getName() && pkgId.getGuid() == guidValue && pkgId.getVersion() == version) {\r | |
89 | return true;\r | |
90 | }\r | |
91 | return false;\r | |
92 | \r | |
93 | }\r | |
94 | }\r |