I am trying to update the credential vault and I need to cast from a WpsStrutsPortletRequestWrapper to a PortletRequest. How can I do this? I have tried serveral things but always come back to being incompatible.


attrib.add(USER_EMAIL);
attrib.add(USER_UID);

pumaHome = (PumaHome) psh.getPortletService(PumaHome.class);
profile = pumaHome.getProfile(request);
map = pumaHome.getProfile(request).getAttributes(profile .getCurrentUser(),attrib);
mailBox = (String) map.get(USER_EMAIL);
uid = (String) map.get(USER_UID);

if (mailBox != null){
pwd = getUserPwdFromLdap(uid);

mailBoxUser = (UserPasswordPassiveCredential) vaultService.getCredential(EMAIL_SLOT_ID_PREF_NAME ,"UserPasswordPassive",new HashMap(),(PortletRequest) request);

if (! mailBoxUser.getPassword().equals(pwd) && pwd != null){
objId = PortletUtils.getInternalRequest((PortletRequest) request).getPortletWindow().getPortletEntity().get Id();

objId = (objId instanceof TransientObjectID) ? null : objId;
user = profile.getCurrentUser();
box = mailBox.substring(0,mailBox.indexOf('@')); mail box id for Mail

slotId = ((PortletRequest) request).getPreferences().getValue(EMAIL_SLOT_ID_P REF_NAME, DEFAULT_EMAIL_SLOT_ID); //retrieve vault slot id

setUserPwd.setSlotName(slotId);
setUserPwd.setPumaUser(user);
setUserPwd.setUserId(uid);
setUserPwd.setPassword(pwd.toCharArray());
setUserPwd.setConcretePortletInstanceKey(objId);
setUserPwd.execute();
}//valid mail account name