0
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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 |
package com.nokia.s60tools.creator.components.log;
|
|
19 |
|
|
20 |
|
|
21 |
import com.nokia.s60tools.creator.components.AbstractComponent;
|
|
22 |
import com.nokia.s60tools.creator.components.AbstractVariables;
|
|
23 |
import com.nokia.s60tools.creator.core.CreatorEditorSettings;
|
|
24 |
|
|
25 |
|
|
26 |
/**
|
|
27 |
* Class representing log
|
|
28 |
*/
|
|
29 |
public class Log extends AbstractComponent {
|
|
30 |
|
|
31 |
|
|
32 |
public Log(int id) {
|
|
33 |
super(id);
|
|
34 |
}
|
|
35 |
|
|
36 |
|
|
37 |
/* (non-Javadoc)
|
|
38 |
* @see com.nokia.s60tools.creator.components.config.AbstractComponent#getType()
|
|
39 |
*/
|
|
40 |
public String getType() {
|
|
41 |
return CreatorEditorSettings.TYPE_LOG;
|
|
42 |
}
|
|
43 |
|
|
44 |
|
|
45 |
/* (non-Javadoc)
|
|
46 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#isValid()
|
|
47 |
*/
|
|
48 |
public boolean isValid() {
|
|
49 |
return true;
|
|
50 |
}
|
|
51 |
|
|
52 |
/* (non-Javadoc)
|
|
53 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#getIdByValue(java.lang.String)
|
|
54 |
*/
|
|
55 |
public String getIdByValue(String value) {
|
|
56 |
return LogVariables.getInstance().getIdByValue(value);
|
|
57 |
}
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
/* (non-Javadoc)
|
|
63 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#getValueById(java.lang.String)
|
|
64 |
*/
|
|
65 |
public String getValueById(String id) {
|
|
66 |
return LogVariables.getInstance().getValueById(id);
|
|
67 |
}
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
/* (non-Javadoc)
|
|
73 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#getXMLElementName()
|
|
74 |
*/
|
|
75 |
public String getXMLElementName() {
|
|
76 |
return CreatorEditorSettings.TYPE_LOG_XML_ELEMENT;
|
|
77 |
}
|
|
78 |
|
|
79 |
/* (non-Javadoc)
|
|
80 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#getValuesForItemType(java.lang.String)
|
|
81 |
*/
|
|
82 |
public String[] getValuesForItemType(String itemType) {
|
|
83 |
//If there is not this type of item at all
|
|
84 |
String idByValue = getIdByValue(itemType);
|
|
85 |
if(idByValue == null){
|
|
86 |
return null;
|
|
87 |
}
|
|
88 |
return LogVariables.getInstance().getValuesForItemType(idByValue);
|
|
89 |
}
|
|
90 |
|
|
91 |
/* (non-Javadoc)
|
|
92 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#isTypeSupportingIncValueForEachCopy(java.lang.String)
|
|
93 |
*/
|
|
94 |
public boolean isTypeSupportingIncValueForEachCopy(String type) {
|
|
95 |
|
|
96 |
return LogVariables.getInstance().isTypeSupportingIncValueForEachCopy(type);
|
|
97 |
|
|
98 |
}
|
|
99 |
|
|
100 |
/* (non-Javadoc)
|
|
101 |
* @see com.nokia.s60tools.creator.components.AbstractComponent#getVariables()
|
|
102 |
*/
|
|
103 |
public AbstractVariables getVariables(){
|
|
104 |
return LogVariables.getInstance();
|
|
105 |
}
|
|
106 |
}
|