// 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");