<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:loc-controller="bea.com/loc/controller" xmlns:loc="http://bea.com/loc" targetNamespace="bea.com/loc/controller" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<xsd:import namespace="http://bea.com/loc" schemaLocation="loc.xsd"/>
	
	<xsd:element name="loc-controller" type="loc-controller:controllerType">
	    <xsd:annotation>
            <xsd:documentation>
                Definition of the root controller element.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
	
	<xsd:complexType name="controllerType">
	    <xsd:annotation>
            <xsd:documentation>
                Definition of the root controller node.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="network" type="loc:networkType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Network definition for the controller.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="use-secure-connections" type="xsd:boolean" default="true">
			    <xsd:annotation>
                    <xsd:documentation>
                        Flag to indicate if secure communication must be used.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="jmx-remote-port" type="loc:portsType" minOccurs="0">
			    <xsd:annotation>
                    <xsd:documentation>
                        JMX Remote port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="console-mode" type="loc-controller:consoleModeTypes">
			<xsd:annotation>
                    <xsd:documentation>
                        Defines the console mode.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="adjudication-timeout" type="xsd:positiveInteger" minOccurs="0">
			    <xsd:annotation>
                    <xsd:documentation>
                        Defines the adjudication timeout.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="logging" type="loc:loggingType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Definition of the logging properties.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="audit" type="loc:auditType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Definition of the audit properties.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="work-managers" type="loc:workManagersType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Definition of the work managers.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="heartbeat-interval">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines how often the controller will poll the agent.
                    </xsd:documentation>
                </xsd:annotation>
			    <xsd:simpleType>
                    <xsd:restriction base="xsd:positiveInteger">
                        <xsd:minInclusive value="10"/>
                    </xsd:restriction>
              </xsd:simpleType>
			</xsd:element>
			<xsd:element name="reconnect-attempts" type="xsd:positiveInteger">
			    <xsd:annotation>
                    <xsd:documentation>
                        Determines the number of times the controller will try to connect
                        to the agent before it stops.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="agents" type="loc-controller:agentBindingsType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Definition of the configured agent.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="lvm-ssh-config" type="loc-controller:lvmSSHConfigType" minOccurs="0">
			    <xsd:annotation>
                    <xsd:documentation>
                        LVM SSH config file location.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>    
			<xsd:element name="notification" type="loc-controller:notificationsType">
			    <xsd:annotation>
                    <xsd:documentation>
                        Definition of the notification properties.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="agentBindingType">
	    <xsd:annotation>
            <xsd:documentation>
                Defines the agent to shich the controller is configured with.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Name of the agent.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        Description of the agent.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="host" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Host of the agent.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="port" type="xsd:positiveInteger">
                <xsd:annotation>
                    <xsd:documentation>
                        Port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="secure-port" type="xsd:positiveInteger">
                <xsd:annotation>
                    <xsd:documentation>
                        Secure port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="state" type="loc-controller:agentStateTypes">
                <xsd:annotation>
                    <xsd:documentation>
                        Defines the state of the agent. The possible states are
                        Connected, Disconnected and Enabled.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="password" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Password.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="agentBindingsType">
	    <xsd:annotation>
            <xsd:documentation>
                Holds the list of agent bindings.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="agent" type="loc-controller:agentBindingType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:simpleType name="agentStateTypes">
	    <xsd:annotation>
            <xsd:documentation>
                Defines all the agent state types.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Connected"/>
			<xsd:enumeration value="Enabled"/>
			<xsd:enumeration value="Disconnected"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:complexType name="jmxNotificationType">
	    <xsd:annotation>
            <xsd:documentation>
                Defines JMX Notification properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Description.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="enabled" type="xsd:boolean">
		        <xsd:annotation>
                    <xsd:documentation>
                        Flag to indicate if JMX notification is enabled.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="snmpNotificationType">
	    <xsd:annotation>
            <xsd:documentation>
                Defines the SNMP Notification properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
		    <xsd:element name="name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Description.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="agent" type="loc-controller:snmpAgentType">
		        <xsd:annotation>
                    <xsd:documentation>
                        Defines the SNMP agent.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="trap-destinations" type="loc-controller:trapDestinationsType">
		        <xsd:annotation>
                    <xsd:documentation>
                        Defines the trap destinations.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="enabled" type="xsd:boolean">
		        <xsd:annotation>
                    <xsd:documentation>
                        Defines if SNMP is enabled.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="snmpAgentType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of the SNMP agent.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Description.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="host" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Host.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="port" type="xsd:positiveInteger">
		        <xsd:annotation>
                    <xsd:documentation>
                        Port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="trap-version" type="loc-controller:trapVersionTypes" default="SNMPv2" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Trap version. The allowable versions are SNMPv1 and SNMPv2.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="enable-inform" type="xsd:boolean">
		        <xsd:annotation>
                    <xsd:documentation>
                        Flag to enable inform.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="trapDestinationType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of an SNMP trap destination.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Description.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="host" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Host.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="port" type="xsd:positiveInteger">
		        <xsd:annotation>
                    <xsd:documentation>
                        Port.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="community" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Community.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="security-name" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Security name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="security-level" type="loc-controller:trapDestinationSecurityLevelTypes" default="noAuthNoPriv" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Security level. The allowable types are noAuthNoPriv,
                        authNoPriv and authPriv.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="trapDestinationsType">
		<xsd:annotation>
            <xsd:documentation>
                Holds a list of trap destinations.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="destination" type="loc-controller:trapDestinationType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:simpleType name="trapVersionTypes">
		<xsd:annotation>
            <xsd:documentation>
                Allowable trap version types.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="SNMPv1"/>
			<xsd:enumeration value="SNMPv2"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:simpleType name="trapDestinationSecurityLevelTypes">
		<xsd:annotation>
            <xsd:documentation>
                Allowable trap destination security level types.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="noAuthNoPriv"/>
			<xsd:enumeration value="authNoPriv"/>
			<xsd:enumeration value="authPriv"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:complexType name="smtpNotificationType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of the default SMTP notification properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Description.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="to-address" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        A comma seperated list of recepient email addresses.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="from-address" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        From address.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="smtp-server" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        SMTP Server.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="enabled" type="xsd:boolean">
		        <xsd:annotation>
                    <xsd:documentation>
                        Defines if SMTP notification is enabled.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
      <xsd:element name="ssl-enabled" type="xsd:boolean" minOccurs="0">
      	<xsd:annotation><xsd:documentation>a</xsd:documentation></xsd:annotation>
      </xsd:element>
      <xsd:element name="authentication-enabled" type="xsd:boolean" minOccurs="0">
      	<xsd:annotation><xsd:documentation>b</xsd:documentation></xsd:annotation>
      </xsd:element>
      <xsd:element name="smtp-port" type="loc:portsType" minOccurs="0">
      	<xsd:annotation><xsd:documentation>c</xsd:documentation></xsd:annotation>
      </xsd:element>
      <xsd:element name="smtp-user" type="xsd:string" minOccurs="0">
      	<xsd:annotation><xsd:documentation>d</xsd:documentation></xsd:annotation>
      </xsd:element>
      <xsd:element name="smtp-password" type="xsd:string" minOccurs="0">
      	<xsd:annotation><xsd:documentation>e</xsd:documentation></xsd:annotation>
      </xsd:element>
      <xsd:element name="additional-properties" type="loc-controller:propertiesType" minOccurs="0">
			  <xsd:annotation><xsd:documentation>Additional SMTP properties</xsd:documentation></xsd:annotation>
      </xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- propertiesType -->
	<xsd:complexType name="propertiesType">
		<xsd:annotation><xsd:documentation>Properties</xsd:documentation></xsd:annotation>
		<xsd:sequence>
			<xsd:element name="property" type="loc-controller:propertyType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation><xsd:documentation>A property</xsd:documentation></xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- propertyType -->
	<xsd:complexType name="propertyType">
		<xsd:annotation><xsd:documentation>A property with the name, description and value</xsd:documentation></xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
				<xsd:annotation><xsd:documentation>Property name</xsd:documentation></xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
				<xsd:annotation><xsd:documentation>Property description</xsd:documentation></xsd:annotation>
			</xsd:element>
			<xsd:element name="value" type="xsd:string">
				<xsd:annotation><xsd:documentation>Property value</xsd:documentation></xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	
	<xsd:complexType name="jmsNotificationType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of the JMS notification properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="description" type="xsd:string" minOccurs="0">
		        <xsd:annotation>
                    <xsd:documentation>
                        Description.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="destination-jndi-name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Destination JNDI Name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="connection-factory-jndi-name" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Connection factory JNDI name.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="jndi-properties" type="loc-controller:jmsJndiPropertiesType">
		        <xsd:annotation>
                    <xsd:documentation>
                        JNDI properties for JMS.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="enabled" type="xsd:boolean">
		        <xsd:annotation>
                    <xsd:documentation>
                        Defines if JMS notification is enabled.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="notificationsType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of all the available notification for the controller.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
			<xsd:element name="smtp" type="loc-controller:smtpNotificationType"/>
			<xsd:element name="jms" type="loc-controller:jmsNotificationType"/>
			<xsd:element name="jmx" type="loc-controller:jmxNotificationType"/>
			<xsd:element name="snmp" type="loc-controller:snmpNotificationType"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="jmsJndiPropertiesType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of the JMS JNDI properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
		    <xsd:element name="initial-factory" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Initial factory.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="provider-url" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Provider URL.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="security-principal" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Security principal.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
			<xsd:element name="password" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        Password.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="lvmSSHConfigType">
		<xsd:annotation>
            <xsd:documentation>
                Definition of the lvmSSHConfig properties.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:sequence>
		    <xsd:element name="public-key-file" type="xsd:string">
		        <xsd:annotation>
                    <xsd:documentation>
                        location of the public key file
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:simpleType name="consoleModeTypes">
		<xsd:annotation>
            <xsd:documentation>
                Definition the available console modes.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="SECURE"/>
			<xsd:enumeration value="UNSECURE"/>
			<xsd:enumeration value="BOTH"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>
