1 18 package org.jahia.layout; 19 20 24 public class PortletBean 25 { 26 public static final int NO_CONTAINER_ID = -1; 27 28 private int PortletID = 0; 29 private int PortletSourceID = 0; 30 31 private int PortletW = 0; 32 private int PortletH = 0; 33 private int PortletColumn = 0; 34 private int PortletRow = 0; 35 36 private int containerID = NO_CONTAINER_ID ; 41 private boolean modified = false; 44 45 49 public PortletBean( int PortletID, int PortletSourceID, int PortletW, int PortletH, 50 int PortletColumn, int PortletRow, int containerID) 51 { 52 this.PortletID = PortletID; 53 this.PortletSourceID = PortletSourceID; 54 this.PortletW = PortletW; 55 this.PortletH = PortletH; 56 this.PortletColumn = PortletColumn; 57 this.PortletRow = PortletRow; 58 59 this.containerID = containerID; 60 } 61 62 68 public PortletBean( int PortletID, int PortletSourceID, int PortletW, int PortletH, 69 int PortletColumn, int PortletRow) 70 { 71 this(PortletID, PortletSourceID, PortletW, 72 PortletH, PortletColumn, PortletRow, NO_CONTAINER_ID); 73 74 } 76 83 public PortletBean( String PortletID, String PortletSourceID, String PortletW, String PortletH, 84 String PortletColumn, String PortletRow, int containerID) 85 { 86 this( Integer.parseInt(PortletID), 87 Integer.parseInt(PortletSourceID), 88 Integer.parseInt(PortletW), 89 Integer.parseInt(PortletH), 90 Integer.parseInt(PortletColumn), 91 Integer.parseInt(PortletRow), 92 containerID 93 ); 94 95 } 97 104 public PortletBean( String PortletID, String PortletSourceID, String PortletW, String PortletH, 105 String PortletColumn, String PortletRow) 106 { 107 this( Integer.parseInt(PortletID), 108 Integer.parseInt(PortletSourceID), 109 Integer.parseInt(PortletW), 110 Integer.parseInt(PortletH), 111 Integer.parseInt(PortletColumn), 112 Integer.parseInt(PortletRow), 113 NO_CONTAINER_ID 114 ); 115 } 117 123 public PortletBean( int PortletID, int PortletSourceID, 124 int PortletColumn, int PortletRow) 125 { 126 this(PortletID, PortletSourceID, 0, 0, 127 PortletColumn, PortletRow, NO_CONTAINER_ID); 128 129 } 131 137 public PortletBean(int portletSourceID) { 138 139 this(portletSourceID, portletSourceID, 140 0, 0, 141 0, 0, NO_CONTAINER_ID); 142 } 143 144 145 public int getPortletID() { return PortletID; } 146 public int getPortletSourceID() { return PortletSourceID; } 147 public int getPortletW() { return PortletW; } 148 public int getPortletH() { return PortletH; } 149 public int getPortletColumn() { return PortletColumn; } 150 public int getPortletRow() { return PortletRow; } 151 152 public void setPortletW (int w) { this.PortletW = w; modified = true; } 153 public void setPortletH (int h) { this.PortletH = h; modified = true; } 154 public void setPortletColumn (int column) { this.PortletColumn = column; modified = true;} 155 public void setPortletRow (int row) { this.PortletRow = row; modified = true;} 156 157 public int getContainerID() { return containerID; } 158 public boolean isModified() { return modified; } 159 160 } 161 | Popular Tags |