diff -r 63b81d807542 -r 1f0034e370aa javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/TestPlugin2.java --- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/TestPlugin2.java Thu Sep 02 13:22:59 2010 +0300 +++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/TestPlugin2.java Fri Sep 17 16:44:34 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -47,6 +47,14 @@ return false; } + // If the MIDlet to be installed has JAD/JAR attribute + // "JSR-Plugin-Test-Exception" with any value, throw Exception + if ((aInstallerExtensionInfo.iAttributes != null) && + (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) + { + throw new RuntimeException("TestPlugin2.install Exception"); + } + return true; } @@ -64,7 +72,7 @@ // tell that this plugin has been called System.setProperty("TestPlugin2", "uninstall"); - // If the MIDlet to be installed has JAD/JAR attribute + // If the MIDlet to be uninstalled has JAD/JAR attribute // "JSR-Plugin-Test-Cancel" with any value, cancel install if ((aInstallerExtensionInfo.iAttributes != null) && (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Cancel") != null)) @@ -72,6 +80,14 @@ return false; } + // If the MIDlet to be uninstalled has JAD/JAR attribute + // "JSR-Plugin-Test-Exception" with any value, throw Exception + if ((aInstallerExtensionInfo.iAttributes != null) && + (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) + { + throw new RuntimeException("TestPlugin2.uninstall Exception"); + } + return true; } @@ -88,6 +104,14 @@ // tell that this plugin has been called System.setProperty("TestPlugin2", "rollbackInstall"); + + // If the MIDlet to be installed has JAD/JAR attribute + // "JSR-Plugin-Test-Exception" with any value, throw Exception + if ((aInstallerExtensionInfo.iAttributes != null) && + (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) + { + throw new RuntimeException("TestPlugin2.rollbackInstall Exception"); + } } /** @@ -102,5 +126,13 @@ // tell that this plugin has been called System.setProperty("TestPlugin2", "rollbackUninstall"); + + // If the MIDlet to be uninstalled has JAD/JAR attribute + // "JSR-Plugin-Test-Exception" with any value, throw Exception + if ((aInstallerExtensionInfo.iAttributes != null) && + (aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null)) + { + throw new RuntimeException("TestPlugin2.rollbackUninstall Exception"); + } } }