Topic Text   Topic Comments (0)   Topic Properties   Topic Information test@tes...
Topic title: test Wednesday April 21, 2010 15:11:01

Download topic text | View in variable-width font | Tab width set to 8 (change to 4)

Files in topic: (view all files)  
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/AlarmManager.java  6018   {+130,-0}
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/ejb/AlarmSessionBean.java  6018   {+160,-36}
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/resources/AlarmClassification.xml  0   {+27,-0}
Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/resources/AlarmClassification.xsd  0   {+42,-0}
Fault.FaultManager/DVL/dvl-DefaultQueries.xml  6018   {+7,-9}
Fault.Publisher/src/com/dhyan/nms/server/fault/publisher/EmailPublisherImpl.java  6018   {+11,-0}
Perf.DataCollection/src/com/dhyan/nms/server/performance/datacollection/HistoricalProcessImpl.java  6018   {+1,-3}
Perf.DataCollection/src/com/dhyan/nms/server/performance/datacollection/PerformanceTaskCreator.java  6018   {+17,-8}
Perf.DataCollection/src/com/dhyan/nms/server/performance/datacollection/ejb/DataCollectionFacade.java  6018   {+1,-1}
Perf.PerformanceManager/src/com/dhyan/nms/server/performance/ejb/PerformanceFacade.java  6018   {+1,-0}
Web.BaseModule/WebContent/jsp/DNMSIndex.jsp  6018   {+4,-0}
Web.BaseModule/WebContent/jsp/LoadResourceBundle.jsp  6018   {+0,-1}
Web.BaseModule/WebContent/webresource/webcomponents/table/scripts/VerticalTable.js  6018   {+1,-1}
Web.Chart/WebContent/webresource/chart/flex/src/Linechart.mxml  6018   {+8,-5}
Web.ChassisView/WebContent/resources/conf/MultiChassisView.xml  6018   {+3,-3}
Web.ChassisView/WebContent/webresource/chassisview/scripts/ChassisView.js  6018   {+1,-1}
Web.ChassisView/src/com/dhyan/nms/client/webclient/chassisview/struts/resources/MultiChassisView.xsd  6018   {+6,-6}
Web.Fault/WebContent/WEB-INF/properties/AlarmDetailsAction.properties  6018   {+2,-1}
Web.Fault/WebContent/WEB-INF/struts/struts.xml  6018   {+4,-0}
Web.Fault/WebContent/webresource/fault/scripts/DNMSFault.js  6018   {+2,-2}
Web.Fault/WebContent/webresource/fault/scripts/FaultScriptController.js  6018   {+53,-28}
Web.Fault/WebContent/webresource/fault/scripts/FaultTabUtility.js  6018   {+19,-2}
Web.Fault/src/com/dhyan/nms/client/webclient/fault/struts/AlarmDetailsAction.java  6018   {+39,-3}
Web.Performance/WebContent/webresource/dashboard/scripts/DashboardConfigurator.js  6018   {+5,-5}
Web.Security/WebContent/webresource/security/scripts/SecurityUserManager.js  6018   {+1,-1}
Web.Topology/WebContent/WEB-INF/properties/resource.properties  6018   {+1,-1}
Web.Topology/WebContent/WEB-INF/properties/resourcegroup.properties  6018   {+1,-0}
Web.Topology/WebContent/webresource/topology/scripts/ResourceTreeManager.js  6018   {+11,-5}
Web.Topology/WebContent/webresource/topology/scripts/TopologyMapHelper.js  6018   {+8,-1}
dnms/resources/dbspecific/derby/schema/dnms_common.sql  6018   {+1,-1}
dnms/resources/dbspecific/derby/schema/dnms_default_records.sql  6018   {+1,-1}
dnms/resources/dbspecific/mysql/schema/dnms_common.sql  6018   {+1,-1}
dnms/resources/dbspecific/mysql/schema/dnms_default_records.sql  6018   {+1,-1}
dnms/resources/dbspecific/oracle/schema/dnms_common.sql  6018   {+1,-1}
dnms/resources/dbspecific/oracle/schema/dnms_default_records.sql  6018   {+1,-1}

[Add General Comment] to topic.

File Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/AlarmManager.java (Revision 6018) [Add File Comment] [Top] [>>]
 
