Añado los fuentes de java
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Creado el 15-feb-07
|
||||
*/
|
||||
package com.tarisan.chipcard.tpvvs.webservicetrayicon.messages;
|
||||
import com.tarisan.chipcard.tpvvs.webservicetrayicon.*;
|
||||
import es.chipcard.util.*;
|
||||
import org.w3c.dom.*;
|
||||
/**
|
||||
* Simboliza un elemento 'Aut' dentro de un 'AutRes'
|
||||
* @author jjrider
|
||||
*/
|
||||
public class Aut {
|
||||
private Element xmlAutElement=null;
|
||||
private int ActosMedicos[]=null;
|
||||
|
||||
protected Aut(Element xmlAutElement){
|
||||
this.xmlAutElement=xmlAutElement;
|
||||
NodeList nl=xmlAutElement.getElementsByTagName("acto");
|
||||
ActosMedicos=new int[nl.getLength()];
|
||||
for(int i=0;i<nl.getLength();i++){
|
||||
try{
|
||||
ActosMedicos[i]=Integer.parseInt(SerClsXMLUtils.dameValorEl((Element)nl.item(i)));
|
||||
}catch(Exception err){}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean estaAutorizada(){
|
||||
return WSTRConstantes.OP_RESPONSE_AUTORIZADA.equals(getResponse());
|
||||
}
|
||||
|
||||
public boolean estaDenegada(){
|
||||
return WSTRConstantes.OP_RESPONSE_DENEGADA.equals(getResponse());
|
||||
}
|
||||
|
||||
public boolean esError(){
|
||||
return WSTRConstantes.OP_RESPONSE_ERROR.equals(getResponse());
|
||||
}
|
||||
|
||||
public boolean estaAnulada(){
|
||||
return WSTRConstantes.OP_RESPONSE_ANULADA.equals(getResponse());
|
||||
}
|
||||
|
||||
public String getResponse(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"response");
|
||||
}
|
||||
|
||||
public String getDescription(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"desc");
|
||||
}
|
||||
|
||||
public String getDocUnico(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"du");
|
||||
}
|
||||
|
||||
public String getVolante(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"vol");
|
||||
}
|
||||
|
||||
public String getFechaHoraAut(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"fechahoraaut");
|
||||
}
|
||||
|
||||
public String getNumRef(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"numref");
|
||||
}
|
||||
|
||||
public String getTimestamp(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"AutID/timestamp");
|
||||
}
|
||||
|
||||
public int getTerminal(){
|
||||
try{
|
||||
return Integer.parseInt(SerClsXMLUtils.dameValorEl(xmlAutElement,"AutID/term"));
|
||||
}catch(Exception err){
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public String getUrlBoleta(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"urlBoleta");
|
||||
}
|
||||
|
||||
public String getNumFactura(){
|
||||
return SerClsXMLUtils.dameValorEl(xmlAutElement,"numFactura");
|
||||
}
|
||||
|
||||
public AutID getAutID(){
|
||||
return new AutID(SerClsXMLUtils.dameElemento(xmlAutElement,"AutID"));
|
||||
}
|
||||
|
||||
public int getNumActos(){
|
||||
if(ActosMedicos==null)
|
||||
return 0;
|
||||
return ActosMedicos.length;
|
||||
}
|
||||
|
||||
public int getActoMedico(int nOrden){
|
||||
if(getNumActos()<nOrden || nOrden<1){
|
||||
return -1;
|
||||
}
|
||||
return ActosMedicos[nOrden-1];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user