1 package de.matthias_burbach.mosaique.core.model; 2 3 /*** 4 * See http://flux4eclipse.sourceforge.net/userguide/concepts/framework.html 5 * to understand the concept of a logical page in a Struts configuration. 6 * 7 * @author Matthias Burbach 8 */ 9 public class LogicalPage extends AbstractFileItem { 10 /*** 11 * The name of the logical page (without the prefix '/Page.' 12 * and the suffix '.doDisplay' if present). 13 */ 14 private String name; 15 16 /*** 17 * The value of the forward attribute, which might be the name of a Tiles 18 * definition. 19 */ 20 private String forward; 21 22 /*** 23 * @param context The context to use by this instance. 24 */ 25 public LogicalPage(final Context context) { 26 setContext(context); 27 } 28 29 /*** 30 * @return The definition resolved from the forward value or 31 * <code>null</code> if it doesn't refer to a Tile. 32 */ 33 public Definition getDefinition() { 34 Definition definition = getDefinitionResolver().resolve(forward); 35 if (definition == null) { 36 setErroneous(true); 37 setMessage( 38 "Could not resolve the tile for forward='" 39 + forward 40 + "'."); 41 } 42 return definition; 43 } 44 45 /*** 46 * @return The value of the forward attribute, which might be the name of a 47 * Tiles definition. 48 */ 49 public String getForward() { 50 return forward; 51 } 52 53 /*** 54 * @param forward The value of the forward attribute, which might be the 55 * name of a Tiles definition. 56 */ 57 public void setForward(final String forward) { 58 this.forward = forward; 59 } 60 61 /*** 62 * @return The name of the logical page (without the prefix '/Page.' 63 * and the suffix '.doDisplay' if present). 64 */ 65 public String getName() { 66 return name; 67 } 68 69 /*** 70 * @param name The name of the logical page (without the prefix '/Page.' 71 * and the suffix '.doDisplay' if present). 72 */ 73 public void setName(final String name) { 74 this.name = name; 75 } 76 }