Line 28 | Parallel Line 28 | Parallel
28 import com.dnms.source.com.dhyan.nms.server.fault.resources.alarmcorreltion.Matchingfields; 28 import com.dnms.source.com.dhyan.nms.server.fault.resources.alarmcorreltion.Matchingfields;
29 import com.dnms.source.com.dhyan.nms.server.fault.resources.alarmpublish.Alarmpublish; 29 import com.dnms.source.com.dhyan.nms.server.fault.resources.alarmpublish.Alarmpublish;
30 import com.dnms.source.com.dhyan.nms.server.fault.resources.alarmpublish.AlarmpublishDocument; 30 import com.dnms.source.com.dhyan.nms.server.fault.resources.alarmpublish.AlarmpublishDocument;
31 import com.dnms.source.com.dhyan.nms.server.fault.resources.classificationdetails.AlarmClassification;
32 import com.dnms.source.com.dhyan.nms.server.fault.resources.classificationdetails.AlarmClassificationDocument;
33 import com.dnms.source.com.dhyan.nms.server.fault.resources.classificationdetails.Alarmspecification;
34 import com.dnms.source.com.dhyan.nms.server.fault.resources.classificationdetails.FieldDetails;
35 import com.dnms.source.com.dhyan.nms.server.fault.resources.classificationdetails.MappingDetails;
31 36
32 public final class AlarmManager 37 public final class AlarmManager
33 { 38 {
 
 
Line 41 | Parallel Line 46 | Parallel
41 private String remedyHandling; 46 private String remedyHandling;
42 private ArrayList<String> publishFieldList = null; 47 private ArrayList<String> publishFieldList = null;
43 private boolean publishClearedAlarms = false; 48 private boolean publishClearedAlarms = false;
49 private Alarmspecification[] alarmSpecList = null;
44 50
45 /** 51 /**
46 * No-args constructor. All the member variables are initialized. 52 * No-args constructor. All the member variables are initialized.
 
 
Line 54 | Parallel Line 60 | Parallel
54 loadAlarmCorrelator(); 60 loadAlarmCorrelator();
55 parseAlarmCorrelation(); 61 parseAlarmCorrelation();
56 loadPublishersFields(); 62 loadPublishersFields();
63 parseAlarmClassification();
57 } 64 }
58 65
59 /** 66 /**
 
 
Line 95 | Parallel Line 102 | Parallel
95 } 102 }
96 } 103 }
97 104
105 private void parseAlarmClassification()
106 {
107 try
108 {
109 AlarmClassificationDocument document =
110 AlarmClassificationDocument.Factory.parse(AlarmManager.class.getResource("resources/AlarmClassification.xml"));
111 if (document != null)
112 {
113 AlarmClassification alarm_classification = document.getAlarmClassification();
114 alarmSpecList = alarm_classification.getAlarmspecificationArray();
115 }
116 }
117 catch (Exception e)
118 {
119 LOG.error("Exception occured while reading alarmcorrelationfieldmapping.xml file" + e.getMessage());
120 }
121 }
122
123 /**
124 * Method to retrieve trap details based on given alarm information.
125 * @param alarmDetails alarmDetails
126 * @return Trap
127 * @throws Exception Exception
128 */
129 public boolean isDeviceAlarm(final Alarm alarmDetails) throws Exception
130 {
131 try
132 {
133 if (alarmSpecList != null && alarmSpecList.length > 0)
134 {
135 for (Alarmspecification alarm_value : alarmSpecList)
136 {
137 if (alarm_value.getType().trim().equalsIgnoreCase("DEVICE"))
138 {
139 return isMatchingAlarmDetails(alarm_value.getMappingDetailsArray(), alarmDetails);
140 }
141 }
142 }
143 else
144 {
145 throw new Exception("Problem in getting alarm specification details. Classification details not found");
146 }
147 }
148 catch (Exception e)
149 {
150 LOG.error("Exception occured while getting TrapDetails " + e.getMessage());
151 }
152 return false;
153 }
154
155 /**
156 * Method to retrieve trap details based on given alarm information.
157 * @param alarmDetails alarmDetails
158 * @return Trap
159 * @throws Exception Exception
160 */
161 public String getAlarmSpecificationType(final Alarm alarmDetails) throws Exception
162 {
163 try
164 {
165 if (alarmSpecList != null && alarmSpecList.length > 0)
166 {
167 boolean isMatch = false;
168 for (Alarmspecification alarm_value : alarmSpecList)
169 {
170 isMatch = isMatchingAlarmDetails(alarm_value.getMappingDetailsArray(), alarmDetails);
171 if (isMatch)
172 {
173 return alarm_value.getDisplayName();
174 }
175 }
176 }
177 else
178 {
179 throw new Exception("Problem in getting alarm specification details. Classification details not found");
180 }
181 }
182 catch (Exception e)
183 {
184 LOG.error("Exception occured while getting TrapDetails " + e.getMessage());
185 }
186 return null;
187 }
188
189 private boolean isMatchingAlarmDetails(final MappingDetails[] mappingFields, final Alarm alarmDetails)
190 {
191 if (mappingFields != null && mappingFields.length > 0)
192 {
193 MappingDetails mapping_field = mappingFields[0];
194 boolean isFieldMapped = true;
195 String expectedValue = null;
196 String actualObject = null;
197 for (FieldDetails field_list : mapping_field.getFieldDetailsArray())
198 {
199 expectedValue = field_list.getValue();
200 actualObject = alarmDetails.get(field_list.getName());
201 if (expectedValue == null || actualObject == null)
202 {
203 isFieldMapped = false;
204 break;
205 }
206 if (field_list.getOperation().toString().equalsIgnoreCase("EQUALS"))
207 {
208 if (!expectedValue.trim().equalsIgnoreCase(actualObject.toString()))
209 {
210 isFieldMapped = false;
211 break;
212 }
213 }
214 else
215 {
216 if (expectedValue.trim().equalsIgnoreCase(actualObject.toString()))
217 {
218 isFieldMapped = false;
219 break;
220 }
221 }
222 }
223 return isFieldMapped;
224 }
225 return false;
226 }
227
98 private AbstractAlarmCorrelator getAlarmCorrelatorIfc(final String correlatorClassName) 228 private AbstractAlarmCorrelator getAlarmCorrelatorIfc(final String correlatorClassName)
99 { 229 {
100 AbstractAlarmCorrelator correlatorIfc = null; 230 AbstractAlarmCorrelator correlatorIfc = null;
 
File Fault.AlarmManager/src/com/dhyan/nms/server/fault/alarmmanager/AlarmManager.java (Revision 6018) [Add File Comment] [Top] [>>]
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.