<%/****************************************************************************** * Copyright (c) 2000-2013 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. ******************************************************************************/%><%@ page session="true" %> <%@page import="com.edeal.frontline.synchro.domino.DominoConstants.DominoActorSynchroParams"%> <%@page import="com.edeal.frontline.synchro.domino.DominoConstants"%> <%@page import="com.edeal.frontline.synchro.webdavex.WebDavExConstants.WebDavExActorSynchroOptions"%> <%@page import="com.edeal.frontline.synchro.webdavex.WebDavExConstants"%> <%@page import="com.edeal.frontline.synchro.SyncUser.SynchroParamType"%> <%@page import="com.edeal.frontline.helper.custom.ActorHelper"%> <%@page import="com.edeal.frontline.helper.BasicHelper"%> <%@page import="com.edeal.frontline.synchro.googleapps.GoogleAppsConstants.GoogleAppsActorOptions"%> <%@page import="com.edeal.frontline.synchro.googleapps.GoogleAppsConstants"%> <%@page import="java.lang.reflect.Method"%> <%@page import="org.apache.commons.lang.StringUtils"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.*" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.LocationBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.PersonEventBean" %> <%@ page import="com.edeal.frontline.LicenceManager" %> <%@ page import="com.edeal.frontline.services.cti.CTIServiceClient" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); LicenceManager licenceManager = context.getLicenceManager(); String id = null; try { id = Actor.getID(); } catch (FieldNotInitializedException e) { } String actTzoID=null; try { actTzoID = Actor.getActTzoID(); session.setAttribute("ActTzoID",actTzoID); }catch(FieldNotInitializedException e){} StringBuffer fullName = new StringBuffer(); if (id != null) { String val; try { val = Actor.getActCivID(); fullName.append(dico.getRefDisp(session, "ActCivID", val) + " "); } catch (FieldNotInitializedException e) { } try { val = Actor.getActFstName(); fullName.append(val + " "); } catch (FieldNotInitializedException e) { } try { val = Actor.getActName(); fullName.append(val + " "); } catch (FieldNotInitializedException e) { } try { val = Actor.getActCode(); fullName.append("(" + val + ")"); } catch (FieldNotInitializedException e) { } } ActorHelper actHelper = null; try { actHelper = BasicHelper.factory(Actor); } catch (FrontlineException e) { logger.error("Could not get ActorHelper(?!)", e); } String actSyncType; try { actSyncType = dico.getRefCode("ActSyncType", Actor.getActSyncType()); } catch (Exception e) { actSyncType = null; } HashMap syncOptions = actHelper.getActSyncOptions(); String actZip = null; try { actZip = Actor.getActZip(); } catch(FieldNotInitializedException e) { } String actCity = null; try { actCity = Actor.getActCity(); } catch(FieldNotInitializedException e) { } String sfwId = request.getParameter("SfwID"); String picID = null; try { picID = Actor.getActPicID(); } catch (FieldNotInitializedException e) { } %> " ou="<%= \"/read_actor.fl?id=\" + id %>">
<%=Utils.formatToWeb(fullName.toString(), false)%>
<% try { Actor.getActZip(); Actor.getActCity(); %>
<% } catch(FieldNotInitializedException e) { try { Actor.getActCity(); %>
<% } catch (FieldNotInitializedException ex) {}} %> \" : \"\"%>"/>
<% try { String mail = Actor.getActMail(); %><%=Utils.formatToWeb(mail, false)%><% } catch (FieldNotInitializedException fnie) { %> <% } %>
<% if (context.getAutoDisplayManager().hasEntry("Actor", "Acteur 1")) { %> <% } %> ">
">
<%-- "/>--%> <% if (picID != null) { %> <% } %>
<% Vector permLics; try { permLics = Actor.getActPermLics(); } catch (FieldNotInitializedException e) { permLics = new Vector(); } Vector flotLics; try { flotLics = Actor.getActFloatLics(); } catch (FieldNotInitializedException e) { flotLics = new Vector(); } String perm = Utils.getMessage(session, "L6601", "Permanente"); String floating = Utils.getMessage(session, "L6602", "Flottante"); String notApplied = Utils.getMessage(session, "L6605", "Pas attribuée"); String[] softwareCodes = licenceManager.getLicencedSoftwareCodes(); for (String softCode : softwareCodes) { String softName = licenceManager.getLicencedSoftwareName(softCode); String licMsg; if (permLics.contains(softCode)) { licMsg = "" + perm + ""; } else if (flotLics.contains(softCode)) { licMsg = "" + floating + ""; } else { licMsg = notApplied; } String display = (softName == null ? softCode : softName + " (" + softCode + ")"); %> <% } %>
<%=licMsg%>
">
<%-- Insert a CTI tab if there is a known CTI provider that needs specific actor fields. --%> <% CTIServiceClient cti = null; boolean isVocalcomCTI = false; boolean isCCACTI = false; boolean isGenesysCTI = false; boolean isC3TCTI = false; try { cti = (CTIServiceClient)context.getServiceManager().getServiceClient(session, "CTI"); isVocalcomCTI = ("vocalcom".equalsIgnoreCase(cti.getImplementation().getProviderId())); isGenesysCTI = ("genesys".equalsIgnoreCase(cti.getImplementation().getProviderId())); isC3TCTI = ("C3T".equalsIgnoreCase(cti.getImplementation().getProviderId())); } catch (Exception e) { //logger.warn("Error in CTI service :\nMessage : " + e.getMessage() + "\nCause : " + e.getCause()); } if (cti != null && isVocalcomCTI) { %>
<% } else if (cti != null && isCCACTI) { %>
<% } else if (cti != null && isGenesysCTI) { %>
<% } else if (cti != null && isC3TCTI) { %>
<%}%> " displayGroup="SERVICE">
<% Vector nameCompRef = dico.getRefList(session, "ActCpoID"); Vector valCompRef = dico.getRefList(session, "ActNcoID"); Vector idValObject = null; Vector idCompObject = null; try { idValObject = Actor.getActNcoID(); } catch (FieldNotInitializedException ex) { idValObject = new Vector(); } try { idCompObject = Actor.getActCpoID(); } catch (FieldNotInitializedException ex) { idCompObject = new Vector(); } for (int i = 0; i < nameCompRef.size(); i++) { Vector currComp = (Vector) nameCompRef.elementAt(i); String currCompID = (String) currComp.elementAt(0); String currCompName = (String) currComp.elementAt(1); int index = idCompObject.indexOf(currCompID); int currObjectValue; try { if (index >= 0) { currObjectValue = ((Number)dico.getRefDisp(session, "ActNcoID", (String)idValObject.elementAt(index))).intValue(); } else { currObjectValue = ((Number)dico.getRefDisp(session, "ActNcoID", dico.getRefIdByCode("ActNcoID", "ZERO"))).intValue(); } } catch (Exception e) { logger.warn("Pas de niveau de compétence ajouté pour acteur. On utilise zéro"); currObjectValue = 0; } %> <% } %>
<%= currCompName %> <%= currObjectValue %>
"> <% if (syncOptions != null) { Iterator iter = syncOptions.keySet().iterator(); Enum key = null; String value = ""; String msgCode = ""; String msgCodeDefault = ""; String msg = ""; while (iter.hasNext()) { %> <% boolean hasField = false; while (!hasField && iter.hasNext()) { key = iter.next(); if(!GoogleAppsActorOptions.ActSyncToken.equals(key)){ value = StringUtils.defaultIfEmpty(syncOptions.get(key), ""); try { Method meth = key.getClass().getMethod("getParamType"); SynchroParamType type = (SynchroParamType)meth.invoke(key); // Pasword just aren't displayed if (SynchroParamType.Password == type) { key = null; continue; } hasField = true; } catch (Exception e) { } try { Method meth = key.getClass().getMethod("getMsgCode", null); msgCode = (String)meth.invoke(key, null); } catch (Exception e) { msgCode = "XXXXX"; } try { Method meth = key.getClass().getMethod("getMsgCodeDefault", null); msgCodeDefault = (String)meth.invoke(key, null); } catch (Exception e) { msgCodeDefault = "XXXXX"; } msg = Utils.getMessage(session, msgCode, msgCodeDefault); } } %> <% hasField = false; key = null; while (!hasField && iter.hasNext()) { key = iter.next(); if(!GoogleAppsActorOptions.ActSyncToken.equals(key)){ value = StringUtils.defaultIfEmpty(syncOptions.get(key), ""); try { Method meth = key.getClass().getMethod("getParamType"); SynchroParamType type = (SynchroParamType)meth.invoke(key); // Pasword just aren't displayed if (SynchroParamType.Password == type) { key = null; continue; } hasField = true; } catch (Exception e) { } try { Method meth = key.getClass().getMethod("getMsgCode", null); msgCode = (String)meth.invoke(key, null); } catch (Exception e) { msgCode = "XXXXX"; } try { Method meth = key.getClass().getMethod("getMsgCodeDefault", null); msgCodeDefault = (String)meth.invoke(key, null); } catch (Exception e) { msgCodeDefault = "XXXXX"; } msg = Utils.getMessage(session, msgCode, msgCodeDefault); } } %> <% } %> <% } %>
<%= value %>
<% if (key != null) { %> <% } else { %> <% } %>
<%= value %>
  
" visible="<%= context.getAutoDisplayManager().hasEntry(\"Actor\", \"Acteur 2\") %>"> " visible="<%= context.getAutoDisplayManager().hasEntry(\"Actor\", \"Acteur 3\") %>">