javaextensions/wma/sms_cbs/javasrc/com/nokia/mj/impl/sms/SMSTextMessageImpl.java
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:30:29 +0300
branchRCL_3
changeset 19 04becd199f91
child 23 98ccebc37403
permissions -rw-r--r--
Revision: v2.1.22 Kit: 201017

/*
* Copyright (c) 2008 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.mj.impl.sms;

import javax.wireless.messaging.TextMessage;

/**
 * This class implements TextMessage and extends from SMSMessageImpl
 * @see
 */
public final class SMSTextMessageImpl extends SMSMessageImpl implements
        TextMessage
{
    private String iPayload;

    public SMSTextMessageImpl(String aAddress, long aMsgTimestamp)
    {
        super(aAddress, aMsgTimestamp);
    }
    /**
     * Method to get the message payload text
     * @return Returns the message payload data as a String
     *         or null if it is not set
     */
    public String getPayloadTextData()
    {
        return getPayloadText();
    }
    /**
     * Method to get the message payload Data
     * @returns null if it is not supported
     */
    public byte[] getPayloadBinaryData()
    {
        return null;
    }
    /**
     * Method to get the message payload text
     * @return Returns the message payload data as a String
     *         or null if it is not set
     */
    public String getPayloadText()
    {
        return iPayload;
    }
    /**
     * Sets the payload data of this message.The payload may be set to null.
     * @param aData payload Data as a string.
     */
    public void setPayloadText(String aMsgData)
    {
        iPayload = aMsgData;
    }
    /**
     * Method to get the type of this message
     * @return returns message type
     */
    public int getType()
    {
        return MESSAGE_TEXT;
    }
}