<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:loc="http://bea.com/loc" targetNamespace="http://bea.com/loc" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	
	<xsd:complexType name="workManagerType">
	    <xsd:annotation>
            <xsd:documentation>
                Defines a particular work manager.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        Name of the work manager.
                    </xsd:documentation>
                </xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Description of the work manager.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>   
			<xsd:element name="max-threads-constraint" type="xsd:positiveInteger">
                <xsd:annotation>
                    <xsd:documentation>
                        Maximum number of threads.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="min-threads-constraint" type="xsd:positiveInteger">
                <xsd:annotation>
                    <xsd:documentation>
                        Minimum number of threads.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="workManagersType">
	    <xsd:annotation>
            <xsd:documentation>
                Holds all the work managers.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="work-manager" type="loc:workManagerType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="loggingType">
	    <xsd:annotation>
            <xsd:documentation>
                Defines all the logging properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="file-severity" type="loc:severityTypes">
			    <xsd:annotation>
                    <xsd:documentation>
                        The least important severity of messages that 
                        will be  written to the log file.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="base-file-name" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        Base file name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>    
			<xsd:element name="rotation-type" type="loc:logRotationTypes">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines how the log file rotation will be performed 
                        based on size, time or number.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element> 
			<xsd:element name="rotation-size" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        The size threshold at which the log file is rotated in KB.
                    </xsd:documentation>
                </xsd:annotation>	
            </xsd:element>	
		    <xsd:element name="rotation-time" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        The time in k:mm format when the first rotation happens
                        where k is the hour specified in 24 hour notation and mm
                        is the minutes.
                    </xsd:documentation>
                </xsd:annotation>	
            </xsd:element>
			<xsd:element name="file-rotation-dir" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        The dir where the old rotated files are stored.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="number-of-files-limited" type="xsd:boolean">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines whether old rotated files need to be kept 
                        around forever.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotated-file-count" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        If old rotated files are to be deleted, this parameter determines
                        how many of the last files to always keep.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-time-span" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        The interval for every time based log rotation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-time-span-factor" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        The factor that is applied to the timespan to arrive 
                        at the number of milliseconds that will be the frequency
                        of time based log rotations.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-on-startup-enabled" type="xsd:boolean">
			    <xsd:annotation>
                    <xsd:documentation>
                        Configures whether the log file will be rotated on startup.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="stdout-severity" type="loc:severityTypes">
			    <xsd:annotation>
                    <xsd:documentation>
                        The threshold severity for messages going to stdout.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="auditType">
	    <xsd:annotation>
            <xsd:documentation>
                Defines all the audit properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="base-file-name" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        Base file name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-type" type="loc:logRotationTypes">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines how the log file rotation will be performed 
                        based on size, time or number.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-size" type="xsd:positiveInteger">	
			    <xsd:annotation>
                    <xsd:documentation>
                        The size threshold at which the log file is rotated in KB.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>		
		    <xsd:element name="rotation-time" type="xsd:string">	
			    <xsd:annotation>
                    <xsd:documentation>
                        The time in k:mm format when the first rotation happens
                        where k is the hour specified in 24 hour notation and mm
                        is the minutes.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="file-rotation-dir" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        The dir where the old rotated files are stored.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="number-of-files-limited" type="xsd:boolean">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines whether old rotated files need to be kept 
                        around forever.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotated-file-count" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        If old rotated files are to be deleted, this parameter determines
                        how many of the last files to always keep.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-time-span" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        The interval for every time based log rotation.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-time-span-factor" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        The factor that is applied to the timespan to arrive 
                        at the number of milliseconds that will be the frequency
                        of time based log rotations.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="rotation-on-startup-enabled" type="xsd:boolean">
			    <xsd:annotation>
                    <xsd:documentation>
                        Configures whether the log file will be rotated on startup.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="enabled" type="xsd:boolean">
			    <xsd:annotation>
                    <xsd:documentation>
                        Configures whether auditing is enabled.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="scope" type="loc:auditTypesList" minOccurs="0">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines the scope of type of events that should be audited.
                        The allowable values for the controller are :
                            All
                            ControllerConfiguration
                            ServiceConfiguration
                            Rules
                            ControllerAction
		                   Adjudication
		                   AgentConfiguration
		                The allowable values for the agent are :
                            All
                            AgentAction
                        Scopes cannot be repeated and if All is specified other scopes
                        cannot be specified. 
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="auditTypesList">
		<xsd:annotation>
            <xsd:documentation>
                Conatains a list of all the audit scopes.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="type" type="loc:auditTypes" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="auditTypes">
		<xsd:annotation>
            <xsd:documentation>
                Definition of all the allowable audit scopes.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
		    <xsd:enumeration value="All"/>
		    <xsd:enumeration value="ControllerConfiguration"/>
		    <xsd:enumeration value="ServiceConfiguration"/>
		    <xsd:enumeration value="Rules"/>
		    <xsd:enumeration value="ControllerAction"/>
		    <xsd:enumeration value="Adjudication"/>
		    <xsd:enumeration value="AgentConfiguration"/>
		    <xsd:enumeration value="AgentAction"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="logRotationTypes">
		<xsd:annotation>
            <xsd:documentation>
                Allowable log rotation types.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="BySize"/>
			<xsd:enumeration value="ByTime"/>
			<xsd:enumeration value="ByNumber"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="severityTypes">
		<xsd:annotation>
            <xsd:documentation>
                Allowable log severity types.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
		    <xsd:enumeration value="Emergency"/>
		    <xsd:enumeration value="Alert"/>
		    <xsd:enumeration value="Critical"/>
			<xsd:enumeration value="Error"/>
			<xsd:enumeration value="Warning"/>
			<xsd:enumeration value="Notice"/>
			<xsd:enumeration value="Info"/>
			<xsd:enumeration value="Debug"/>
			<xsd:enumeration value="Trace"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="portsType">
		<xsd:annotation>
            <xsd:documentation>
                Defines the range of valid ports.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:integer">
			<xsd:minInclusive value="0"/>
			<xsd:maxInclusive value="65535"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="networkType">
		<xsd:annotation>
            <xsd:documentation>
                Defines the network components.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="host" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        Host. It could either be a host name or
                        an IP address.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="components" type="loc:networkComponentsType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Network components for the host.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="networkComponentType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of a network component.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
			    <xsd:annotation>
                    <xsd:documentation>
                        Name of the network component.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
			    <xsd:annotation>
                    <xsd:documentation>
                        Description of the network component.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="port" type="loc:portsType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="secure-port" type="loc:portsType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Secure port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="networkComponentsType">
		<xsd:annotation>
            <xsd:documentation>
                Hold a list of network components.
             </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="component" type="loc:networkComponentType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
