trace/traceanalyser/com.nokia.s60tools.traceanalyser/src/com/nokia/s60tools/traceanalyser/export/ITraceAnalyserRuleType.java
changeset 9 14dc2103a631
equal deleted inserted replaced
8:15296fd0af4a 9:14dc2103a631
       
     1 /*
       
     2 * Copyright (c) 2009 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 "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 
       
    18 
       
    19 package com.nokia.s60tools.traceanalyser.export;
       
    20 import java.util.ArrayList;
       
    21 import org.eclipse.swt.widgets.Composite;
       
    22 
       
    23 /**
       
    24  * interface ITraceAnalyserRuleType.
       
    25  * Interface that all Trace Analyser rule type Plug
       
    26  * -Ins must implement
       
    27  *
       
    28  */
       
    29 public interface ITraceAnalyserRuleType {
       
    30 	
       
    31 	/**
       
    32 	 * createUIComponents.
       
    33 	 * Method that places all UI components related 
       
    34 	 * to rule into give composite-parameter.
       
    35 	 * @param composite composite where all UI 
       
    36 	 * components all placed
       
    37 	 * @param listener listener for UI-changes.
       
    38 	 */
       
    39 	public void createUIComponents(
       
    40 			Composite composite, 
       
    41 			ITraceAnalyserRuleTypeListener listener);
       
    42 
       
    43 	/**
       
    44 	 * formatRuleDefinitions.
       
    45 	 * Inserts settings from given rule to UI 
       
    46 	 * components if rule's type is same.
       
    47 	 * @param rule rule which values are formatted 
       
    48 	 * to UI.
       
    49 	 * @return true if parameter rule was from 
       
    50 	 * this type.
       
    51 	 */
       
    52 	public boolean formatRuleDefinitions(
       
    53 			TraceAnalyserRule rule);
       
    54 	
       
    55 	/**
       
    56 	 * getRuleName.
       
    57 	 * @return Name of the rule
       
    58 	 */
       
    59 	public String getRuleType();
       
    60 	
       
    61 	/**
       
    62 	 * setVisible.
       
    63 	 * Excludes & hides rule's ui components.
       
    64 	 * @param value true if rule needs to be hidden.
       
    65 	 */
       
    66 	public void setVisible(boolean value);
       
    67 	
       
    68 	/**
       
    69 	 * getRule.
       
    70 	 * Gets rule from values that are inserted into 
       
    71 	 * user interface.
       
    72 	 * @param name rule name.
       
    73 	 * @param description rule description.
       
    74 	 * @return Trace Analyser Rule
       
    75 	 */
       
    76 	public TraceAnalyserRule getRule(String name, 
       
    77 			String description);
       
    78 	
       
    79 	/**
       
    80 	 * getRules.
       
    81 	 * Loads list of rules from file system.
       
    82 	 * @return Rule list.
       
    83 	 */
       
    84 	public ArrayList<TraceAnalyserRule> getRules();
       
    85 	
       
    86 	/**
       
    87 	 * canFinish.
       
    88 	 * @return implementation of this rule type method 
       
    89 	 * returns null if this page is complete. 
       
    90 	 * If page is not complete, error message is returned. 
       
    91 	 */
       
    92 	public String canFinish();
       
    93 	
       
    94 }