/** * Convert to URL string to move the action. <br> * e.g. ProductListAction with moreUrl(3) to /product/list/3 <br> * And not contain context path. * @param actionType The class type of action that it redirects to. (NotNull) * @param chain The chain of URL to build additional info on URL. (NotNull) * @return The URL string to move to the action. (NotNull) */ public String toActionUrl(Class<?> actionType, UrlChain chain) { assertArgumentNotNull("actionType", actionType); assertArgumentNotNull("chain", chain); final UrlReverseOption option = customizeActionUrlReverse(actionType, chain); // not null, empty allowed final StringBuilder sb = new StringBuilder(); buildActionPath(sb, actionType, option); buildUrlParts(sb, chain); buildGetParam(sb, chain); buildHashOnUrl(sb, chain); return sb.toString(); }
/** * Convert to URL string to move the action. <br> * e.g. ProductListAction with moreUrl(3) to /product/list/3 <br> * And not contain context path. * @param actionType The class type of action that it redirects to. (NotNull) * @param chain The chain of URL to build additional info on URL. (NotNull) * @return The URL string to move to the action. (NotNull) */ public String toActionUrl(Class<?> actionType, UrlChain chain) { assertArgumentNotNull("actionType", actionType); assertArgumentNotNull("chain", chain); final UrlReverseOption option = customizeActionUrlReverse(actionType, chain); // not null, empty allowed final StringBuilder sb = new StringBuilder(); buildActionPath(sb, actionType, option); buildUrlParts(sb, chain); buildGetParam(sb, chain); buildHashOnUrl(sb, chain); return sb.toString(); }