666 lines
26 KiB
Plaintext
Executable File
666 lines
26 KiB
Plaintext
Executable File
package com.fp.frontend.controller.armas.parametros;
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.math.BigDecimal;
|
|
import java.sql.Timestamp;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.annotation.PostConstruct;
|
|
import javax.faces.bean.ManagedBean;
|
|
import javax.faces.bean.ManagedProperty;
|
|
import javax.faces.bean.ViewScoped;
|
|
import javax.faces.context.FacesContext;
|
|
|
|
import org.primefaces.context.RequestContext;
|
|
import org.primefaces.event.FileUploadEvent;
|
|
import org.primefaces.model.UploadedFile;
|
|
|
|
import com.fp.dto.AbstractDataTransport;
|
|
import com.fp.dto.Request;
|
|
import com.fp.dto.Response;
|
|
import com.fp.dto.save.DtoSave;
|
|
import com.fp.frontend.controller.AbstractController;
|
|
import com.fp.frontend.controller.alfresco.AlfrescoController;
|
|
import com.fp.frontend.controller.armas.solicitud.DecomisoArmaTransaccionController;
|
|
import com.fp.frontend.controller.armas.solicitud.DocumentoHabilitanteController;
|
|
import com.fp.frontend.controller.armas.solicitud.PlanificacionInspeccionController;
|
|
import com.fp.frontend.controller.armas.solicitud.SolicitudArmasController;
|
|
import com.fp.frontend.controller.armas.solicitud.TarmSolicitudTramiteController;
|
|
import com.fp.frontend.controller.armas.solicitud.TarmTramiteController;
|
|
import com.fp.frontend.controller.pcustomer.PersonAddressController;
|
|
import com.fp.frontend.controller.pcustomer.PersonDetailController;
|
|
import com.fp.frontend.controller.pgeneral.gene.CatalogDetailController;
|
|
import com.fp.frontend.controller.pgeneral.gene.CityController;
|
|
import com.fp.frontend.controller.pgeneral.gene.ParametersController;
|
|
import com.fp.frontend.controller.pgeneral.gene.ProvinceController;
|
|
import com.fp.frontend.controller.pgeneral.message.MessageTemplatesController;
|
|
import com.fp.frontend.controller.pgeneral.message.MessageTemplatesDescController;
|
|
import com.fp.frontend.helper.MessageHelper;
|
|
import com.fp.frontend.utility.MsgControlArmas;
|
|
import com.fp.frontend.utility.MsgGeneral;
|
|
import com.fp.frontend.validators.DocFirmaValidator;
|
|
import com.fp.mail.Mail;
|
|
import com.fp.persistence.parmas.ins.TarmPlanificacionInspeccion;
|
|
import com.fp.persistence.parmas.param.TarmCentroControl;
|
|
import com.fp.persistence.parmas.param.TarmTramite;
|
|
import com.fp.persistence.parmas.soli.TarmDecomisoArmaTransaccion;
|
|
import com.fp.persistence.parmas.soli.TarmDocumentoHabilitante;
|
|
import com.fp.persistence.parmas.soli.TarmSolicitud;
|
|
import com.fp.persistence.parmas.soli.TarmSolicitudTramite;
|
|
import com.fp.persistence.pcustomer.gene.TcustPersonAddress;
|
|
import com.fp.persistence.pcustomer.gene.TcustPersonDetail;
|
|
import com.fp.persistence.pgeneral.gene.TgeneCity;
|
|
import com.fp.persistence.pgeneral.gene.TgeneProvince;
|
|
import com.fp.persistence.pgeneral.message.TgeneMessageTemplates;
|
|
import com.fp.persistence.pgeneral.message.TgeneMessageTemplatesDesc;
|
|
import com.fp.persistence.pgeneral.safe.TsafeUserDetail;
|
|
/**
|
|
* Clase controladora para firmar documentos.
|
|
*
|
|
* @author Carlos Guzman.
|
|
* @modificacion David Cruz
|
|
* @modificacion Christian Pazmino
|
|
* @version 2.1
|
|
*/
|
|
@SuppressWarnings("serial")
|
|
@ManagedBean
|
|
@ViewScoped
|
|
public class FirmarDocumentoController extends AbstractController<AbstractDataTransport> {
|
|
|
|
private String xpathflujo;
|
|
private String xpath;
|
|
private String numerotransaccion;
|
|
private String numerosolicitud;
|
|
private String cplanificacion;
|
|
private String creporte;
|
|
private String appletCoordenadallx="";
|
|
private String appletCoordenadally="";
|
|
private String appletCoordenadaurx="";
|
|
private String appletCoordenadaury="";
|
|
private String appletLugar="";
|
|
private String appletFirma="";
|
|
private UploadedFile uploadedFile;
|
|
private TsafeUserDetail userDetail;
|
|
private boolean mensajeGuardar=false;
|
|
private boolean mensajeNoFirma=false;
|
|
private String btnFlujo;
|
|
private TarmSolicitud solicitud;
|
|
TarmPlanificacionInspeccion planificacionInspeccion=null;
|
|
@ManagedProperty(value = "#{alfrescoController}")
|
|
private AlfrescoController alfrescoController;
|
|
@ManagedProperty(value="#{personAddressController}")
|
|
private PersonAddressController personAddress;
|
|
@ManagedProperty(value = "#{decomisoArmaTransaccionController}")
|
|
private DecomisoArmaTransaccionController decomisoArmaTransaccionController;
|
|
|
|
// Variables para envio de mail
|
|
|
|
private String funcionarioStr;
|
|
private String razonsStr;
|
|
private String tramiteStr;
|
|
private String centrocontrolStr;
|
|
private String fechanotificacionStr;
|
|
private String tipoTramiteStr;
|
|
private String tipoAutorizacionStr;
|
|
private String usoactividadStr;
|
|
private String categoriaStr;
|
|
/**
|
|
* Constructor
|
|
* @throws Exception
|
|
*/
|
|
public FirmarDocumentoController() throws Exception {
|
|
super(AbstractDataTransport.class);
|
|
}
|
|
|
|
@PostConstruct
|
|
private void postconstruct() {
|
|
startQuery();
|
|
this.init();
|
|
}
|
|
|
|
public void startQuery() {
|
|
try {
|
|
this.pasteBpmScreenParameters();
|
|
numerotransaccion=super.getMfilters().get("numerotransaccion");
|
|
numerosolicitud=super.getMfilters().get("csolicitud");
|
|
creporte=super.getMfilters().get("creporte");
|
|
cplanificacion=super.getMfilters().get("cplanificacion");
|
|
userDetail=(TsafeUserDetail)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
|
|
|
if(userDetail.getPk().getPersoncode()!=null){
|
|
appletFirma = PersonDetailController.find(userDetail.getPk().getPersoncode().toString()).getName() + " " + (new Timestamp(new Date().getTime())).toString().split("\\.")[0];
|
|
if(creporte!=null && !creporte.equals("null")){
|
|
PersonAddressController personAddressController = new PersonAddressController();
|
|
TcustPersonAddress tcustPersonAddres=personAddressController.findPrincipal(userDetail.getPk().getPersoncode().toString());
|
|
List<TgeneProvince> provinceList = ProvinceController.findPorCodigo("EC", tcustPersonAddres.getProvincecode());
|
|
appletLugar = provinceList.get(0).getDescription();
|
|
}
|
|
}
|
|
else{
|
|
appletFirma = "";
|
|
}
|
|
if(numerosolicitud!=null &&!numerosolicitud.equals("null") && numerosolicitud.trim().length()>0){
|
|
solicitud = SolicitudArmasController.find(numerosolicitud);
|
|
TarmCentroControl centroControl=CentroControlArmasController.findPorCodigo(solicitud.getCcentrocontrol());
|
|
List<TgeneCity> lciudades = CityController.find("EC", centroControl.getProvincecode(), centroControl.getCantoncode());
|
|
appletLugar = lciudades.get(0).getDescription();
|
|
}else if(numerotransaccion!=null && !numerotransaccion.equals("null")){
|
|
TarmDecomisoArmaTransaccion decomisoArmaTransaccion= DecomisoArmaTransaccionController.find(numerotransaccion);
|
|
TarmCentroControl centroControl=CentroControlArmasController.findPorCodigo(decomisoArmaTransaccion.getCcentrocontrol());
|
|
List<TgeneCity> lciudades = CityController.find("EC", centroControl.getProvincecode(), centroControl.getCantoncode());
|
|
appletLugar = lciudades.get(0).getDescription();
|
|
}else if(cplanificacion!=null && !cplanificacion.equals("null")){
|
|
planificacionInspeccion= PlanificacionInspeccionController.findPorCodigo(Long.parseLong(cplanificacion));
|
|
TarmCentroControl centroControl=CentroControlArmasController.findPorCodigo(planificacionInspeccion.getCcentrocontrol());
|
|
List<TgeneCity> lciudades = CityController.find("EC", centroControl.getProvincecode(), centroControl.getCantoncode());
|
|
appletLugar = lciudades.get(0).getDescription();
|
|
}
|
|
|
|
System.out.println("xpath .."+xpathflujo);
|
|
obtenerXpath();
|
|
super.getMfilters().clear();
|
|
} catch (Exception e) {
|
|
MessageHelper.setMessageError(e);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Metodo para opbtener el xpath de alfresco
|
|
*/
|
|
private void obtenerXpath() {
|
|
// TODO Auto-generated method stub
|
|
TarmDocumentoHabilitante documentohabilitante = new TarmDocumentoHabilitante();
|
|
xpathflujo=super.getMfilters().get("xpath");//formato de archivo "cm:Decomiso/cm:A-2014/cm:M-10/cm:ENV-000000319/cm:ENV-000000319.pdf";//
|
|
|
|
if(MsgControlArmas.getProperty("xpathFujoDocumentoHabilitante").equalsIgnoreCase(xpathflujo) || xpathflujo==null || xpathflujo.isEmpty() || xpathflujo.equals("null")){
|
|
if(numerosolicitud!=null && !numerosolicitud.equals("null")){
|
|
documentohabilitante = DocumentoHabilitanteController.findPorSolicitud(numerosolicitud);
|
|
xpathflujo = documentohabilitante.getXpath();
|
|
}
|
|
}
|
|
if(planificacionInspeccion!=null && (xpathflujo==null || xpathflujo.isEmpty() || xpathflujo.equals("null") || xpathflujo.trim().length()==0)){
|
|
xpathflujo=planificacionInspeccion.getXpath();
|
|
}
|
|
xpath=xpathflujo.substring( 0, xpathflujo.lastIndexOf("/cm:"));
|
|
}
|
|
|
|
/**
|
|
* Incializa el controlador, cuando se esta utilizando una pagina que utliza el controlador.
|
|
*/
|
|
private void init() {
|
|
try {
|
|
this.lrecord = new ArrayList<>();
|
|
this.beanalias = "FIRMARDOCUMENTO";
|
|
btnFlujo=null;
|
|
} catch (Exception e) {
|
|
MessageHelper.setMessageError(e);
|
|
}
|
|
}
|
|
|
|
/* (non-Javadoc)
|
|
* @see com.fp.frontend.controller.AbstractController#querydatabase()
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
protected void querydatabase() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Metodo que analiza si el archivo tiene la extension permitida
|
|
* @param nombreArchivo
|
|
* @return
|
|
*/
|
|
public Boolean esExtensionDeArchivoPermitida(String nombreArchivo){
|
|
String[]archivosPermitidosLst = {".pdf"};
|
|
for(String extensionValida:archivosPermitidosLst){
|
|
if(nombreArchivo.contains(extensionValida)){
|
|
return Boolean.TRUE;
|
|
}
|
|
}
|
|
return Boolean.FALSE;
|
|
}
|
|
|
|
/**
|
|
* Metodo para grabar el documento en alfresco
|
|
*/
|
|
public void saveWithDocumentAlfresco() {
|
|
try {
|
|
|
|
if(uploadedFile!=null && esExtensionDeArchivoPermitida(uploadedFile.getFileName())){
|
|
|
|
if(!uploadedFile.getFileName().equals(xpathflujo.substring( xpathflujo.lastIndexOf(":") + 1,xpathflujo.length()))){
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_nombrearchivo_xpath"));
|
|
return;
|
|
}
|
|
alfrescoController.uploadFile(uploadedFile.getInputstream(),xpathflujo.substring( xpathflujo.lastIndexOf(":") + 1,xpathflujo.length()), xpath);
|
|
//completa la tarea
|
|
//completarTarea();
|
|
btnFlujo="ok";
|
|
|
|
}
|
|
else if(uploadedFile==null){
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_sinarchivo"));
|
|
return;
|
|
}
|
|
else{
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_archivo_firma"));
|
|
return;
|
|
}
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_archivo_firma"));
|
|
e.printStackTrace();
|
|
return;
|
|
} catch (Throwable e) {
|
|
// TODO Auto-generated catch block
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_archivo"));
|
|
e.printStackTrace();
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void guardarRegistro() {
|
|
|
|
}
|
|
|
|
// /**
|
|
// * Metodo para finalizar la tarea del flujo
|
|
// */
|
|
// public void completarTarea() {
|
|
//
|
|
// try {
|
|
// BigDecimal numeroCustodios = new BigDecimal("0");
|
|
// if(this.solicitud.getNumerocustodios()!=null){
|
|
// numeroCustodios = new BigDecimal(this.solicitud.getNumerocustodios());
|
|
// }
|
|
// if(numeroCustodios.compareTo(new BigDecimal("0"))==0 && this.getLoginController().getRequest().getTransactionCode()==109){
|
|
// this.envioCorreoDocumentoAdjunto();
|
|
// }
|
|
//
|
|
// } catch (Throwable e) {
|
|
// MessageHelper.setMessageError(e);
|
|
// }
|
|
// }
|
|
|
|
|
|
/**
|
|
* Metodo para finalizar la tarea del flujo
|
|
*/
|
|
public void completarTarea() {
|
|
|
|
try {
|
|
Request request = callerhelper.getRequest();
|
|
HashMap<String, DtoSave> msave = new HashMap<String, DtoSave>();
|
|
// limpiar request para finalizar la tarea.
|
|
super.cleanRequest(request);
|
|
request.modifiedData().put("cplanificacion", cplanificacion);
|
|
request.modifiedData().put("numerotransaccion", numerotransaccion);
|
|
request.modifiedData().put("xpath", xpathflujo);
|
|
request.modifiedData().put("TID", tid);
|
|
request.modifiedData().put("BPMStatus", "A" ); // A,D,R
|
|
request.modifiedData().put("BPMObs","OK" );
|
|
|
|
//Actualiza el campo estadofirma en la tabla TARMDECOMISOARMATRANSACCION
|
|
if(this.getLoginController().getRequest().getTransactionCode()==94){
|
|
TarmDecomisoArmaTransaccion armaTransaccion = DecomisoArmaTransaccionController.find(numerotransaccion);
|
|
this.decomisoArmaTransaccionController.setRecord(armaTransaccion);
|
|
this.decomisoArmaTransaccionController.getRecord().setEstadofirma("Y");
|
|
this.decomisoArmaTransaccionController.update();
|
|
|
|
DtoSave dtosaveDecomisoTran = this.decomisoArmaTransaccionController.getDtoSave(true);
|
|
dtosaveDecomisoTran.setReturnpk(true);
|
|
dtosaveDecomisoTran.setPosition(1);
|
|
msave.put(decomisoArmaTransaccionController.getBeanalias(), dtosaveDecomisoTran);
|
|
}else if(this.getLoginController().getRequest().getTransactionCode()==109){
|
|
Map<String,Object> datosmail = new HashMap<String,Object>();
|
|
TsafeUserDetail tsafeUserDetail=(TsafeUserDetail)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
|
TcustPersonDetail persona = PersonDetailController.find(tsafeUserDetail.getPk().getPersoncode().toString());
|
|
SimpleDateFormat sdf1 = new SimpleDateFormat(MsgGeneral.getProperty("dateformat"));
|
|
TarmSolicitudTramite solicitudTramite =TarmSolicitudTramiteController.findPorCSolicitud(solicitud.getPk());
|
|
// Variables para envio de mail
|
|
funcionarioStr=persona ==null?"":((persona.getMilitarygrade()==null)?"":CatalogDetailController.findxCodigoCodcatalogo(persona.getMilitarygrade(),"MILITARYGRADE").getDescription()) + " " + persona.getName();
|
|
razonsStr=(solicitud==null || solicitud.getModifiedData().get("nombre")==null)?"":solicitud.getModifiedData().get("nombre").toString();
|
|
tramiteStr=solicitudTramite.getNumerotramite();
|
|
//El centro de control se saca de la solicitud donde inicio el tramite
|
|
TarmCentroControl centroControlObj = CentroControlArmasController.findPorCodigo(solicitud.getCcentrocontrol());
|
|
if(centroControlObj!=null && centroControlObj.getNombreinstitucion()!=null && centroControlObj.getNombreinstitucioncodigo()!=null){
|
|
centrocontrolStr= CatalogDetailController.findxCodigoCodcatalogo(centroControlObj.getNombreinstitucion(), centroControlObj.getNombreinstitucioncodigo()).getDescription();;
|
|
}
|
|
fechanotificacionStr=sdf1.format(new Date());
|
|
TarmTramite tramiteObj =TarmTramiteController.find(String.valueOf(solicitud.getCtramite()));
|
|
tipoTramiteStr=(tramiteObj==null || tramiteObj.getModifiedData().get("tipotramite")==null)?"":tramiteObj.getModifiedData().get("tipotramite").toString();
|
|
tipoAutorizacionStr=(tramiteObj==null || tramiteObj.getModifiedData().get("tipoautorizacion")==null)?"":tramiteObj.getModifiedData().get("tipoautorizacion").toString();
|
|
usoactividadStr=(tramiteObj==null || tramiteObj.getModifiedData().get("usoactividad")==null)?"":tramiteObj.getModifiedData().get("usoactividad").toString();
|
|
categoriaStr=(tramiteObj==null || tramiteObj.getModifiedData().get("categoria")==null)?"":tramiteObj.getModifiedData().get("categoria").toString();
|
|
|
|
datosmail.put("funcionario",funcionarioStr);
|
|
datosmail.put("razons",razonsStr);
|
|
datosmail.put("tramite",tramiteStr);
|
|
datosmail.put("centrocontrol",centrocontrolStr);
|
|
datosmail.put("fechanotificacion",fechanotificacionStr);
|
|
datosmail.put("tipoTramite",tipoTramiteStr);
|
|
datosmail.put("tipoAutorizacion",tipoAutorizacionStr);
|
|
datosmail.put("usoactividad",usoactividadStr);
|
|
datosmail.put("categoria",categoriaStr);
|
|
request.modifiedData().put("datosmail", datosmail);
|
|
}
|
|
request.setSaveTables(msave);
|
|
Response resp = callerhelper.executeSave(request);
|
|
|
|
if (resp.getResponseCode().compareTo(Response.RESPONSE_OK) == 0) {
|
|
this.decomisoArmaTransaccionController.postCommit(resp);
|
|
MessageHelper.setMessageInfo(resp);
|
|
BigDecimal numeroCustodios = new BigDecimal("0");
|
|
if(this.solicitud!=null && this.solicitud.getNumerocustodios()!=null){
|
|
numeroCustodios = new BigDecimal(this.solicitud.getNumerocustodios());
|
|
}
|
|
if(numeroCustodios !=null && numeroCustodios.compareTo(new BigDecimal("0"))==0 && this.getLoginController().getRequest().getTransactionCode()==109){
|
|
this.envioCorreoDocumentoAdjunto();
|
|
}
|
|
RequestContext.getCurrentInstance().execute("Maia.refreshusertasks()");
|
|
btnFlujo=null;
|
|
|
|
} else {
|
|
MessageHelper.setMessageError(resp);
|
|
}
|
|
} catch (Throwable e) {
|
|
MessageHelper.setMessageError(e);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Envía el correo de cambio de email
|
|
* @throws Exception
|
|
*/
|
|
private void envioCorreoDocumentoAdjunto() throws Exception{
|
|
Mail m = new Mail();
|
|
m.config(ParametersController.find("MAIL.FROM", "1").getTextvalue(),
|
|
ParametersController.find("MAIL.SMTP.SERVER", "1").getTextvalue(),
|
|
ParametersController.find("MAIL.SMTP.PORT", "1").getNumbervalue().intValue(),
|
|
ParametersController.find("MAIL.SMTP.USER", "1").getTextvalue(),
|
|
ParametersController.find("MAIL.SMTP.PASSWORD", "1").getTextvalue(),
|
|
Boolean.valueOf(ParametersController.find("MAIL.SMTP.AUTH", "1").getTextvalue()),
|
|
Boolean.valueOf(ParametersController.find("MAIL.SMTPS", "1").getTextvalue()));
|
|
TcustPersonAddress mail = personAddress.findPersonaPorDireccionTipoCatalogo(solicitud.getPersoncode().toString(), "3");
|
|
m.setTo(personAddress.getRecord().getAddress());
|
|
MessageTemplatesController message = new MessageTemplatesController();
|
|
message.addFilter("pk", "64");
|
|
message.query();
|
|
if(message.getLrecord() != null && !message.getLrecord().isEmpty()){
|
|
TgeneMessageTemplates asunto = message.getLrecord().get(0);
|
|
MessageTemplatesDescController content = new MessageTemplatesDescController();
|
|
content.addFilter("pk.code", "64");
|
|
content.addFilter("pk.languagecode", "ES");
|
|
content.query();
|
|
if(content.getLrecord() != null && !content.getLrecord().isEmpty()){
|
|
TgeneMessageTemplatesDesc descripcionContenido = content.getLrecord().get(0);
|
|
m.setSubject(asunto.getDescription());
|
|
String sw = descripcionContenido.getTemplate();
|
|
// Reemplazar variables de la plantilla en mail
|
|
sw=sw.replace("$request.funcionario", this.funcionarioStr);
|
|
sw=sw.replace("$request.razons", this.razonsStr) ;
|
|
sw=sw.replace("$request.tramite", this.tramiteStr) ;
|
|
sw=sw.replace("$request.centrocontrol", this.centrocontrolStr) ;
|
|
sw=sw.replace("$request.fechanotificacion", this.fechanotificacionStr) ;
|
|
sw=sw.replace("$request.tipoTramite", this.tipoTramiteStr) ;
|
|
sw=sw.replace("$request.tipoAutorizacion", this.tipoAutorizacionStr) ;
|
|
sw=sw.replace("$request.usoactividad", this.usoactividadStr) ;
|
|
sw=sw.replace("$request.categoria", this.categoriaStr) ;
|
|
m.setCuerpoMail(sw.toString());
|
|
m.setContentMessageType("text/html");
|
|
// Descargar el documento habilitante a adjuntar
|
|
byte[] bytes = alfrescoController.downloadReturnDocument(this.xpathflujo);
|
|
m.addAttachment("documento.pdf", bytes, "application/pdf");
|
|
// m.addAttachment("Documento Habilitante","C:\\Users\\JALVARADO\\Downloads\\DOC-000362250.pdf");
|
|
m.send();
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/* (non-Javadoc)
|
|
* @see com.fp.frontend.controller.AbstractController#save()
|
|
*/
|
|
@Override
|
|
public void save(){}
|
|
|
|
/**
|
|
* Carga el archivo a grabar en la memoria para su posterior persistencia en el Alfresco
|
|
*/
|
|
public void handleUpload(FileUploadEvent event){
|
|
uploadedFile = event.getFile();
|
|
}
|
|
|
|
public AlfrescoController getAlfrescoController() {
|
|
return alfrescoController;
|
|
}
|
|
|
|
public void setAlfrescoController(AlfrescoController alfrescoController) {
|
|
this.alfrescoController = alfrescoController;
|
|
}
|
|
|
|
public String getXpathflujo() {
|
|
return xpathflujo;
|
|
}
|
|
|
|
public void setXpathflujo(String xpathflujo) {
|
|
this.xpathflujo = xpathflujo;
|
|
}
|
|
|
|
|
|
public String getXpath() {
|
|
return xpath;
|
|
}
|
|
|
|
public void setXpath(String xpath) {
|
|
this.xpath = xpath;
|
|
}
|
|
|
|
public UploadedFile getUploadedFile() {
|
|
return uploadedFile;
|
|
}
|
|
|
|
public void setUploadedFile(UploadedFile uploadedFile) {
|
|
this.uploadedFile = uploadedFile;
|
|
}
|
|
|
|
public void upload(FileUploadEvent event) {
|
|
uploadedFile = event.getFile();
|
|
try {
|
|
boolean isValid = DocFirmaValidator.validDocSign(uploadedFile.getInputstream());
|
|
if(isValid){
|
|
mensajeNoFirma = false;
|
|
mensajeGuardar = true;
|
|
|
|
}else{
|
|
uploadedFile = null;
|
|
btnFlujo=null;
|
|
mensajeNoFirma = true;
|
|
mensajeGuardar = false;
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_sinfirmararchivo"));
|
|
}
|
|
} catch (IOException e) {
|
|
MessageHelper.setMessageError(MsgControlArmas.getProperty("msg_error_sinfirmararchivo"));
|
|
}
|
|
|
|
}
|
|
|
|
public String getAppletCoordenadallx() {
|
|
return appletCoordenadallx;
|
|
}
|
|
|
|
public void setAppletCoordenadallx(String appletCoordenadallx) {
|
|
this.appletCoordenadallx = appletCoordenadallx;
|
|
}
|
|
|
|
public String getAppletCoordenadally() {
|
|
return appletCoordenadally;
|
|
}
|
|
|
|
public void setAppletCoordenadally(String appletCoordenadally) {
|
|
this.appletCoordenadally = appletCoordenadally;
|
|
}
|
|
|
|
public String getAppletCoordenadaurx() {
|
|
return appletCoordenadaurx;
|
|
}
|
|
|
|
public void setAppletCoordenadaurx(String appletCoordenadaurx) {
|
|
this.appletCoordenadaurx = appletCoordenadaurx;
|
|
}
|
|
|
|
public String getAppletCoordenadaury() {
|
|
return appletCoordenadaury;
|
|
}
|
|
|
|
public boolean isMensajeGuardar() {
|
|
return mensajeGuardar;
|
|
}
|
|
|
|
public void setMensajeGuardar(boolean mensajeGuardar) {
|
|
this.mensajeGuardar = mensajeGuardar;
|
|
}
|
|
|
|
public void setAppletCoordenadaury(String appletCoordenadaury) {
|
|
this.appletCoordenadaury = appletCoordenadaury;
|
|
}
|
|
|
|
public String getAppletLugar() {
|
|
return appletLugar;
|
|
}
|
|
|
|
public void setAppletLugar(String appletLugar) {
|
|
this.appletLugar = appletLugar;
|
|
}
|
|
|
|
public String getAppletFirma() {
|
|
return appletFirma;
|
|
}
|
|
|
|
public void setAppletFirma(String appletFirma) {
|
|
this.appletFirma = appletFirma;
|
|
}
|
|
|
|
public String getBtnFlujo() {
|
|
return btnFlujo;
|
|
}
|
|
|
|
public void setBtnFlujo(String btnFlujo) {
|
|
this.btnFlujo = btnFlujo;
|
|
}
|
|
|
|
public PersonAddressController getPersonAddress() {
|
|
return personAddress;
|
|
}
|
|
|
|
public void setPersonAddress(PersonAddressController personAddress) {
|
|
this.personAddress = personAddress;
|
|
}
|
|
|
|
public DecomisoArmaTransaccionController getDecomisoArmaTransaccionController() {
|
|
return decomisoArmaTransaccionController;
|
|
}
|
|
|
|
public void setDecomisoArmaTransaccionController(
|
|
DecomisoArmaTransaccionController decomisoArmaTransaccionController) {
|
|
this.decomisoArmaTransaccionController = decomisoArmaTransaccionController;
|
|
}
|
|
|
|
public String getFuncionarioStr() {
|
|
return funcionarioStr;
|
|
}
|
|
|
|
public void setFuncionarioStr(String funcionarioStr) {
|
|
this.funcionarioStr = funcionarioStr;
|
|
}
|
|
|
|
public String getRazonsStr() {
|
|
return razonsStr;
|
|
}
|
|
|
|
public void setRazonsStr(String razonsStr) {
|
|
this.razonsStr = razonsStr;
|
|
}
|
|
|
|
public String getTramiteStr() {
|
|
return tramiteStr;
|
|
}
|
|
|
|
public void setTramiteStr(String tramiteStr) {
|
|
this.tramiteStr = tramiteStr;
|
|
}
|
|
|
|
public String getCentrocontrolStr() {
|
|
return centrocontrolStr;
|
|
}
|
|
|
|
public void setCentrocontrolStr(String centrocontrolStr) {
|
|
this.centrocontrolStr = centrocontrolStr;
|
|
}
|
|
|
|
public String getFechanotificacionStr() {
|
|
return fechanotificacionStr;
|
|
}
|
|
|
|
public void setFechanotificacionStr(String fechanotificacionStr) {
|
|
this.fechanotificacionStr = fechanotificacionStr;
|
|
}
|
|
|
|
public String getTipoTramiteStr() {
|
|
return tipoTramiteStr;
|
|
}
|
|
|
|
public void setTipoTramiteStr(String tipoTramiteStr) {
|
|
this.tipoTramiteStr = tipoTramiteStr;
|
|
}
|
|
|
|
public String getTipoAutorizacionStr() {
|
|
return tipoAutorizacionStr;
|
|
}
|
|
|
|
public void setTipoAutorizacionStr(String tipoAutorizacionStr) {
|
|
this.tipoAutorizacionStr = tipoAutorizacionStr;
|
|
}
|
|
|
|
public String getUsoactividadStr() {
|
|
return usoactividadStr;
|
|
}
|
|
|
|
public void setUsoactividadStr(String usoactividadStr) {
|
|
this.usoactividadStr = usoactividadStr;
|
|
}
|
|
|
|
public String getCategoriaStr() {
|
|
return categoriaStr;
|
|
}
|
|
|
|
public void setCategoriaStr(String categoriaStr) {
|
|
this.categoriaStr = categoriaStr;
|
|
}
|
|
|
|
public boolean isMensajeNoFirma() {
|
|
return mensajeNoFirma;
|
|
}
|
|
|
|
public void setMensajeNoFirma(boolean mensajeNoFirma) {
|
|
this.mensajeNoFirma = mensajeNoFirma;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |