1 97 package com.ivata.groupware.business.addressbook.struts; 98 99 import java.io.Serializable ; 100 import java.util.Vector ; 101 102 import javax.servlet.http.HttpServletRequest ; 103 import javax.servlet.http.HttpSession ; 104 105 import org.apache.struts.action.ActionMapping; 106 107 import com.ivata.groupware.business.addressbook.AddressBook; 108 import com.ivata.groupware.business.addressbook.person.group.GroupDO; 109 import com.ivata.mask.Mask; 110 import com.ivata.mask.validation.ValidationErrors; 111 import com.ivata.mask.web.struts.DialogForm; 112 113 114 122 public class GroupRightForm extends DialogForm implements Serializable { 123 126 private String add = null; 127 130 private Integer addGroup = null; 131 private AddressBook addressBook; 132 135 private boolean canRemove = false; 136 139 private String emptyListMessage = null; 140 144 private GroupDO group = new GroupDO(); 145 149 private Vector groupIds = new Vector (); 150 154 private Vector groupNames = new Vector (); 155 159 private String [] groupRightsAdd; 160 164 private String [] groupRightsAmend; 165 169 private String [] groupRightsRemove; 170 174 private String [] groupRightsView; 175 176 179 private Integer groupRightTab_activeTab = null; 180 184 private String includePage = "/addressBook/groupRightGeneral.jsp"; 185 188 private boolean readOnly = false; 189 private String remove; 190 195 private Vector rowNames; 196 200 private Vector rows; 201 205 private String [] selected; 206 209 private String type = null; 210 215 private Class baseClass; 216 221 private Mask mask; 222 223 232 GroupRightForm(final AddressBook addressBook, 233 final Mask maskParam, 234 final Class baseClassParam) { 235 this.addressBook = addressBook; 236 } 237 238 245 protected void clear() { 246 add = null; 247 addGroup = null; 248 canRemove = false; 249 emptyListMessage = null; 250 group = new GroupDO(); 251 groupIds = new Vector (); 252 groupNames = new Vector (); 253 groupRightTab_activeTab = null; 254 setHelpKey("addressbook.groupRightUser"); 255 includePage = "/addressBook/groupRightGeneral.jsp"; 256 readOnly = false; 257 remove = null; 258 rowNames = null; 259 rows = null; 260 selected = null; 261 type = null; 262 } 263 264 273 public final String getAdd() { 274 return add; 275 } 276 277 283 public final Integer getAddGroup() { 284 return this.addGroup; 285 } 286 287 292 public final boolean getCanRemove() { 293 return this.canRemove; 294 } 295 296 301 public final String getDescription() { 302 return this.group.getDescription(); 303 } 304 305 310 public final String getEmptyListMessage() { 311 return this.emptyListMessage; 312 } 313 314 320 public final GroupDO getGroup() { 321 return this.group; 322 } 323 324 330 public final Vector getGroupIds() { 331 return groupIds; 332 } 333 334 340 public final Vector getGroupNames() { 341 return groupNames; 342 } 343 344 350 public final String [] getGroupRightsAdd() { 351 return this.groupRightsAdd; 352 } 353 354 360 public final String [] getGroupRightsAmend() { 361 return this.groupRightsAmend; 362 } 363 364 370 public final String [] getGroupRightsRemove() { 371 return this.groupRightsRemove; 372 } 373 374 380 public final String [] getGroupRightsView() { 381 return this.groupRightsView; 382 } 383 384 389 public final Integer getGroupRightTab_activeTab() { 390 return groupRightTab_activeTab; 391 } 392 393 399 public final String getIncludePage() { 400 return includePage; 401 } 402 403 408 public String getName() { 409 return this.group.getName(); 410 } 411 412 417 public final boolean getReadOnly() { 418 return this.readOnly; 419 } 420 421 430 public final String getRemove() { 431 return remove; 432 } 433 434 440 public final Vector getRowNames() { 441 return this.rowNames; 442 } 443 444 450 public final Vector getRows() { 451 return this.rows; 452 } 453 454 460 public final String [] getSelected() { 461 return selected; 462 } 463 464 469 public final String getType() { 470 return this.type; 471 } 472 473 481 public void reset(final ActionMapping mapping, 482 final HttpServletRequest request) { 483 super.reset(mapping, request); 484 setGroupRightTab_activeTab(new Integer (0)); 485 selected = new String [0]; 486 487 if (includePage.equals("/addressBook/groupRightDetail.jsp")) { 488 groupRightsView = new String [0]; 489 groupRightsAdd = new String [0]; 490 groupRightsAmend = new String [0]; 491 groupRightsRemove = new String [0]; 492 } 493 } 494 495 504 public final void setAdd(final String add) { 505 this.add = add; 506 } 507 508 513 public final void setAddGroup(final Integer addGroup) { 514 this.addGroup = addGroup; 515 } 516 517 522 public final void setCanRemove(final boolean canRemove) { 523 this.canRemove = canRemove; 524 } 525 526 531 public final void setDescription(final String description) { 532 this.group.setDescription(description); 533 } 534 535 540 public final void setEmptyListMessage(final String emptyListMessage) { 541 this.emptyListMessage = emptyListMessage; 542 } 543 544 550 public final void setGroup(final GroupDO group) { 551 this.group = group; 552 } 553 554 560 public final void setGroupIds(final Vector groupIds) { 561 this.groupIds = groupIds; 562 } 563 564 570 public final void setGroupNames(final Vector groupNames) { 571 this.groupNames = groupNames; 572 } 573 574 580 public final void setGroupRightsAdd(final String groupRightsAdd[]) { 581 this.groupRightsAdd = groupRightsAdd; 582 } 583 584 590 public final void setGroupRightsAmend(final String groupRightsAmend[]) { 591 this.groupRightsAmend = groupRightsAmend; 592 } 593 594 600 public final void setGroupRightsRemove(final String groupRightsRemove[]) { 601 this.groupRightsRemove = groupRightsRemove; 602 } 603 604 610 public final void setGroupRightsView(final String groupRightsView[]) { 611 this.groupRightsView = groupRightsView; 612 } 613 614 619 public final void setGroupRightTab_activeTab(final Integer groupRightTab_activeTab) { 620 this.groupRightTab_activeTab = groupRightTab_activeTab; 621 } 622 623 629 public final void setIncludePage(final String includePage) { 630 this.includePage = includePage; 631 } 632 633 638 public final void setName(final String name) { 639 this.group.setName(name); 640 } 641 642 647 public final void setReadOnly(final boolean readOnly) { 648 this.readOnly = readOnly; 649 } 650 651 660 public final void setRemove(final String remove) { 661 this.remove = remove; 662 } 663 664 670 public final void setRowNames(final Vector rowNames) { 671 this.rowNames = rowNames; 672 } 673 674 680 public final void setRows(final Vector rows) { 681 this.rows = rows; 682 } 683 684 690 public final void setSelected(final String [] selected) { 691 this.selected = selected; 692 } 693 694 699 public final void setType(final String type) { 700 this.type = type; 701 } 702 703 712 public ValidationErrors validate(final HttpServletRequest request, 713 final HttpSession session) { 714 ValidationErrors validationErrors = new ValidationErrors(); 715 716 return validationErrors; 717 } 718 719 726 public final Class getBaseClass() { 727 return baseClass; 728 } 729 730 737 public final Mask getMask() { 738 return mask; 739 } 740 } 741 | Popular Tags |