1 5 package org.exoplatform.services.communication.sms.provider.prodat; 6 7 import org.exoplatform.services.communication.sms.adapter.Adapter; 8 import org.exoplatform.services.communication.sms.adapter.prodat.ProdatAdapterImpl; 9 import org.exoplatform.services.communication.sms.encoder.Resolver; 10 import org.exoplatform.services.communication.sms.encoder.prodat.ProdatResolverImpl; 11 import org.exoplatform.services.communication.sms.provider.*; 12 13 14 18 public class ProdatProviderImpl implements Provider { 19 20 private Operator _operator; 21 private Adapter _adapter; 22 private Messenger _messenger; 23 private Resolver _resolver; 24 25 public ProdatProviderImpl() { 26 _operator = new ProdatOperatorImpl(); 27 _adapter = new ProdatAdapterImpl(this); 28 _messenger = new ProdatMessengerImpl(this); 29 _resolver = ProdatResolverImpl.getInstance(); 30 } 31 32 public ProdatProviderImpl(String username, String password) { 33 _operator = new ProdatOperatorImpl(); 34 _adapter = new ProdatAdapterImpl(this); 35 _messenger = new ProdatMessengerImpl(this); 36 _resolver = ProdatResolverImpl.getInstance(); 37 _operator.setUsername(username); 38 _operator.setPassword(password); 39 } 40 41 44 public Operator getOperator() { 45 return _operator; 46 } 47 48 51 public void setOperator(Operator operator) { 52 _operator = operator; 53 } 54 55 58 public Adapter getAdapter() { 59 return _adapter; 60 } 61 62 65 public void setAdapter(Adapter adapter) { 66 _adapter = adapter; 67 } 68 69 72 public Messenger getMessenger() { 73 return _messenger; 74 } 75 76 79 public void setMessenger(Messenger messenger) { 80 _messenger = messenger; 81 } 82 83 86 public Resolver getResolver() { 87 return _resolver; 88 } 89 90 91 92 } 93 | Popular Tags |