javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/TestPlugin2.java
equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 package com.nokia.mj.impl.installer.jsrpluginnotifier; |
19 package com.nokia.mj.impl.installer.jsrpluginnotifier; |
|
20 |
|
21 import com.nokia.mj.impl.utils.Attribute; |
|
22 import com.nokia.mj.impl.utils.InstallerErrorMessage; |
|
23 import com.nokia.mj.impl.utils.InstallerDetailedErrorMessage; |
|
24 import com.nokia.mj.impl.utils.OtaStatusCode; |
20 |
25 |
21 /** |
26 /** |
22 * Installer Jsr plugin just for test purposes. |
27 * Installer Jsr plugin just for test purposes. |
23 * |
28 * |
24 * @see InstallerExtension |
29 * @see InstallerExtension |
50 // If the MIDlet to be installed has JAD/JAR attribute |
55 // If the MIDlet to be installed has JAD/JAR attribute |
51 // "JSR-Plugin-Test-Exception" with any value, throw Exception |
56 // "JSR-Plugin-Test-Exception" with any value, throw Exception |
52 if ((aInstallerExtensionInfo.iAttributes != null) && |
57 if ((aInstallerExtensionInfo.iAttributes != null) && |
53 (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) |
58 (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) |
54 { |
59 { |
55 throw new RuntimeException("TestPlugin2.install Exception"); |
60 if ("InstallerExtensionException".equals( |
|
61 ((Attribute)aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception")).getValue())) |
|
62 { |
|
63 throw new InstallerExtensionException( |
|
64 InstallerErrorMessage.INST_UNEXPECTED_ERR, null, |
|
65 InstallerDetailedErrorMessage.INTERNAL_ERROR, |
|
66 new String[] { "TestPlugin2.install Exception" }, |
|
67 OtaStatusCode.INTERNAL_ERROR); |
|
68 } |
|
69 else |
|
70 { |
|
71 throw new RuntimeException("TestPlugin2.install Exception"); |
|
72 } |
56 } |
73 } |
57 |
74 |
58 return true; |
75 return true; |
59 } |
76 } |
60 |
77 |
83 // If the MIDlet to be uninstalled has JAD/JAR attribute |
100 // If the MIDlet to be uninstalled has JAD/JAR attribute |
84 // "JSR-Plugin-Test-Exception" with any value, throw Exception |
101 // "JSR-Plugin-Test-Exception" with any value, throw Exception |
85 if ((aInstallerExtensionInfo.iAttributes != null) && |
102 if ((aInstallerExtensionInfo.iAttributes != null) && |
86 (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) |
103 (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) |
87 { |
104 { |
88 throw new RuntimeException("TestPlugin2.uninstall Exception"); |
105 if ("InstallerExtensionException".equals( |
|
106 ((Attribute)aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception")).getValue())) |
|
107 { |
|
108 throw new InstallerExtensionException( |
|
109 InstallerErrorMessage.INST_UNEXPECTED_ERR, null, |
|
110 InstallerDetailedErrorMessage.INTERNAL_ERROR, |
|
111 new String[] { "TestPlugin2.uninstall Exception" }, |
|
112 OtaStatusCode.INTERNAL_ERROR); |
|
113 } |
|
114 else |
|
115 { |
|
116 throw new RuntimeException("TestPlugin2.uninstall Exception"); |
|
117 } |
89 } |
118 } |
90 |
119 |
91 return true; |
120 return true; |
92 } |
121 } |
93 |
122 |