|
1 /* |
|
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 package com.nokia.helium.metadata.ant.types.sbs; |
|
18 |
|
19 import java.io.File; |
|
20 |
|
21 import com.nokia.helium.metadata.ant.types.SeverityEnum; |
|
22 |
|
23 /** |
|
24 * Basic interface that an object should implement to get |
|
25 * event from SBS log parsing. |
|
26 * |
|
27 */ |
|
28 public interface SBSLogEvents { |
|
29 |
|
30 /** |
|
31 * Component is found. |
|
32 * @param component |
|
33 */ |
|
34 void declareComponent(String component); |
|
35 |
|
36 /** |
|
37 * Analyzing text in component. |
|
38 * @param text |
|
39 */ |
|
40 SeverityEnum.Severity check(String component, String text, int lineNumber); |
|
41 |
|
42 /** |
|
43 * Analyzing text in general section |
|
44 * @param text |
|
45 */ |
|
46 SeverityEnum.Severity check(String text, int lineNumber); |
|
47 |
|
48 /** |
|
49 * Add a message with a known severity |
|
50 * @param severity |
|
51 * @param text |
|
52 * @param lineNumber |
|
53 */ |
|
54 void add(SeverityEnum.Severity severity, String text, int lineNumber); |
|
55 |
|
56 /** |
|
57 * |
|
58 * @param severity |
|
59 * @param component |
|
60 * @param text |
|
61 * @param lineNumber |
|
62 */ |
|
63 void add(SeverityEnum.Severity severity, String component, String text, int lineNumber); |
|
64 |
|
65 /** |
|
66 * |
|
67 * @param component |
|
68 * @param location |
|
69 * @param lineNumber |
|
70 */ |
|
71 void addWhatEntry(String component, String location, int lineNumber); |
|
72 |
|
73 /** |
|
74 * Get the default component name, this is useful for global error. |
|
75 * @return |
|
76 */ |
|
77 String getDefaultComponentName(); |
|
78 |
|
79 /** |
|
80 * Get epocroot. This is used to compute the component name. |
|
81 * @return epocroot. |
|
82 */ |
|
83 File getEpocroot(); |
|
84 |
|
85 /** |
|
86 * Update the elapsed time for a component. |
|
87 * @param currentComponent |
|
88 * @param doubleValue |
|
89 */ |
|
90 void addElapsedTime(String component, double duration); |
|
91 } |