Changeset 1969
- Timestamp:
- 03/03/08 11:53:46
(9 months ago)
- Author:
- apatel
- Message:
merged trunk:1965 to the branch.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1949 |
r1969 |
|
| 30 | 30 | super (i_item); |
|---|
| 31 | 31 | m_interfaces = new InterfaceList (i_item.getAllInterfaces ().values ()); |
|---|
| 32 | | m_permissions = new PermissionList (i_item.GetPermVectors ().values ()); |
|---|
| | 32 | Map permVectors = i_item.GetPermVectors (); |
|---|
| | 33 | if (permVectors != null) |
|---|
| | 34 | m_permissions = new PermissionList (permVectors.values ()); |
|---|
| | 35 | else |
|---|
| | 36 | m_permissions = new PermissionList (); |
|---|
| 33 | 37 | m_root = new Object [] { m_interfaces, m_permissions }; |
|---|
| 34 | 38 | } |
|---|
| … | … | |
| 59 | 63 | Map abilityPerms = getCastedItem ().GetPermVectors (); |
|---|
| 60 | 64 | |
|---|
| | 65 | if (abilityPerms == null) |
|---|
| | 66 | return localPerms.size () != 0; |
|---|
| | 67 | |
|---|
| 61 | 68 | if (localPerms.size () != abilityPerms.size ()) |
|---|
| 62 | 69 | return true; |
|---|
| … | … | |
| 82 | 89 | ability.addInterface ((Interface) itr.next ()); |
|---|
| 83 | 90 | |
|---|
| 84 | | ability.GetPermVectors ().clear (); |
|---|
| | 91 | if (ability.GetPermVectors () != null) |
|---|
| | 92 | ability.GetPermVectors ().clear (); |
|---|
| 85 | 93 | for (Iterator itr = m_permissions.getPermVectors ().iterator (); itr.hasNext (); ) |
|---|
| 86 | 94 | ability.AddPermVector ((PermVector) itr.next ()); |
|---|
| r1949 |
r1969 |
|
| 212 | 212 | { |
|---|
| 213 | 213 | Map permissions = i_ability.GetPermVectors (); |
|---|
| 214 | | if (permissions.size () > 0) |
|---|
| | 214 | if (permissions != null && permissions.size () > 0) |
|---|
| 215 | 215 | { |
|---|
| 216 | 216 | m_buff.append ("\tself\n"); |
|---|
| r1886 |
r1969 |
|
| 19 | 19 | { |
|---|
| 20 | 20 | private final Collection /* <PermVector> */ m_permVectors = new HashSet /* <PermVector> */ (); |
|---|
| | 21 | |
|---|
| | 22 | public PermissionList () |
|---|
| | 23 | {} |
|---|
| 21 | 24 | |
|---|
| 22 | 25 | public PermissionList (Collection i_permVectors) |
|---|
| r1952 |
r1969 |
|
| 103 | 103 | DomainShape dom = (DomainShape) m_child; |
|---|
| 104 | 104 | m_controlResources = dom.getControlResoruces(); |
|---|
| 105 | | for (Iterator itr = m_controlResources.iterator (); itr.hasNext (); ) |
|---|
| 106 | | { |
|---|
| 107 | | ControlResourceShape controlRes = (ControlResourceShape) itr.next (); |
|---|
| 108 | | m_connections.addAll (controlRes.getAllConnections ()); |
|---|
| | 105 | if (m_controlResources != null) |
|---|
| | 106 | { |
|---|
| | 107 | for (Iterator itr = m_controlResources.iterator (); itr.hasNext (); ) |
|---|
| | 108 | { |
|---|
| | 109 | ControlResourceShape controlRes = (ControlResourceShape) itr.next (); |
|---|
| | 110 | m_connections.addAll (controlRes.getAllConnections ()); |
|---|
| | 111 | } |
|---|
| 109 | 112 | } |
|---|
| 110 | 113 | } |
|---|
| r1957 |
r1969 |
|
| 72 | 72 | } |
|---|
| 73 | 73 | |
|---|
| 74 | | |
|---|
| 75 | | @SuppressWarnings("static-access") |
|---|
| 76 | 74 | public Policy getPolicy() |
|---|
| 77 | 75 | { |
|---|
| 78 | | IProject proj = getProject (); |
|---|
| 79 | | if( proj == null ) |
|---|
| 80 | | return null; |
|---|
| 81 | | FrameworkNature nature = FrameworkNature.getNature(proj); |
|---|
| 82 | | if ( nature == null ) |
|---|
| 83 | | return null; |
|---|
| 84 | | SELinuxSystem system = nature.GetSystemFromResource (getFile ()); |
|---|
| 85 | | if( system == null ) |
|---|
| | 76 | SELinuxSystem system = FrameworkNature.GetSystemFromResource (getFile ()); |
|---|
| | 77 | if (system == null) |
|---|
| 86 | 78 | return null; |
|---|
| 87 | 79 | return system.getPolicy (); |
|---|
| r1957 |
r1969 |
|
| 40 | 40 | } |
|---|
| 41 | 41 | |
|---|
| 42 | | @Override |
|---|
| | 42 | // @Override |
|---|
| 43 | 43 | protected void initializeEditor () |
|---|
| 44 | 44 | { |
|---|
| r1957 |
r1969 |
|
| 152 | 152 | * @return Information to return based on the domain |
|---|
| 153 | 153 | */ |
|---|
| 154 | | @SuppressWarnings("unchecked") |
|---|
| | 154 | // @SuppressWarnings("unchecked") |
|---|
| 155 | 155 | protected static String getDomainHover(IDomain currDomain) |
|---|
| 156 | 156 | { |
|---|
| … | … | |
| 199 | 199 | * @return Information to return based on the resource |
|---|
| 200 | 200 | */ |
|---|
| 201 | | @SuppressWarnings("unchecked") |
|---|
| | 201 | // @SuppressWarnings("unchecked") |
|---|
| 202 | 202 | protected static String getResourceHover(Resource currResource) |
|---|
| 203 | 203 | { |
|---|
| … | … | |
| 229 | 229 | * @return The String of information to display |
|---|
| 230 | 230 | */ |
|---|
| 231 | | @SuppressWarnings("unchecked") |
|---|
| | 231 | // @SuppressWarnings("unchecked") |
|---|
| 232 | 232 | protected static String getRdefHover(Rdef currRdef) |
|---|
| 233 | 233 | { |
|---|
| … | … | |
| 253 | 253 | * @return |
|---|
| 254 | 254 | */ |
|---|
| 255 | | @SuppressWarnings("unchecked") |
|---|
| | 255 | // @SuppressWarnings("unchecked") |
|---|
| 256 | 256 | protected static String getEntryPointHover(Entrypoint theEntryPoint) |
|---|
| 257 | 257 | { |
|---|
Download in other formats:
* Generating other formats may take time.