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.messaging;
|
|
19 |
|
|
20 |
import com.nokia.s60tools.creator.components.AbstractValue;
|
|
21 |
import com.nokia.s60tools.creator.core.CreatorEditorSettings;
|
|
22 |
|
|
23 |
/**
|
|
24 |
* One row of data of mailbox
|
|
25 |
*/
|
|
26 |
public class MailBoxValue extends AbstractValue {
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Creates new Value.
|
|
30 |
* @param value
|
|
31 |
* @param randomType
|
|
32 |
* @param amount
|
|
33 |
*/
|
|
34 |
public MailBoxValue(String value, ModeTypes randomType, int amount) {
|
|
35 |
this();
|
|
36 |
setValue(value);
|
|
37 |
setModeType(randomType);
|
|
38 |
setAmount(amount);
|
|
39 |
}
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Creates new Value.
|
|
43 |
* @param value
|
|
44 |
* @param amount
|
|
45 |
*/
|
|
46 |
public MailBoxValue(String value, int amount) {
|
|
47 |
this();
|
|
48 |
setValue(value);
|
|
49 |
setModeType(ModeTypes.RandomTypeNotRandom);
|
|
50 |
setAmount(amount);
|
|
51 |
}
|
|
52 |
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Creates new Value.
|
|
56 |
*
|
|
57 |
* @param value
|
|
58 |
* @param isRandom if false, random type is set to {@link ModeTypes#RandomTypeNotRandom}
|
|
59 |
* if true random type is set to {@link ModeTypes#RandomTypeDefaultLength}
|
|
60 |
* @param amount
|
|
61 |
*/
|
|
62 |
public MailBoxValue(String value, boolean isRandom, int amount) {
|
|
63 |
this();
|
|
64 |
if(!isRandom){
|
|
65 |
setModeType(ModeTypes.RandomTypeNotRandom);
|
|
66 |
}
|
|
67 |
else{
|
|
68 |
setModeType(ModeTypes.RandomTypeDefaultLength);
|
|
69 |
}
|
|
70 |
setValue(value);
|
|
71 |
setAmount(amount);
|
|
72 |
}
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Creates new Value with no random and no amount.
|
|
76 |
* random value is set to {@link ModeTypes#RandomTypeNotRandom} and
|
|
77 |
* amount is set to 0.
|
|
78 |
* @param value
|
|
79 |
*/
|
|
80 |
public MailBoxValue(String value) {
|
|
81 |
this();
|
|
82 |
setValue(value);
|
|
83 |
setModeType(ModeTypes.RandomTypeNotRandom);
|
|
84 |
setAmount(0);
|
|
85 |
}
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Creates new Value.
|
|
89 |
* Attributes is set by default;
|
|
90 |
* - random value is set to {@link ModeTypes#RandomTypeDefaultLength}
|
|
91 |
* - random is set to true
|
|
92 |
* - value is set to EMPTY_STRING
|
|
93 |
* - amount is set to 0.
|
|
94 |
*/
|
|
95 |
public MailBoxValue() {
|
|
96 |
super(CreatorEditorSettings.TYPE_MAIL_BOX);
|
|
97 |
}
|
|
98 |
|
|
99 |
}
|