source: dispositivos_moviles/TibisayMovil/src/ve/gob/cenditel/tibisaymovil/SignatureErrorDetail.java

Last change on this file was 8379cd8, checked in by Antonio Araujo Brett <aaraujo@…>, 11 years ago

Agregado encabezado de licencia a archivos fuentes.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2Tibisay Movil
3
4Copyright (C) 2013 Antonio Araujo (aaraujo@cenditel.gob.ve), Jose Ruiz
5(jruiz@cenditel.gob.ve), Fundacion Centro Nacional de Desarrollo e
6Investigacion en Tecnologias Libres - CENDITEL.
7
8La Fundación CENDITEL concede permiso para usar, copiar, distribuir y/o
9modificar este programa, reconociendo el derecho que la humanidad posee al
10libre acceso al conocimiento, bajo los términos de la licencia de software
11GPL versión 2.0 de la Free Software Foundation.
12
13Este programa se distribuye con la esperanza de que sea util, pero SIN
14NINGUNA GARANTIA; tampoco las implicitas garantias de MERCANTILIDAD o
15ADECUACION A UN PROPOSITO PARTICULAR.
16
17Para mayor información sobre los términos de la licencia ver el archivo
18llamado "gpl-2.0.txt" en ingles.
19*/
20
21package ve.gob.cenditel.tibisaymovil;
22
23import java.io.Serializable;
24import java.util.ArrayList;
25
26import android.util.Log;
27
28//clase que abstrae un objeto de tipo detalle de error de firma
29public class SignatureErrorDetail implements Serializable {
30        /**
31         *
32         */
33        private static final long serialVersionUID = 1L;
34        private String mSigner;
35        private String mError;
36        private ArrayList<String> mListError;
37       
38        public SignatureErrorDetail(String signer, String error){
39                mSigner = signer;
40                mError = error;
41                setListError(null);
42        }
43       
44        public SignatureErrorDetail(String signer, ArrayList<String> list){
45                mSigner = signer;
46                mError = null;
47                setListError(list);
48        }
49       
50        public void setName(String signer) {
51                this.mSigner = signer;
52        }
53       
54        public String getSigner() {
55                return mSigner;
56        }       
57       
58        public void setError(String error) {
59                this.mError = error;
60        }
61       
62        public String getError() {
63                return mError;
64        }
65
66        public void setListError(ArrayList<String> mlistError) {
67                this.mListError = mlistError;
68        }
69
70        public ArrayList<String> getListError() {
71                return mListError;
72        }
73       
74       
75        public String getTransalatedStringError() {
76               
77               
78                String stringError = new String();
79               
80                //Log.d("----getTransalatedStringError: size", Integer.toString(mListError.size()));
81               
82                // traducir la cadena y concatenarla en stringError
83                for (int i = 0; i < mListError.size(); i++) {
84                        stringError = stringError.concat(BDOCUtils.translateError(mListError.get(i))+"\n");
85                        //Log.d("getTranslatedStringError: error "+Integer.toString(i)+" ", mListError.get(i));
86                }
87               
88                               
89                //return mListError.get(0);
90                return stringError;
91               
92        }
93       
94} // fin de clase SignatureErrorDetail
Note: See TracBrowser for help on using the repository browser.