THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Is this design flexible enough to meet most of the requests we've seen so far?
- How to avoid a repeat of "handle" in the pathInfo of the URL (e.g.
http://handle.baseurl.com/handle
) - Requires adding URL column to weblog table
- How much refactoring is required to achieve DRY in the URL resolution code?
Design
Changes to Weblog POJO
Weblog.getAbsoluteURL() uses URLStrategy to return URLs
Code Block |
---|
public String getAbsoluteURL() { URLStrategy urlStrategy = WebloggerFactory.getWeblogger().getUrlStrategy(); return urlStrategy.getWeblogURL(this, null, true); } |
Weblog.getURL() calls Weblog.getAbsoluteURL()
Code Block |
---|
public String getURL() { return getAbsoluteURL(); } |
...