Ejemplo n.º 1
0
 @Override
 public ViewCoursePlace getPlace(String token) {
   Map<String, String> params = ParameterNames.parseParamsToken(token);
   return new ViewCoursePlace(
       Long.parseLong(params.get(ParameterNames.COURSE_PARAM)),
       ClientFactory.INSTANCE
           .getPlaceHistoryMapper()
           .getPlace(URL.decodeQueryString(params.get(ParameterNames.RETURN_PARAM))));
 }
Ejemplo n.º 2
0
 @Override
 public String getToken(ViewCoursePlace place) {
   return ParameterNames.COURSE_PARAM
       + "="
       + place.getCourseId()
       + "&"
       + ParameterNames.RETURN_PARAM
       + "="
       + URL.encodeQueryString(
           ClientFactory.INSTANCE.getPlaceHistoryMapper().getToken(place.getBackPlace()));
 }