Search in sources :

Example 6 with AlarmDefinition

use of alma.alarmsystem.alarmmessage.generated.AlarmDefinition in project ACS by ACS-Community.

the class ACSAlarmDAOImplTest method testGetReductionDefinitions.

public void testGetReductionDefinitions() {
    Parent p = new Parent();
    Child c = new Child();
    AlarmDefinition ad_p = new AlarmDefinition();
    AlarmDefinition ad_c = new AlarmDefinition();
    ad_p.setFaultFamily("A1");
    ad_p.setFaultMember("B1");
    ad_p.setFaultCode(1);
    ad_c.setFaultFamily("A2");
    ad_c.setFaultMember("B2");
    ad_c.setFaultCode(2);
    p.setAlarmDefinition(ad_p);
    c.setAlarmDefinition(ad_c);
    ReductionLinkType rl = new ReductionLinkType();
    rl.setParent(p);
    rl.setChild(c);
    rl.setType("NODE");
    ReductionDefinitions rds = _alarmDAO.getReductionRules();
    _alarmDAO.addReductionRule(rds, rl);
//_alarmDAO.flushReductionRules(rds);
}
Also used : Parent(alma.alarmsystem.alarmmessage.generated.Parent) AlarmDefinition(alma.alarmsystem.alarmmessage.generated.AlarmDefinition) ReductionDefinitions(alma.alarmsystem.alarmmessage.generated.ReductionDefinitions) Child(alma.alarmsystem.alarmmessage.generated.Child) ReductionLinkType(alma.alarmsystem.alarmmessage.generated.ReductionLinkType)

Aggregations

AlarmDefinition (alma.alarmsystem.alarmmessage.generated.AlarmDefinition)6 Alarm (cern.laser.business.data.Alarm)5 AlarmCategoryDefinitions (alma.alarmsystem.alarmmessage.generated.AlarmCategoryDefinitions)4 AlarmCategoryLinkDefinitionListType (alma.alarmsystem.alarmmessage.generated.AlarmCategoryLinkDefinitionListType)4 AlarmCategoryLinkType (alma.alarmsystem.alarmmessage.generated.AlarmCategoryLinkType)4 CategoryDefinition (alma.alarmsystem.alarmmessage.generated.CategoryDefinition)4 LaserObjectNotFoundException (cern.laser.business.LaserObjectNotFoundException)4 Category (cern.laser.business.data.Category)4 CategoryImpl (cern.laser.business.data.CategoryImpl)4 ValidationException (org.exolab.castor.xml.ValidationException)3 CategoryDefinitionListType (alma.alarmsystem.alarmmessage.generated.CategoryDefinitionListType)2 CategoryDefinitions (alma.alarmsystem.alarmmessage.generated.CategoryDefinitions)2 Child (alma.alarmsystem.alarmmessage.generated.Child)2 Parent (alma.alarmsystem.alarmmessage.generated.Parent)2 ReductionDefinitions (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions)2 ReductionLinkType (alma.alarmsystem.alarmmessage.generated.ReductionLinkType)2 IOException (java.io.IOException)2 StringReader (java.io.StringReader)2 StringWriter (java.io.StringWriter)2 Iterator (java.util.Iterator)2