Commit e5baf157 authored by Guillaume Surrel's avatar Guillaume Surrel

Add new audit rules.

parent efd30401
...@@ -1153,7 +1153,7 @@ ...@@ -1153,7 +1153,7 @@
id="uniqueIdRule" id="uniqueIdRule"
message="Server Id (sid) must be unique."> message="Server Id (sid) must be unique.">
<rule <rule
body="ScalAgentServer.allInstances()->forAll(j | j.sid = self.sid implies j = self)"/> body="ScalAgentServer.allInstances()->one(j | j.sid = self.sid)"/>
<target <target
xsi:type="gmfmap:DomainElementTarget"> xsi:type="gmfmap:DomainElementTarget">
<element <element
...@@ -1166,7 +1166,7 @@ ...@@ -1166,7 +1166,7 @@
id="uniqueDomainRule" id="uniqueDomainRule"
message="Domain name must be unique."> message="Domain name must be unique.">
<rule <rule
body="NetworkDomain.allInstances()->forAll(n | n.name = self.name implies n = self)"/> body="NetworkDomain.allInstances()->one(n | n.name = self.name)"/>
<target <target
xsi:type="gmfmap:DomainElementTarget"> xsi:type="gmfmap:DomainElementTarget">
<element <element
...@@ -1188,29 +1188,89 @@ ...@@ -1188,29 +1188,89 @@
</target> </target>
</audits> </audits>
<audits <audits
name="Port used check" name="ConnectionManager presence check"
description="Available port check." description="TCPProxyService with ConnectionManager check."
id="portcheck" id="connectionmanager.presence"
message="Server is linked with two different domains using the same port."> message="TCPProxyService can't work without a ConnectionManager service.">
<rule <rule
body="self.network->forAll(c1,c2 | c1.port = c2.port implies c1 = c2)"/> body="self.oclAsType(ecore::EObject).eContainer().oclAsType(ScalAgentServer).services->select(f | f.oclIsKindOf(ConnectionManager))->notEmpty()"/>
<target <target
xsi:type="gmfmap:DomainElementTarget"> xsi:type="gmfmap:DomainElementTarget">
<element <element
href="joram.ecore#//ScalAgentServer"/> href="joram.ecore#//TCPProxyService"/>
</target> </target>
</audits> </audits>
<audits <audits
name="ConnectionManager presence check" name="Port availability."
description="TCPProxyService with ConnectionManager check." description="Check port availability."
id="connectionmanager.presence" id="port_conflict"
message="TCPProxyService can't work without a ConnectionManager service."> message="Host port conflict on port : {0}">
<rule <rule
body="services->select(f | f.oclIsKindOf(TCPProxyService))->notEmpty() implies services->select(f | f.oclIsKindOf(ConnectionManager))->notEmpty()"/> body="empty"
language="java"/>
<target <target
xsi:type="gmfmap:DomainElementTarget"> xsi:type="gmfmap:DomainElementTarget">
<element <element
href="joram.ecore#//ScalAgentServer"/> href="joram.ecore#//Host"/>
</target>
</audits>
<audits
name="Topic class availability."
description="Check topic class availabitlity."
id="topic_availability"
message="Unknown topic class: {0}. Check Joram extension file for known extensions.">
<rule
body="empty"
language="java"/>
<target
xsi:type="gmfmap:DomainAttributeTarget"
nullAsError="true">
<attribute
href="joram.ecore#//Topic/className"/>
</target>
</audits>
<audits
name="Queue class availability."
description="Check queue class availabitlity."
id="queue_availability"
message="Unknown queue class: {0}. Check Joram extension file for known extensions.">
<rule
body="empty"
language="java"/>
<target
xsi:type="gmfmap:DomainAttributeTarget"
nullAsError="true">
<attribute
href="joram.ecore#//Queue/className"/>
</target>
</audits>
<audits
name="Service class availability"
description="Check custom service class availability."
id="service_availability"
message="Unknown service class: {0}. Check Joram extension file for known extensions.">
<rule
body="empty"
language="java"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="joram.ecore#//CustomService"/>
</target>
</audits>
<audits
name="Joram extension file definition."
description="Check if Joram extension file has been defined."
id="joram_extension_defined"
severity="WARNING"
message="Joram extension file has not been defined under Window > Preferences > Joram Diagram. Queue, topic, and custom service class names will not be checked.">
<rule
body="empty"
language="java"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="joram.ecore#//Config"/>
</target> </target>
</audits> </audits>
</audits> </audits>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment