|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UrlTranslator
Method Summary | |
---|---|
boolean |
isTranslatable(java.util.Map parameterMap)
Example implemenation for a ProductScreenUrlTranslator : return parameterMap.containsKey("productId") |
Screen |
translateToScreen(java.util.Map parameterMap)
Example implemenation : ProductScreen ret = null;
if (isTranslatable(parameterMap)) {
ret = new ProductScreen();
String productId = ((String[]) parameterMap.get("productId"))[0];
// init the screen with the right product. |
java.lang.String |
translateToUrl(Screen screen)
You can get the service URI using the following snippet : String ret = ClientObjects.getServiceUri(UrlTranslatorService.getInstance(), "");
and add your screen specific parameters to it. |
Method Detail |
---|
boolean isTranslatable(java.util.Map parameterMap)
return parameterMap.containsKey("productId")
parameterMap
-
Screen translateToScreen(java.util.Map parameterMap)
ProductScreen ret = null;
if (isTranslatable(parameterMap)) {
ret = new ProductScreen();
String productId = ((String[]) parameterMap.get("productId"))[0];
// init the screen with the right product.
ret.setProductId(productId);
}
return ret;
parameterMap
-
java.lang.String translateToUrl(Screen screen)
String ret = ClientObjects.getServiceUri(UrlTranslatorService.getInstance(), "");
and add your screen specific parameters to it.
Example for a ProductScreen with product 12548 :
ret = ret + "&productId=12548";
screen
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |