1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 package com.nokia.mj.impl.installer.midp2.install.steps; |
|
20 |
|
21 import com.nokia.mj.impl.installer.exetable.ExeBall; |
|
22 import com.nokia.mj.impl.installer.exetable.ExeStep; |
|
23 import com.nokia.mj.impl.installer.utils.Log; |
|
24 import com.nokia.mj.impl.security.midp.authentication.AuthenticationModule; |
|
25 import com.nokia.mj.impl.security.midp.authorization.PermissionGranter; |
|
26 |
|
27 /** |
|
28 * Writes application's security data into storage. |
|
29 */ |
|
30 public class AddSecurityData extends ExeStep |
|
31 { |
|
32 public void execute(ExeBall aBall) |
|
33 { |
|
34 InstallBall ball = (InstallBall)aBall; |
|
35 ball.log("Writing security data..."); |
|
36 AuthenticationModule.getInstance().addSecurityData |
|
37 (ball.iStorageHandler.getSession(), ball.iSuite.getUid(), |
|
38 (ball.iOldSuite != null? ball.iOldSuite.getUid(): null)); |
|
39 PermissionGranter.getInstance().addSecurityData |
|
40 (ball.iStorageHandler.getSession(), ball.iSuite.getUid(), |
|
41 (ball.iOldSuite != null? ball.iOldSuite.getUid(): null)); |
|
42 } |
|
43 |
|
44 public void cancel(ExeBall aBall) |
|
45 { |
|
46 // nop |
|
47 } |
|
48 } |
|