Changeset 2025

Show
Ignore:
Timestamp:
04/01/08 09:03:55 (8 months ago)
Author:
apatel
Message:

merged trunk 2023

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/custome_policy/framework-plugin/.project

    r1542 r2025  
    44        <comment>JavaCC Nature</comment> 
    55        <projects> 
     6                <project>libselinuxjava</project> 
    67        </projects> 
    78        <buildSpec> 
  • branches/custome_policy/framework-plugin/.settings/org.eclipse.jdt.ui.prefs

    r1989 r2025  
    1 #Mon Mar 03 14:34:58 EST 2008 
     1#Thu Mar 13 15:53:52 EDT 2008 
    22eclipse.preferences.version=1 
    33formatter_profile=_Project Format 
  • branches/custome_policy/framework-plugin/plugin.xml

    r1989 r2025  
    328328            name="%MLSSettingsProperties" 
    329329            objectClass="org.eclipse.core.resources.IProject"> 
     330         <filter 
     331               name="nature" 
     332               value="com.tresys.cdsframework.FrameworkNature"> 
     333         </filter> 
    330334      </page> 
    331335   </extension> 
     
    536540                  id="com.tresys.slide.perspective"> 
    537541            </perspectiveShortcut> 
     542            <view 
     543                  closeable="true" 
     544                  id="com.tresys.slide.plugin.views.PolicyExplorerView" 
     545                  minimized="false" 
     546                  moveable="true" 
     547                  relationship="stack" 
     548                  relative="com.tresys.cdsframework.plugin.views.navigator.FrameworkNavigator" 
     549                  showTitle="true" 
     550                  standalone="false" 
     551                  visible="false"> 
     552            </view> 
    538553         </perspectiveExtension> 
    539554      </extension> 
  • branches/custome_policy/framework-plugin/resources/dictionary/dictionary.fdic

    r1989 r2025  
    7575                        } 
    7676                } 
    77               new 
    78               [desc : "Create new file or directory in directory w/type transition"] 
    79               { 
    80                       resource { 
    81                               dir { read getattr lock search ioctl add_name remove_name write } 
    82                               file { create  } 
    83                               lnk_file { create  } 
    84                       } 
    85                       transition { 
    86                               dir 
    87                               file 
    88                               lnk_file 
    89                       } 
    90               } 
     77#             new 
     78#             [desc : "Create new file or directory in directory w/type transition"] 
     79#             { 
     80#                     resource { 
     81#                             dir { read getattr lock search ioctl add_name remove_name write } 
     82#                             file { create  } 
     83#                             lnk_file { create  } 
     84#                     } 
     85#                     transition { 
     86#                             dir 
     87#                             file 
     88#                             lnk_file 
     89#                     } 
     90#             } 
    9191        } 
    9292} 
     
    9898        owner { 
    9999                resource { 
    100                         file { append getattr ioctl link lock read rename setattr unlink write } 
    101                         lnk_file { append getattr ioctl link lock read rename setattr unlink write } 
     100                        file { append create getattr ioctl link lock read rename setattr unlink write } 
     101                        lnk_file { append create getattr ioctl link lock read rename setattr unlink write } 
    102102                } 
    103103        } 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/ErrorHandler.java

    r1989 r2025  
    2828        static final public int ERROR_INVALID_ACCESS = 19; 
    2929        static final public int ERROR_BOOLEAN_WRAP = 20; 
    30         static final public int ERROR_MISSING_DIRECTORY = 21; 
    31         static final public int ERROR_MISSING_NETWORK = 22; 
    32         static final public int ERROR_MISSING_ENTER = 23; 
    3330        static final public int ERROR_DOMAIN_HAS_CHILDREN_AND_RDEF = 24; 
    3431        static final public int ERROR_UNDEFINED_COMPONENT = 25; 
    3532        static final public int ERROR_NO_PARENT_PATH = 26; 
    3633        static final public int ERROR_RDEF_NOT_DEFINED = 27; 
    37         static final public int ERROR_ENTRYPOINT_MISSING_FILE = 28; 
    3834        static final public int ERROR_DUPLICATE_ACCESS = 29; 
    3935        static final public int ERROR_UNABLE_TO_GET_TYPE_FROM_PATH = 30; 
     
    4238        static final public int ERROR_CONSTRAINT_ACCESS_DENIED = 32; 
    4339        static final public int ERROR_RBAC_ACCESS_DENIED = 33; 
     40 
     41        static final public int ERROR_MISSING_DIRECTORY = 40; 
     42        static final public int ERROR_DUPLICATE_DIRECTORY = 41; 
     43        static final public int ERROR_MISSING_FILE = 42; 
     44        static final public int ERROR_DUPLICATE_FILE = 43; 
     45        static final public int ERROR_MISSING_ENTER = 44; 
     46        static final public int ERROR_DUPLICATE_ENTER_PATH = 45; 
     47        static final public int ERROR_ENTRYPOINT_MISSING_FILE = 45; 
     48        static final public int ERROR_MISSING_NETWORK = 49; 
    4449         
    4550        protected int warningCount = 0; 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java

    r1989 r2025  
    4747        private StringBuffer m_bufConnection; 
    4848 
    49         private static char newLine = '\n'
     49        private static String newLine = System.getProperty("line.separator")
    5050 
    5151        public PolicyGenerator()  
     
    5858        public void Visit(Resource i_resource)  
    5959        { 
    60                 StringBuffer buf = new StringBuffer(); 
     60                StringBuffer buf = new StringBuffer(150); 
    6161                buf.append("resource " + i_resource.getName()); 
    6262 
     
    8686        public void Visit(Domain i_domain)  
    8787        { 
    88                 StringBuffer buf = new StringBuffer(); 
     88                StringBuffer buf = new StringBuffer(150); 
    8989                buf.append("domain " + i_domain.getName()); 
    9090 
     
    131131        public void Visit(EntrypointResource i_ep)  
    132132        { 
    133                 StringBuffer buf = new StringBuffer(); 
     133                StringBuffer buf = new StringBuffer(100); 
    134134 
    135135                buf.append("entrypoint "); 
     
    146146        public void Visit(AccessResource i_access)  
    147147        { 
    148                 StringBuffer buf = new StringBuffer(); 
     148                StringBuffer buf = new StringBuffer(150); 
    149149 
    150150                AbstractToken bool = i_access.getBool(); 
     
    195195        public void Visit(AccessBaseResource i_access)  
    196196        { 
    197                 StringBuffer buf = new StringBuffer(); 
     197                StringBuffer buf = new StringBuffer(100); 
    198198 
    199199                AbstractToken bool = i_access.getBool(); 
     
    242242        public void Visit(BaseDomain i_baseDomain)  
    243243        { 
    244                 StringBuffer buf = new StringBuffer(); 
     244                StringBuffer buf = new StringBuffer(50); 
    245245 
    246246                buf.append("basedomain " + i_baseDomain.getName()); 
     
    254254        public void Visit(UserDomain i_userDom)  
    255255        { 
    256                 StringBuffer buf = new StringBuffer(); 
     256                StringBuffer buf = new StringBuffer(50); 
    257257 
    258258                buf.append("userdomain " + i_userDom.getName()); 
     
    283283        public void Visit(BaseResource i_baseResource)  
    284284        { 
    285                 StringBuffer buf = new StringBuffer(); 
     285                StringBuffer buf = new StringBuffer(50); 
    286286 
    287287                buf.append("baseresource " + i_baseResource.getName()); 
     
    297297        public void Visit(Enter i_enter)  
    298298        { 
    299                 StringBuffer buf = new StringBuffer(); 
     299                StringBuffer buf = new StringBuffer(150); 
    300300 
    301301                AbstractToken bool = i_enter.getBool(); 
     
    313313                } 
    314314 
    315                 Set entryAccessDefns = i_enter.GetEntryAccessDefns(); 
    316                 String sEntryAccessDefinitions = ""; 
    317                 for (Iterator itr = entryAccessDefns.iterator(); itr.hasNext(); ) 
    318                 { 
    319                         EntryAccessDefn  entryAccessDefn = (EntryAccessDefn) itr.next(); 
    320                         sEntryAccessDefinitions += entryAccessDefn.getName () + " "; 
    321                 } 
    322  
    323                 if (sEntryAccessDefinitions.length() > 0) 
    324                         sEntryAccessDefinitions = " { " + sEntryAccessDefinitions + "}"; 
     315                StringBuffer sEntryAccessDefinitions = new StringBuffer (); 
     316                if (!i_enter.usesDefaults ()) 
     317                { 
     318                        Set entryAccessDefns = i_enter.GetEntryAccessDefns(); 
     319                        for (Iterator itr = entryAccessDefns.iterator(); itr.hasNext(); ) 
     320                        { 
     321                                EntryAccessDefn  entryAccessDefn = (EntryAccessDefn) itr.next(); 
     322                                sEntryAccessDefinitions.append (entryAccessDefn.getName ()).append (" "); 
     323                        } 
     324         
     325                        if (sEntryAccessDefinitions.length() > 0) 
     326                        { 
     327                                sEntryAccessDefinitions.insert (0, " { "); 
     328                                sEntryAccessDefinitions.append ("}"); 
     329                        } 
     330                } 
    325331                 
    326332                buf.append("enter "); 
     
    330336                buf.append(" "); 
    331337                buf.append(i_enter.getEntryPoint().getName()); 
    332                 buf.append(sEntryAccessDefinitions); 
     338                buf.append(sEntryAccessDefinitions.toString ()); 
    333339                buf.append(";"); 
    334340 
     
    359365        public void Visit(Conditional i_conditional)  
    360366        { 
    361                 StringBuffer buf = new StringBuffer(); 
     367                StringBuffer buf = new StringBuffer(50); 
    362368 
    363369                buf.append("boolean "); 
     
    375381        public void Visit(ControlResource i_resource)  
    376382        { 
    377                 StringBuffer buf = new StringBuffer(); 
     383                StringBuffer buf = new StringBuffer(50); 
    378384                Rdef rdef = i_resource.getRdef(); 
    379385                if (rdef == null) 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/mls/MLSSupport.java

    r1989 r2025  
    2121package com.tresys.framework.compiler.mls; 
    2222 
     23import java.io.ByteArrayOutputStream; 
    2324import java.io.File; 
    2425import java.io.FileInputStream; 
     26import java.io.FileNotFoundException; 
    2527import java.io.FileOutputStream; 
    2628import java.io.IOException; 
    2729import java.io.InputStream; 
     30import java.io.PrintStream; 
    2831import java.util.Collection; 
    2932import java.util.Enumeration; 
     
    6871{ 
    6972         
     73        public static final String MLS_SystemHigh = "mls_systemhigh"; 
     74        public static final String MLS_SystemLow = "mls_systemlow"; 
     75 
    7076        private static final String MLS_ELEMENT_NAME = "mls"; 
    7177 
    7278        private static final String LEVEL_ELEMENT_NAME = "level"; 
    73          
    74         private static final String DEFAULT_MLS_SYSTEM_HIGH_RANGE = "mls_systemhigh"; 
    75          
    76         private static final String DEFAULT_MLS_SYSTEM_LOW_RANGE = "mls_systemlow"; 
    7779         
    7880        private static final String DEFAULT_MLS_HIGH_COLOR_VALUE = "0xff0000"; 
     
    137139                _file = new File(fileName); 
    138140                 
    139                 MLSLevel mls = new MLSLevel(DEFAULT_MLS_LOW_LEVEL_NAME, DEFAULT_MLS_SYSTEM_LOW_RANGE); 
     141                MLSLevel mls = new MLSLevel(DEFAULT_MLS_LOW_LEVEL_NAME, MLS_SystemLow); 
    140142                mls.setColor (DEFAULT_MLS_LOW_COLOR_VALUE); 
    141143                mls.setOrder (this.size ());             
    142144                this.add (mls); 
    143145                 
    144                 mls = new MLSLevel(DEFAULT_MLS_HIGH_LEVEL_NAME, DEFAULT_MLS_SYSTEM_HIGH_RANGE); 
     146                mls = new MLSLevel(DEFAULT_MLS_HIGH_LEVEL_NAME, MLS_SystemHigh); 
    145147                mls.setColor (DEFAULT_MLS_HIGH_COLOR_VALUE); 
    146148                mls.setOrder (this.size ());             
     
    298300         
    299301        /** 
     302         * Generate the setrans.conf file from the MLSSupport 
     303         * @param i_nNumSensitivites - max number of sensitivities that are available 
     304         * @param i_nNumCategories - max number of categories that are available 
     305         * @throws FileNotFoundException 
     306         */ 
     307        public ByteArrayOutputStream generateSETransConf (Integer i_nNumSensitivites, Integer i_nNumCategories) 
     308        { 
     309                ByteArrayOutputStream outStream = new ByteArrayOutputStream (); 
     310                 
     311                PrintStream output = new PrintStream (outStream); 
     312                 
     313                output.println ("#"); 
     314                output.println ("# Multi-Category Security translation table for SELinux"); 
     315                output.println ("#"); 
     316                output.println ("# This file was generated by CDS Framework from the settings in the MLS project property sheet"); 
     317                output.println ("#"); 
     318                output.println ("# Uncomment the following to disable translation library"); 
     319                output.println ("# disable=1"); 
     320                output.println ("#"); 
     321                 
     322                for (Iterator itr = iterator (); itr.hasNext (); ) 
     323                { 
     324                        MLSLevel level = (MLSLevel) itr.next (); 
     325                        String sRange = level.getRange (); 
     326                        String sName = level.getName (); 
     327                         
     328                        output.print (fixSensitivity (sRange, i_nNumSensitivites, i_nNumCategories)); 
     329                        output.print ('='); 
     330                        output.println (sName); 
     331                } 
     332                output.flush (); 
     333                 
     334                return outStream; 
     335        } 
     336 
     337        /** 
     338         * Return the real MLS/MCS sensitivity based on the one passed in at the max numbers 
     339         * @param i_sSensitivity - sensitivity string mls_systemlow, mls_systemhigh,  
     340         * @param i_nNumSensitivites - max number of sensitivities that are available 
     341         * @param i_nNumCategories - max number of categories that are available 
     342         * @return string converted to real sensitivity 
     343         */ 
     344        public static final String fixSensitivity (String i_sSensitivity, Integer i_nNumSensitivites, Integer i_nNumCategories) 
     345        { 
     346                StringBuffer sResult = new StringBuffer (i_sSensitivity); 
     347                if (i_nNumCategories != null && i_nNumSensitivites != null) 
     348                { 
     349                        if (MLS_SystemHigh.equals (i_sSensitivity)) 
     350                        { 
     351                                sResult = new StringBuffer (25); 
     352                                sResult.append ("s").append (Math.max (0, i_nNumSensitivites.intValue () -1)); 
     353                                sResult.append (":c0.c").append (Math.max (0, i_nNumCategories.intValue () -1)); 
     354                        } 
     355                        else if (MLS_SystemLow.equals (i_sSensitivity)) 
     356                        { 
     357                                sResult = new StringBuffer ("s0"); 
     358                        } 
     359                } 
     360                else if (i_nNumCategories != null) 
     361                { 
     362                        sResult = new StringBuffer ("s0"); 
     363                        if (MLS_SystemHigh.equals (i_sSensitivity)) 
     364                        { 
     365                                        sResult.append (":c0.c").append (Math.max (0, i_nNumCategories.intValue () -1)); 
     366                        }                                
     367                } 
     368                return sResult.toString (); 
     369        } 
     370 
     371        /** 
    300372         * getNames 
    301373         *  
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/ComponentWithDictObjects.java

    r1995 r2025  
    4444        implements IMLSSetting, ICustomPolicy 
    4545{ 
    46         protected final Map/*<String, Rdef>*/assocRdefs; // associated rdefs 
    47  
    48         protected final Map/*<Rdef, Token>*/assocRdefsLocations; // associated Rdef locations 
    49  
    50         protected final Map/*<IDictionaryObject, List<SystemResource>>*/sysResources; // associated system resources 
    51  
    52         protected MLSLevel m_MLSLevel = null; 
     46        private final Map/*<String, Rdef>*/assocRdefs; // associated rdefs 
     47 
     48        private final Map/*<Rdef, Token>*/assocRdefsLocations; // associated Rdef locations 
     49 
     50        private final Map/*<IDictionaryObject, List<SystemResource>>*/sysResources; // associated system resources 
     51 
     52        private MLSLevel m_MLSLevel = null; 
    5353         
    5454        /** 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/Enter.java

    r1991 r2025  
    5555         * The individual entrypoint accesses that will combine to form the enter. 
    5656         */ 
    57         private Set/*<EntryAccessDefn>*/m_accessDefs; 
    58  
    59         private boolean m_usesDefault; 
     57        private final Set/*<EntryAccessDefn>*/m_accessDefs = new TreeSet (); 
    6058 
    6159        protected final AbstractToken m_token; 
     
    7472         */ 
    7573        public Enter(IDomain i_start, Domain i_end, EntrypointResource i_ep, 
    76                                         AbstractToken i_token, AbstractToken i_bool, Boolean i_activeOnBool) { 
     74                                        AbstractToken i_token, AbstractToken i_bool, Boolean i_activeOnBool)  
     75        { 
    7776                m_domain_start = i_start; 
    7877                m_domain_end = i_end; 
    7978                m_entrypoint_resource = i_ep; 
    8079                m_token = i_token; 
    81                 m_usesDefault = true; 
    82                 m_accessDefs = i_ep.EPDictDef.GetDefaultAccessDefns(); 
     80                m_accessDefs.addAll (i_ep.EPDictDef.GetDefaultAccessDefns()); 
    8381                m_bool = i_bool; 
    8482                m_onOrOff = i_activeOnBool; 
     
    9189         *                      keyed by name 
    9290         */ 
    93         public Set /*<EntryAccessDefn>*/GetEntryAccessDefns() { 
     91        public Set /*<EntryAccessDefn>*/GetEntryAccessDefns()  
     92        { 
    9493                return m_accessDefs; 
    9594        } 
     
    112111         *                                      <code>false</code> otherwise 
    113112         */ 
    114         public boolean AddEntryAccessDefn(EntryAccessDefn i_defn) { 
    115                 if(m_usesDefault) { 
    116                         m_accessDefs = new TreeSet/*<EntryAccessDefn>*/(); 
    117                         m_usesDefault = false; 
    118                 } 
     113        public boolean AddEntryAccessDefn(EntryAccessDefn i_defn)  
     114        { 
    119115                return m_accessDefs.add(i_defn); 
    120116        } 
     
    125121        } 
    126122         
     123        public void ClearEntryAccessDefns () 
     124        { 
     125                m_accessDefs.clear (); 
     126        } 
    127127         
    128128        /** 
     
    131131         * @return String representation of instance. 
    132132         */ 
    133         public String toString() { 
     133        public String toString()  
     134        { 
    134135                return m_domain_start.toString() + Utility.DELIM 
    135136                        + m_domain_end.toString() + Utility.DELIM 
     
    143144         * @return True if this enter is a subset, false otherwise. 
    144145         */ 
    145         public boolean IsSubsetOf(Enter i_other) { 
    146                Set/*<EntryAccessDefn>*/otherAccessDefs = i_other 
    147                        .GetEntryAccessDefns(); 
     146        public boolean IsSubsetOf(Enter i_other)  
     147        { 
     148                Set/*<EntryAccessDefn>*/otherAccessDefs = i_other.GetEntryAccessDefns(); 
    148149 
    149150                /*for (EntryAccessDefn defn : accessDefs)*/ 
    150                 Iterator iter = m_accessDefs.iterator(); 
    151                 while(iter.hasNext())
     151                for (Iterator iter = m_accessDefs.iterator(); iter.hasNext(); )  
     152               
    152153                        EntryAccessDefn defn = (EntryAccessDefn) iter.next(); 
    153                         if(!otherAccessDefs.contains(defn)) { 
     154                        if (!otherAccessDefs.contains(defn))  
     155                        { 
    154156                                return false; 
    155157                        } 
     
    158160        } 
    159161 
    160         public AbstractToken GetNameToken() { 
     162        public AbstractToken GetNameToken()  
     163        { 
    161164                return m_token; 
    162165        } 
    163166 
    164         public IDomain getStartDomain() { 
     167        public IDomain getStartDomain()  
     168        { 
    165169                return m_domain_start; 
    166170        } 
    167171 
    168         public Domain getEndDomain() { 
     172        public Domain getEndDomain()  
     173        { 
    169174                return m_domain_end; 
    170175        } 
    171176 
    172         public EntrypointResource getEntryPoint() { 
     177        public EntrypointResource getEntryPoint()  
     178        { 
    173179                return m_entrypoint_resource; 
    174180        } 
    175181 
    176         public void Accept(IPolicyVisitor i_visitor) { 
     182        public void Accept(IPolicyVisitor i_visitor)  
     183        { 
    177184                i_visitor.Visit(this); 
    178185        } 
    179186 
    180         public AbstractToken getBool() { 
     187        public AbstractToken getBool()  
     188        { 
    181189                return m_bool; 
    182190        } 
     
    186194        } 
    187195 
    188         public void setOnOrOff(Boolean i_orOff) { 
     196        public void setOnOrOff(Boolean i_orOff)  
     197        { 
    189198                m_onOrOff = i_orOff; 
    190199        } 
    191200 
    192         public boolean equals(Object i_obj) { 
    193  
     201        public boolean equals(Object i_obj)  
     202        { 
    194203                if(!(i_obj instanceof Enter)) 
    195204                        return false; 
     
    210219                return true; 
    211220        } 
    212  
    213         public boolean usesDefaults() { 
    214                 return m_usesDefault; 
     221         
     222        public void ResetToDefaults () 
     223        { 
     224                m_accessDefs.clear (); 
     225                m_accessDefs.addAll (m_entrypoint_resource.EPDictDef.GetDefaultAccessDefns()); 
     226        } 
     227 
     228        public boolean usesDefaults()  
     229        { 
     230                return m_accessDefs.equals (m_entrypoint_resource.EPDictDef.GetDefaultAccessDefns ()); 
    215231        } 
    216232         
     
    239255                mIsModified = false; 
    240256        } 
    241  
    242  
    243257} 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/Policy.java

    r1949 r2025  
    210210        public boolean Add(Resource res)  
    211211        { 
    212                 if(GetComponent(res.getName()) != null)  
    213                 { 
    214                         res.getToken().Error( 
    215                                 "The component \"" + res.getName() + "\" is already defined"); 
     212                if (GetComponent(res.getName()) != null)  
     213                { 
     214                        res.getToken().Error ("The component \"" + res.getName() + "\" is already defined"); 
    216215                        return false;                            
    217216                } 
    218217                 
    219                 if(res.getParent() != null)  
     218                if (res.getParent() != null)  
    220219                { 
    221220                        res.getParent().AddChild(res); 
     
    237236         *                              <code>false</code> otherwise. 
    238237         */ 
    239         public boolean Add(EntrypointResource ep)  
    240         { 
    241                 if(GetComponent(ep.getName()) != null)  
    242                 { 
    243                         ep.getToken().Error( 
    244                                 "The component \"" + ep.getName() + "\" is already defined"); 
     238        public boolean Add (EntrypointResource ep)  
     239        { 
     240                if (GetComponent(ep.getName()) != null)  
     241                { 
     242                        ep.getToken().Error("The component \"" + ep.getName() + "\" is already defined"); 
    245243                        return false;                            
    246244                } 
     
    270268                if(axx.getResource().IsDescendant(axx.getDomain ()))  
    271269                { 
    272                         axx.Token 
    273                                 .Error("Constraint violation: a domain cannot access its children"); 
     270                        axx.Token.Error("Constraint violation: a domain cannot access its children"); 
    274271                        return false; 
    275272                } 
     
    279276                if(resourceParent != null && !axx.getDomain ().IsDescendant(resourceParent))  
    280277                { 
    281                         axx.Token 
    282                                 .Error("Constraint violation: a domain cannot access a resource enclosed in another domain"); 
     278                        axx.Token.Error("Constraint violation: a domain cannot access a resource enclosed in another domain"); 
    283279                        return false; 
    284280                } 
     
    401397         * @param dobj          The dictionary object the system resource is associated with. 
    402398         * @param sysres        The system resource. 
    403          * @return                      <code>null</code> on succcess, Component 
     399         * @return                      <code>null</code> on success, Component 
    404400         *                                      already associated with specified resource on failure. 
    405401         */ 
    406         public boolean Add(ComponentWithDictObjects comp, IDictionaryObject dobj, 
    407                                                SystemResource sysres)  
    408         { 
    409                 if(sysResources.containsKey(sysres))  
     402        public boolean Add (ComponentWithDictObjects comp, IDictionaryObject dobj, SystemResource sysres)  
     403        { 
     404               comp.AddSystemResource (dobj, sysres); 
     405                if (sysResources.containsKey (sysres))  
    410406                { 
    411407                        return false; 
     
    413409                sysResources.put(sysres, comp); 
    414410 
    415                 comp.AddSystemResource(dobj, sysres); 
    416411                return true; 
    417412        } 
     
    423418         * @param dobj          The dictionary object the system resource is associated with. 
    424419         * @param sysres        The file resource. 
    425          * @return                      <code>null</code> on succcess, Component 
     420         * @return                      <code>null</code> on success, Component 
    426421         *                                      already associated with specified resource on failure. 
    427422         */ 
    428         public boolean Add(EntrypointResource ep, FileResource sysres)  
    429         { 
    430                 if(sysResources.containsKey(sysres))  
     423        public boolean Add (EntrypointResource ep, FileResource sysres)  
     424        { 
     425                if (sysResources.containsKey(sysres))  
    431426                { 
    432427                        return false; 
    433428                } 
    434                 sysResources.put(sysres, ep); 
    435  
    436                 ep.AddSystemResource(sysres); 
     429                sysResources.put (sysres, ep); 
     430 
     431                ep.AddSystemResource (sysres); 
    437432                return true; 
    438433        } 
     
    443438         * @return the map of components 
    444439         */ 
    445         public Map/*<String, Component>*/getComponents()  
    446         { 
    447                 HashMap allComponents = new HashMap(); 
    448                 Iterator itr = topLevelComponents.values().iterator(); 
    449                 getAllDecendants(itr, allComponents); 
     440        public Map/*<String, Component>*/getComponents ()  
     441        { 
     442                HashMap allComponents = new HashMap (); 
     443      &