public static Services.PluginHash.GetHashMail.GetHashMailResponse GetHashMail(Services.PluginHash.GetHashMail.GetHashMailRequest request) { Services.PluginHash.GetHashMail.GetHashMailResponse response = new Services.PluginHash.GetHashMail.GetHashMailResponse(); DocsPaVO.utente.InfoUtente infoUtente = null; //Inizio controllo autenticazione utente infoUtente = Utils.CheckAuthentication(request, "GetHashMail"); if (string.IsNullOrEmpty(request.HashFile)) { throw new PisException("MISSING_PARAMETER"); } try { DpaPluginHash dpaPluginHash = BusinessLogic.Plugin.PluginHashBL.GetHashMail(request.HashFile); response = new Services.PluginHash.GetHashMail.GetHashMailResponse() { DpaPluginHash = dpaPluginHash != null ? new Domain.DpaPluginHash() { DataElaborazione = dpaPluginHash.dataElaborazione, HashFile = dpaPluginHash.hashFile, Utente = BusinessLogic.Utenti.UserManager.getUtenteById(dpaPluginHash.idPeople), IdProfile = dpaPluginHash.idProfile, SystemId = dpaPluginHash.systemId, AccessRight = BusinessLogic.Documenti.DocManager.getAccessRightDocBySystemID(dpaPluginHash.idProfile, infoUtente) } : null }; response.Success = true; } catch (PisException pisEx) { logger.ErrorFormat("PISException: {0}, {1}", pisEx.ErrorCode, pisEx.Description); response.Error = new Services.ResponseError { Code = pisEx.ErrorCode, Description = pisEx.Description }; response.Success = false; } catch (Exception ex) { logger.ErrorFormat("Eccezione Generica: APPLICATION_ERROR, {0}", ex.Message); response.Error = new Services.ResponseError { Code = "APPLICATION_ERROR", Description = ex.Message }; response.Success = false; } return(response); }
public Services.PluginHash.GetHashMail.GetHashMailResponse GetHashMail(Services.PluginHash.GetHashMail.GetHashMailRequest request) { logger.Info("BEGIN"); Services.PluginHash.GetHashMail.GetHashMailResponse response = Manager.PluginHashManager.GetHashMail(request); Utils.CheckFaultException(response); logger.Info("END"); return(response); }