Package com.calexo.openhra.serveur

Examples of com.calexo.openhra.serveur.Javixo4OpenHRA


      // Avixo suite � cr�ation du client
      if (clientValue.getEMail()!=null
          && clientValue.getEMail().contains("@") )
      {
        Javixo4OpenHRA avis = new Javixo4OpenHRA();
        String CFG_ModeleOpenHRANewClient,
            CFG_MSWSignature;
        CFG_ModeleOpenHRANewClient = getConfig("ModeleOpenHRANewClient");
        CFG_MSWSignature = getConfig("MSWSignature");

        avis.setEmail( clientValue.getEMail() );
        avis.setRefExt("CLI" + clientValue.getLogin());
        if (avis.getRefExt().length()>15) {
          avis.setRefExt(avis.getRefExt().substring(0,12));
        }
        String cliId="";
        if ((clientValue.getPrenom()!=null) && (!clientValue.getPrenom().equals("")))
          cliId=clientValue.getPrenom() + " ";
        cliId+=clientValue.getName();

        avis.setMessage(cliId + ";;;" + clientValue.getLogin());
        avis.setModele(CFG_ModeleOpenHRANewClient);
        avis.setSignature(CFG_MSWSignature);

        String ret = avis.send();
        logger.debug("Javixo : " + ret);
      }
    } else {
      cliLoc.setCreated(Boolean.FALSE);
      cliLoc.setUpdated(Boolean.TRUE);
    }
    cliLoc.setClientValue(clientValue);

    // Changement mot de passe
    if (( bCreation || isPassChanged )
        && cliLoc.getMotDePasse()!=null
        && !cliLoc.getMotDePasse().equals("xxx") /* Mot de passe temp */
    )
    {
      // On cherche la commande cmdMail � utiliser pour cr��er le compte MySql
      String cmdChgMysqlPass=getConfig("CmdChgMysqlPass");
      if (cmdChgMysqlPass==null) {
        cmdChgMysqlPass = "echo No cmdAddMysqlUser - Change Mdp Mysql User %%";
      }
      // On cr�e le compte Unix via CmdMail
      CmdMailCreate("OpenHRA",
            "Changement Mot de passe MySql " + cliLoc.getLogin(),
            "cmd",cmdChgMysqlPass.replaceAll("%%1",cliLoc.getLogin())
                .replaceAll("%%2", cliLoc.getMotDePasse()),
            cmdPassword);

      // Unix
      String cmdChgPass=getConfig("CmdChgPass");
      if (cmdChgPass==null) {
        cmdChgPass = "echo No cmdChgPass - Change Mdp User %%";
      }
      // On modifie le compte Unix via CmdMail
      CmdMailCreate("OpenHRA",
            "Changement Mot de passe " + cliLoc.getLogin(),
            "cmd",cmdChgPass.replaceAll("%%1",cliLoc.getLogin())
                .replaceAll("%%2", cliLoc.getMotDePasse()),
            cmdPassword);

      // JAvixo changement mot de passe
      if (cliLoc.getEMail()!=null
          && cliLoc.getEMail().contains("@") )
      {
        //Javixo avis = new Javixo();
        Javixo4OpenHRA avis = new Javixo4OpenHRA();

        String //CFG_EndPoint = getConfig("AvixoEndPoint"),
            cfg_ModeleOpenHRAMdpChanged = getConfig("ModeleCRASMdpChanged"),
            CFG_MSWSignature = getConfig("MSWSignature");

        avis.setEmail( cliLoc.getEMail() );
        avis.setRefExt("CLI" + cliLoc.getLogin());
        if (avis.getRefExt().length()>15)
        {
          avis.setRefExt(avis.getRefExt().substring(0,12));
        }
        // cliId
        String cliId="";
        if ((cliLoc.getPrenom()!=null) && (!cliLoc.getPrenom().equals("")))
          cliId=cliLoc.getPrenom() + " ";
        cliId+=cliLoc.getName();
        avis.setMessage(cliId + ";;;" + cliLoc.getMotDePasse());
        avis.setModele(cfg_ModeleOpenHRAMdpChanged);
        avis.setSignature(CFG_MSWSignature);

        //avis.setEndPoint(CFG_EndPoint);

        String ret = avis.send();
        if (ret!=null)
          logger.debug("ClientGeneratePass - Javixo : " + ret);
        else
        {
          logger.error("ClientGeneratePass - Javixo - ERROR");
View Full Code Here


          cmdPassword);

    // JAvixo
    if (pClient.getEMail()!=null && pSite.getClient()==null) // Nouveau
    {
      Javixo4OpenHRA avis = new Javixo4OpenHRA();
      avis.setEmail( pClient.getEMail() );
      avis.setRefExt( "CLI" + pClient.getLogin());
      //avis.setEndPoint( getConfig("AvixoEndPoint"));
      String sDirIndex;
      if ((pSite.getDirectoryIndex()==null) || ("".equals(pSite.getDirectoryIndex())) )
        sDirIndex = getConfig("HTTP_Default_DirIndex");
      else
        sDirIndex = pSite.getDirectoryIndex();
      String sServAlias;
      if ( (pSite.getServerAliases()==null) || ("".equals(pSite.getServerAliases())) )
        sServAlias = "";
      else
        sServAlias = " et " + pSite.getServerAliases();

      avis.setMessage( pClient.getPrenom() + " " + pClient.getName() + ";;;"
          + pSite.getId() + ";;;"
          + pSite.getUrlPrincipale() + ";;;"
          + sServAlias + ";;;"
          + sDirIndex + ";;;"
          + getConfig("HTTP_Site_Suffix"));
      avis.setModele( getConfig("ModeleOpenHRASite"));
      avis.setSignature( getConfig("MSWSignature") );
      logger.debug( avis.send() );
    }

    ClientLocal exCli = null;
    if (pSite != null) {
      exCli = pSite.getClient();
View Full Code Here

      // Avixo
      if ( bddValue.getClientValue().getEMail()!=null  )
      {
        logger.debug("BaseDonneesCreate - Javixo - " + bddValue.getClientValue().getEMail());
        Javixo4OpenHRA avis = new Javixo4OpenHRA();
        avis.setEmail(bddValue.getClientValue().getEMail());
        avis.setModele(getConfig("ModeleOpenHRANewBdd"));
        avis.setSignature(getConfig("MSWSignature"));
        avis.setMessage( bddValue.getClientValue().getPrenom() + " " + bddValue.getClientValue().getName() + ";;;" + bddValue.getNom());
        //avis.setEndPoint(getConfig("AvixoEndPoint"));
        avis.setRefExt("CLI" + bddValue.getClientValue().getLogin());
        logger.debug( avis.send() );
      }

      logger.debug("BaseDonneesCreate - retourne " + bddValue.getNom());
      return bddValue.getNom();
    }
View Full Code Here

TOP

Related Classes of com.calexo.openhra.serveur.Javixo4OpenHRA

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.