31 |
31 |
32 public PolicyBasedPermissionImpl( |
32 public PolicyBasedPermissionImpl( |
33 String name, |
33 String name, |
34 String target, |
34 String target, |
35 String actionList, |
35 String actionList, |
|
36 int type, |
36 UserSecuritySettings userSettings, |
37 UserSecuritySettings userSettings, |
37 PermissionBase securityPromptDetails) |
38 PermissionBase securityPromptDetails) |
38 { |
39 { |
39 super(name, target, actionList, userSettings, securityPromptDetails); |
40 super(name, target, actionList, userSettings, securityPromptDetails); |
|
41 this.type = type; |
|
42 } |
40 |
43 |
41 this.type = USER_TYPE; |
44 public PolicyBasedPermissionImpl( |
|
45 String name, |
|
46 String target, |
|
47 String actionList, |
|
48 int type, |
|
49 UserSecuritySettings userSettings) |
|
50 { |
|
51 this(name, target, actionList, type, userSettings, null); |
42 } |
52 } |
43 |
53 |
44 public PolicyBasedPermissionImpl(PolicyBasedPermission p) |
54 public PolicyBasedPermissionImpl(PolicyBasedPermission p) |
45 { |
55 { |
46 this(p.getName(), p.getTarget(), p.getActionList(), |
56 this(p.getName(), p.getTarget(), p.getActionList(), p.getType(), |
47 (p.getUserSecuritySettings() != null ? |
57 (p.getUserSecuritySettings() != null ? |
48 new UserSecuritySettingsImpl(p.getUserSecuritySettings().getName(), |
58 new UserSecuritySettingsImpl(p.getUserSecuritySettings().getName(), |
49 p.getUserSecuritySettings().getCurrentInteractionMode(), |
59 p.getUserSecuritySettings().getCurrentInteractionMode(), |
50 p.getUserSecuritySettings().getAllowedInteractionModes()) : null), |
60 p.getUserSecuritySettings().getAllowedInteractionModes()) : null), |
51 null); |
61 null); |
55 String name, |
65 String name, |
56 String target, |
66 String target, |
57 String actionList, |
67 String actionList, |
58 UserSecuritySettings userSettings) |
68 UserSecuritySettings userSettings) |
59 { |
69 { |
60 this(name, target, actionList, userSettings, null); |
70 this(name, target, actionList, USER_TYPE, userSettings, null); |
61 } |
71 } |
62 |
72 |
63 |
73 |
64 public PolicyBasedPermissionImpl( |
74 public PolicyBasedPermissionImpl( |
65 String name, |
75 String name, |
66 String target, |
76 String target, |
67 String actionList, |
77 String actionList, |
68 int type) |
78 int type) |
69 { |
79 { |
70 super(name, target, actionList, null); |
80 this(name, target, actionList, type, null, null); |
71 |
|
72 // Check type |
|
73 this.type = type; |
|
74 } |
81 } |
75 |
82 |
76 public int getType() |
83 public int getType() |
77 { |
84 { |
78 return type; |
85 return type; |