* @param rarPath If we're creating a new RA, the path to identify it
* @param displayName If we're editing an existing RA, its name
* @param adapterAbstractName If we're editing an existing RA, its AbstractName
*/
public ResourceAdapterParams getRARConfiguration(PortletRequest request, String rarPath, String displayName, String adapterAbstractName) {
PortletSession session = request.getPortletSession(true);
if(rarPath != null && !rarPath.equals("")) {
ResourceAdapterParams results = (ResourceAdapterParams) session.getAttribute(CONFIG_SESSION_KEY+"-"+rarPath, PortletSession.APPLICATION_SCOPE);
if(results == null) {
results = loadConfigPropertiesByPath(request, rarPath);
session.setAttribute(CONFIG_SESSION_KEY+"-"+rarPath, results, PortletSession.APPLICATION_SCOPE);
session.setAttribute(CONFIG_SESSION_KEY+"-"+results.displayName, results, PortletSession.APPLICATION_SCOPE);
}
return results;
} else if(displayName != null && !displayName.equals("") && adapterAbstractName != null && !adapterAbstractName.equals("")) {
ResourceAdapterParams results = (ResourceAdapterParams) session.getAttribute(CONFIG_SESSION_KEY+"-"+displayName, PortletSession.APPLICATION_SCOPE);
if(results == null) {
results = loadConfigPropertiesByAbstractName(request, adapterAbstractName);
session.setAttribute(CONFIG_SESSION_KEY+"-"+displayName, results, PortletSession.APPLICATION_SCOPE);
}
return results;
} else {
throw new IllegalArgumentException();
}