001package votorola.g.web.wic; // Copyright 2008, 2012, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. 002 003import org.apache.wicket.Page; 004import org.apache.wicket.markup.html.link.*; 005import org.apache.wicket.model.*; 006import org.apache.wicket.request.mapper.parameter.PageParameters; 007import votorola.g.lang.*; 008 009 010/** An extended implementation of a bookmarkable page link. 011 */ 012public @ThreadRestricted("wicket") class BookmarkablePageLinkX extends BookmarkablePageLink<Void> 013{ 014 015 016 /** Constructs a BookmarkablePageLinkX, taking its parameters from a bookmark. 017 * 018 * @see BookmarkablePageLink#BookmarkablePageLink(String,Class,PageParameters) 019 */ 020 public BookmarkablePageLinkX( String _id, final Bookmark bookmark ) 021 { 022 super( _id, bookmark.pageClass(), bookmark.parameters() ); 023 } 024 025 026 027 /** Constructs a BookmarkablePageLinkX. 028 * 029 * @see BookmarkablePageLink#BookmarkablePageLink(String,Class) 030 */ 031 public BookmarkablePageLinkX( String _id, Class<? extends Page> _pageClass ) 032 { 033 super( _id, _pageClass ); 034 } 035 036 037 038 /** Constructs a BookmarkablePageLinkX with parameters. 039 * 040 * @see BookmarkablePageLink#BookmarkablePageLink(String,Class,PageParameters) 041 */ 042 public BookmarkablePageLinkX( String _id, Class<? extends Page> _pageClass, PageParameters _pP ) 043 { 044 super( _id, _pageClass, _pP ); 045 } 046 047 048 049 // ------------------------------------------------------------------------------------ 050 051 052 /** Sets a constant string as the link body. 053 * 054 * @see #setBody(IModel) 055 */ 056 public BookmarkablePageLinkX setBody( final String bodyString ) 057 { 058 return (BookmarkablePageLinkX)setBody( new Model<String>( bodyString )); 059 } 060 061 062 063}