diff -r 000000000000 -r 61163b28edca creatorextension/com.nokia.s60tools.creator/src/com/nokia/s60tools/creator/components/impsserver/IMPSServerValue.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/creatorextension/com.nokia.s60tools.creator/src/com/nokia/s60tools/creator/components/impsserver/IMPSServerValue.java Tue Jan 12 13:17:53 2010 -0600 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +package com.nokia.s60tools.creator.components.impsserver; + +import com.nokia.s60tools.creator.components.AbstractValue; +import com.nokia.s60tools.creator.core.CreatorEditorSettings; + +/** + * One row of data of IMPS Server + */ +public class IMPSServerValue extends AbstractValue { + + /** + * Creates new Value. + * @param value + * @param randomType + * @param amount + */ + public IMPSServerValue(String value, ModeTypes randomType, int amount) { + this(); + setValue(value); + setModeType(randomType); + setAmount(amount); + } + + /** + * Creates new Value. + * @param value + * @param amount + */ + public IMPSServerValue(String value, int amount) { + this(); + setValue(value); + setModeType(ModeTypes.RandomTypeNotRandom); + setAmount(amount); + } + + + /** + * Creates new Value. + * + * @param value + * @param isRandom if false, random type is set to {@link ModeTypes#RandomTypeNotRandom} + * if true random type is set to {@link ModeTypes#RandomTypeDefaultLength} + * @param amount + */ + public IMPSServerValue(String value, boolean isRandom, int amount) { + this(); + if(!isRandom){ + setModeType(ModeTypes.RandomTypeNotRandom); + } + else{ + setModeType(ModeTypes.RandomTypeDefaultLength); + } + setValue(value); + setAmount(amount); + } + + /** + * Creates new Value with no random and no amount. + * random value is set to {@link ModeTypes#RandomTypeNotRandom} and + * amount is set to 0. + * @param value + */ + public IMPSServerValue(String value) { + this(); + setValue(value); + setModeType(ModeTypes.RandomTypeNotRandom); + setAmount(0); + } + + /** + * Creates new Value. + * Attributes is set by default; + * - random value is set to {@link ModeTypes#RandomTypeDefaultLength} + * - random is set to true + * - value is set to EMPTY_STRING + * - amount is set to 0. + */ + public IMPSServerValue() { + super(CreatorEditorSettings.TYPE_IMPS_SERVER); + } + +}