Changeset 2110

Show
Ignore:
Timestamp:
05/12/08 09:52:45 (6 months ago)
Author:
npatrick
Message:

Added New Network Resource Wizard and WizardPropertyPage?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/networking/.settings/org.eclipse.jdt.core.prefs

    r1763 r2110  
    1 #Wed Nov 21 11:47:57 EST 2007 
     1#Tue May 06 09:32:07 EDT 2008 
    22eclipse.preferences.version=1 
    33org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 
    4 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 
     4org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 
    55org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 
    6 org.eclipse.jdt.core.compiler.compliance=1.4 
     6org.eclipse.jdt.core.compiler.compliance=1.5 
    77org.eclipse.jdt.core.compiler.debug.lineNumber=generate 
    88org.eclipse.jdt.core.compiler.debug.localVariable=generate 
    99org.eclipse.jdt.core.compiler.debug.sourceFile=generate 
    1010org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 
    11 org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning 
     11org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 
    1212org.eclipse.jdt.core.compiler.problem.autoboxing=ignore 
    1313org.eclipse.jdt.core.compiler.problem.deprecation=warning 
     
    1616org.eclipse.jdt.core.compiler.problem.discouragedReference=warning 
    1717org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore 
    18 org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning 
     18org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 
    1919org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore 
    2020org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled 
     
    6464org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning 
    6565org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning 
    66 org.eclipse.jdt.core.compiler.source=1.3 
     66org.eclipse.jdt.core.compiler.source=1.5 
    6767org.eclipse.jdt.core.formatter.align_type_members_on_columns=false 
    6868org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 
  • branches/networking/src/com/tresys/framework/compiler/dictionary/Rdef.java

    r2045 r2110  
    451451        } 
    452452 
     453        /** 
     454         * Is this a network resource 
     455         * @return true/false 
     456         */ 
     457        public boolean isNetworkRdef() 
     458        { 
     459                return (this.GetSysResourceState (SystemResourceTypes.ipsec) != SysResourceState.No) || 
     460                        (this.GetSysResourceState (SystemResourceTypes.secmark) != SysResourceState.No); 
     461        } 
     462         
    453463        public Map getAccessAllSelf () 
    454464        { 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/GraphicPolicyMetaVisitor.java

    r2029 r2110  
    3131import com.tresys.framework.plugin.editor.policy.graphic.model.EntryConnection; 
    3232import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     33import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3334import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    3435import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    6263 
    6364        public void Visit (ResourceShape i_resource) 
     65        { 
     66                m_visitor.Visit ((Resource) i_resource.getComponent()); 
     67        } 
     68 
     69        public void Visit (NetworkResourceShape i_resource) 
    6470        { 
    6571                m_visitor.Visit ((Resource) i_resource.getComponent()); 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/IShapeVisitor.java

    r1825 r2110  
    1616import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 
    1717import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     18import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    1819import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    1920import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    2930        public void Visit (UserDomainShape i_userDom); 
    3031        public void Visit (ResourceShape i_resource); 
     32        public void Visit (NetworkResourceShape i_resource); 
    3133        public void Visit (BaseResourceShape i_baseRes); 
    3234        public void Visit (AccessConnection i_access); 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/LocationRead.java

    r1825 r2110  
    3434import com.tresys.framework.plugin.editor.policy.graphic.model.EntryConnection; 
    3535import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     36import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3637import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    3738import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    9192                setLocation(ILocationMetaTags.RESOURCE_ELEMENT, i_resource); 
    9293        } 
    93          
     94 
     95        public void Visit (NetworkResourceShape i_resource)  
     96        { 
     97                setSize(ILocationMetaTags.RESOURCE_ELEMENT, i_resource); 
     98                setLocation(ILocationMetaTags.RESOURCE_ELEMENT, i_resource); 
     99        } 
     100 
    94101        public void Visit (BaseResourceShape i_resource) 
    95102        { 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/LocationStore.java

    r2031 r2110  
    3434import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 
    3535import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     36import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3637import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    3738import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    7778        } 
    7879 
     80        public void Visit (NetworkResourceShape i_resource)  
     81        { 
     82                Element resource = m_outData.createElement(ILocationMetaTags.RESOURCE_ELEMENT); 
     83                 
     84                m_rootElement.appendChild(resource); 
     85                addName (resource, i_resource); 
     86                addSize (resource, i_resource); 
     87                addLocation (resource, i_resource); 
     88        } 
     89 
    7990        public void Visit (BaseResourceShape i_resource)  
    8091        { 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/Messages.java

    r2012 r2110  
    3838        public static String palette_resource_obj; 
    3939        public static String palette_resource_desc; 
     40        public static String palette_network_resource_obj; 
     41        public static String palette_network_resource_desc; 
    4042        public static String palette_base_resource_obj; 
    4143        public static String palette_base_resource_desc; 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/ShapeCollector.java

    r1825 r2110  
    1919import com.tresys.framework.plugin.editor.policy.graphic.model.EntryConnection; 
    2020import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     21import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    2122import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    2223import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    4950 
    5051        public void Visit (ResourceShape i_resource) 
     52        { 
     53                put(i_resource.getName(), i_resource); 
     54        } 
     55 
     56        public void Visit (NetworkResourceShape i_resource) 
    5157        { 
    5258                put(i_resource.getName(), i_resource); 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/ShapePathCollector.java

    r2030 r2110  
    2929import com.tresys.framework.plugin.editor.policy.graphic.model.EntryConnection; 
    3030import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     31import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3132import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    3233import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    8687         */ 
    8788        public void Visit (ResourceShape i_resource) 
     89        { 
     90                CheckShape (i_resource); 
     91        } 
     92 
     93        /* (non-Javadoc) 
     94         * @see com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor#Visit(com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape) 
     95         */ 
     96        public void Visit (NetworkResourceShape i_resource) 
    8897        { 
    8998                CheckShape (i_resource); 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/messages.properties

    r2012 r2110  
    2020palette_resource_obj=Resource 
    2121palette_resource_desc=Create a new resource 
     22palette_network_resource_obj=Network Resource 
     23palette_network_resource_desc=Create a new network resource 
    2224palette_base_resource_obj=Base Resource 
    2325palette_base_resource_desc=Create a new base resource 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/model/DefaultMLSLevelUpdateVisitor.java

    r1978 r2110  
    4747                return; 
    4848        } 
    49          
     49 
     50        public void Visit (NetworkResourceShape i_resource) 
     51        { 
     52                i_resource.firePropertyChange (_event.getKey (), _event.getOldValue (), _event.getNewValue ()); 
     53                 
     54                return; 
     55        } 
     56 
    5057        public void Visit (BaseResourceShape i_baseRes) 
    5158        { 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/palette/PolicyPalette.java

    r2027 r2110  
    3333import com.tresys.framework.plugin.editor.policy.graphic.model.EntryConnection; 
    3434import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     35import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3536import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
    3637import com.tresys.framework.plugin.editor.policy.graphic.model.UserDomainShape; 
     
    4748        CombinedTemplateCreationEntry m_userDomain; 
    4849        CombinedTemplateCreationEntry m_controlResource; 
     50        CombinedTemplateCreationEntry m_networkResource; 
    4951         
    5052        ConnectionCreationToolEntry m_accessConnection; 
     
    101103                        m_resource = new PolicyCreationTool (Messages.palette_resource_obj, Messages.palette_resource_desc, ResourceShape.class, new PolicyShapeFactory (ResourceShape.class, m_system), img, large_img); 
    102104                        toolGroup.add (m_resource); 
     105                } 
     106 
     107                { 
     108                        ImageDescriptor img = SEFramework_Plugin.getDefault () 
     109                                .getImageRegistry ().getDescriptor (FRAMEWORKImageRegistry.RESOURCE_ICON); 
     110                        ImageDescriptor large_img = SEFramework_Plugin.getDefault () 
     111                                .getImageRegistry ().getDescriptor (FRAMEWORKImageRegistry.RESOURCE_L_ICON); 
     112                        m_networkResource = new PolicyCreationTool (Messages.palette_network_resource_obj, Messages.palette_network_resource_desc, NetworkResourceShape.class, new PolicyShapeFactory (NetworkResourceShape.class, m_system), img, large_img); 
     113                        toolGroup.add (m_networkResource); 
    103114                } 
    104115 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/parts/PolicyXYLayoutEditPolicy.java

    r2027 r2110  
    3434import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 
    3535import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     36import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3637import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    3738import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
     
    121122                if (childClass == ResourceShape.class  
    122123                        || childClass == DomainShape.class 
    123                         || childClass == EntryPointShape.class)  
     124                        || childClass == EntryPointShape.class 
     125                        || childClass == NetworkResourceShape.class)  
    124126                { 
    125127                        return new ShapeCreateCommand (request, pd, (Rectangle)getConstraintFor(request)); 
  • branches/networking/src/com/tresys/framework/plugin/editor/policy/graphic/parts/ShapeEditPart.java

    r2029 r2110  
    2626import com.tresys.framework.plugin.editor.policy.graphic.figure.ControlResourceFigure; 
    2727import com.tresys.framework.plugin.editor.policy.graphic.figure.DomainFigure; 
     28import com.tresys.framework.plugin.editor.policy.graphic.figure.NetworkResourceFigure; 
    2829import com.tresys.framework.plugin.editor.policy.graphic.figure.ResourceFigure; 
    2930import com.tresys.framework.plugin.editor.policy.graphic.figure.EntryPointFigure; 
     
    3435import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 
    3536import com.tresys.framework.plugin.editor.policy.graphic.model.IDomainShape; 
     37import com.tresys.framework.plugin.editor.policy.graphic.model.NetworkResourceShape; 
    3638import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
    3739import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
     
    119121                { 
    120122                        retValue = new ControlResourceFigure (); 
     123                } 
     124                else if (getModel() instanceof NetworkResourceShape) 
     125                {        
     126                        retValue = new NetworkResourceFigure(); 
    121127                } 
    122128                else  
  • branches/networking/src/com/tresys/framework/plugin/wizards/shape/Messages.java

    r1885 r2110  
    4242        public static String ResourceShapePropertyPage_err_select_port; 
    4343 
     44        public static String NetworkResourcePropertyPage_Properties; 
     45        public static String NetworkResourcePropertyPage_Local_Information; 
     46        public static String NetworkResourcePropertyPage_Remote_Information; 
     47        public static String NetworkResourcePropertyPage_Local_Device; 
     48        public static String NetworkResourcePropertyPage_Remote_Device; 
     49 
     50        public static String NetworkResourcePropertyPage_Encryption_Type; 
     51        public static String NetworkResourcePropertyPage_ip_address; 
     52        public static String NetworkResourcePropertyPage_bad_ip_address; 
     53        public static String NetworkResourcePropertyPage_ip_mask; 
     54        public static String NetworkResourcePropertyPage_ip_ports; 
     55        public static String NetworkResourcePropertyPage_bad_ip_ports; 
     56        public static String NetworkResourcePropertyPage_bad_ip_mask; 
     57        public static String NetworkResource_ipv4_address_pattern; 
     58        public static String NetworkResource_ipv6_address_pattern; 
     59        public static String NetworkResource_ip_ports_pattern; 
     60         
    4461        public static String EntrypointShapePropertyPage_ep_path; 
    4562        public static String EntrypointShapePropertyPage_err_no_executable_path; 
  • branches/networking/src/com/tresys/framework/plugin/wizards/shape/messages.properties

    r1887 r2110  
    3131ResourceShapePropertyPage_err_select_port=A network port must be provided for this resource definition 
    3232 
     33NetworkResourcePropertyPage_Properties=New Network Resource Properties 
     34NetworkResourcePropertyPage_Local_Information=Local Network Information 
     35NetworkResourcePropertyPage_Remote_Information=Remote Network Information 
     36NetworkResourcePropertyPage_Local_Device=Local Network Device 
     37NetworkResourcePropertyPage_Remote_Device=Remote Network Device 
     38NetworkResourcePropertyPage_Encryption_Type=Encryption Type 
     39NetworkResourcePropertyPage_ip_address=IP Address 
     40NetworkResourcePropertyPage_bad_ip_address=Please enter a valid IP Address 
     41NetworkResourcePropertyPage_ip_mask=Mask 
     42NetworkResourcePropertyPage_bad_ip_mask=Please enter a valid IP Mask 
     43NetworkResourcePropertyPage_ip_ports=IP Ports 
     44NetworkResourcePropertyPage_bad_ip_ports=Please enter a valid list of IP ports 
     45NetworkResource_ipv4_address_pattern=^(((25[0-5])|(2[0-4][0-9])|([01]?[0-9][0-9]?))\\.){3}((25[0-5])|(2[0-4][0-9])|([01]?[0-9][0-9]?))$ 
     46NetworkResource_ipv6_address_pattern=^(^(([0-9a-fA-F]{1,4}(((:[0-9a-fA-F]{1,4}){5}::[0-9a-fA-F]{1,4})|((:[0-9a-fA-F]{1,4}){4}::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,1})|((:[0-9a-fA-F]{1,4}){3}::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,2})|((:[0-9a-fA-F]{1,4}){2}::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,3})|(:[0-9a-fA-F]{1,4}::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,4})|(::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,5})|(:[0-9a-fA-F]{1,4}){7}))$|^(::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,6})$)|^::$)|^((([0-9a-fA-F]{1,4}(((:[0-9a-fA-F]{1,4}){3}::([0-9a-fA-F]{1,4}){1})|((:[0-9a-fA-F]{1,4}){2}::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,1})|((:[0-9a-fA-F]{1,4}){1}::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,2})|(::[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,3})|((:[0-9a-fA-F]{1,4}){0,5})))|([:]{2}[0-9a-fA-F]{1,4}(:[0-9a-fA-F]{1,4}){0,4})):|::)((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{0,2})\\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{0,2})$$ 
     47NetworkResource_ip_ports_pattern=([0-9]+( [0-9]+)*)? 
     48 
    3349EntrypointShapePropertyPage_ep_path=Executable Path 
    3450EntrypointShapePropertyPage_err_no_executable_path=A path must be given for the entrypoint