1 /***************************************************************************2 * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *3 * Please look at license.txt in info directory for more license detail. *4 **************************************************************************/5 package org.exoplatform.services.communication.sms.encoder;6 7 import org.exoplatform.services.communication.sms.common.ConvertException;8 import org.exoplatform.services.communication.sms.encoder.Formatter;9 import org.exoplatform.services.communication.sms.encoder.MessageFormat;10 11 /**12 * 13 * @author: Ove Ranheim14 * @email: oranheim@users.sourceforge.net15 */16 public class TextFormatter implements Formatter {17 18 private static Formatter _me;19 20 public TextFormatter() {21 }22 23 public MessageFormat getFormat() {24 return MessageFormat.PLAIN_TEXT;25 }26 27 public Object convert(Object object) throws ConvertException {28 //return SmsUtil.encodeHexEncoded(object);29 return object.toString();30 }31 32 public static Formatter getInstance() {33 if (_me == null) _me = new TextFormatter();34 return _me;35 }36 37 }38 39