Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.test.formatador; |
| 2 | |||
| 3 | import static br.gov.al.saude.test.util.ConversorDeTipo.converterIntegerParaString; |
||
| 4 | |||
| 5 | import java.util.ArrayList; |
||
| 6 | import java.util.List; |
||
| 7 | |||
| 8 | import br.gov.al.saude.scs.model.dto.TurmaDTO; |
||
| 9 | import br.gov.al.saude.test.util.formatador.impl.AbstractFormatadorDeMensagem; |
||
| 10 | |||
| 11 | public class FormatadorTurmaDTO extends AbstractFormatadorDeMensagem<TurmaDTO> { |
||
| 12 | |||
| 13 | @Override |
||
| 14 | protected String obterPadrao() { |
||
| 15 | StringBuilder mensagem = new StringBuilder(); |
||
| 16 | mensagem.append("Capacitacao: ''{0}'', Identificador da Turma: ''{1}'', "); |
||
| 17 | mensagem.append("Ano de Exercício: ''{2}'', Unidade Solicitante: ''{3}'', "); |
||
| 18 | mensagem.append("Situação da Turma: ''{4}'', Ativo: ''{5}''"); |
||
| 19 | return mensagem.toString(); |
||
| 20 | } |
||
| 21 | |||
| 22 | @Override |
||
| 23 | protected List<Object> gerarParametros(TurmaDTO turma) { |
||
| 24 | List<Object> listaParametros = new ArrayList<Object>(); |
||
| 25 | listaParametros.add(turma.getDescricaoCapacitacao()); |
||
| 26 | listaParametros.add(turma.getSequencialTurma()); |
||
| 27 | listaParametros.add(converterIntegerParaString(turma.getNumeroAnoExercicio())); |
||
| 28 | listaParametros.add(turma.getDescricaoUnidadeExercicio()); |
||
| 29 | listaParametros.add(turma.getDescricaoSituacao()); |
||
| 30 | listaParametros.add(turma.getIndicadorAtivo()?"Sim":"Não"); |
||
| 31 | return listaParametros; |
||
| 32 | } |
||
| 33 | |||
| 34 | } |