/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.harvard.iq.dataverse;

import java.util.List;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

/**
 *
 * @author xyang
 */
@Stateless
@Named
public class DataverseUserServiceBean {

    @PersistenceContext(unitName = "VDCNet-ejbPU")
    private EntityManager em;
        
    public DataverseUser save(DataverseUser dataverseUser) {
         return em.merge(dataverseUser);
    }   
}

@@ -660,24 +660,156 @@
 ger em;%0A    
+%0A    public String encryptPassword(String plainText) %7B%0A        return PasswordEncryption.getInstance().encrypt(plainText);%0A    %7D%0A   
     %0A    pub

Encrypt password.