@Test public void testInstructorUrl() { Instructor instructor = new Instructor(); instructor.setIdentifier("username"); String url = urlService.getInstructorUrl(instructor, request); assertEquals("/context/s/person?id=username", url); }
@Override public String getInstructorUrl(Instructor instructor, PortletRequest request) { try { final String encodedUsername = URLEncoder.encode(instructor.getIdentifier(), "UTF-8"); return portalContext.concat("/s/person?id=").concat(encodedUsername); } catch (UnsupportedEncodingException e) { log.error("Unable to encode location id " + instructor.getIdentifier()); return null; } }
UPortalURLServiceImpl implements IURLService { @Override public String getInstructorUrl(Instructor instructor, PortletRequest request) { try { final String encodedUsername = URLEncoder.encode(instructor.getIdentifier(), "UTF-8"); return portalContext.concat("/s/person?id=").concat(encodedUsername); } catch (UnsupportedEncodingException e) { log.error("Unable to encode location id " + instructor.getIdentifier()); return null; } } }
UPortalURLServiceImpl implements IURLService { @Override public String getInstructorUrl(Instructor instructor, PortletRequest request) { try { final String encodedUsername = URLEncoder.encode(instructor.getIdentifier(), "UTF-8"); return portalContext.concat("/s/person?id=").concat(encodedUsername); } catch (UnsupportedEncodingException e) { log.error("Unable to encode location id " + instructor.getIdentifier()); return null; } }  }
UPortalURLServiceImpl implements IURLService { @Override public String getInstructorUrl(Instructor instructor, PortletRequest request) { try { final String encodedUsername = URLEncoder.encode(instructor.getIdentifier(), "UTF-8"); return portalContext.concat("/s/person?id=").concat(encodedUsername); } catch (UnsupportedEncodingException e) { log.error("Unable to encode location id " + instructor.getIdentifier()); return null; } }  void setPortalContext(String portalContext); @Override String getLocationUrl(Location location, PortletRequest request); @Override String getInstructorUrl(Instructor instructor, PortletRequest request); @Override String getOtherPortletURL(PortletPreferences prefs, String fName, String state, String fixedParamString, Map<String, String> params); @Override String getNativeMapUrl(PortletPreferences prefs, String baseURLDomain, String room, String displayName, String streetAddress, String longtitude, String latitude, String zoom); }
UPortalURLServiceImpl implements IURLService { @Override public String getInstructorUrl(Instructor instructor, PortletRequest request) { try { final String encodedUsername = URLEncoder.encode(instructor.getIdentifier(), "UTF-8"); return portalContext.concat("/s/person?id=").concat(encodedUsername); } catch (UnsupportedEncodingException e) { log.error("Unable to encode location id " + instructor.getIdentifier()); return null; } }  void setPortalContext(String portalContext); @Override String getLocationUrl(Location location, PortletRequest request); @Override String getInstructorUrl(Instructor instructor, PortletRequest request); @Override String getOtherPortletURL(PortletPreferences prefs, String fName, String state, String fixedParamString, Map<String, String> params); @Override String getNativeMapUrl(PortletPreferences prefs, String baseURLDomain, String room, String displayName, String streetAddress, String longtitude, String latitude, String zoom);  }