Examples of SecRight


Examples of de.forsthaus.backend.model.SecRight

   *
   * @throws InterruptedException
   */
  private void doDelete() throws InterruptedException {

    final SecRight aRight = getRight();

    // Show a confirm box
    String msg = Labels.getLabel("message.Question.Are_you_sure_to_delete_this_record") + "\n\n --> " + aRight.getRigName();
    String title = Labels.getLabel("message.Deleting.Record");

    MultiLineMessageBox.doSetTemplate();
    if (MultiLineMessageBox.show(msg, title, MultiLineMessageBox.YES | MultiLineMessageBox.NO, MultiLineMessageBox.QUESTION, true, new EventListener() {
      @Override
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

   *
   * @throws InterruptedException
   */
  public void doSave() throws InterruptedException {

    final SecRight aRight = getRight();

    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // force validation, if on, than execute by component.getValue()
    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    if (!isValidationOn()) {
      doSetValidation();
    }

    // fill the object with the components data
    doWriteComponentsToBean(aRight);

    // get the selected object from the listbox
    Listitem item = this.rigType.getSelectedItem();

    if (item == null) {
      try {
        Messagebox.show("Please select a right type !");
      } catch (final InterruptedException e) {
        throw new RuntimeException(e);
      }
      return;
    }
    ListModelList lml1 = (ListModelList) rigType.getListModel();
    SecTyp typ = (SecTyp) lml1.get(item.getIndex());
    aRight.setRigType(Integer.valueOf(typ.getStpId()));

    // save it to database
    try {
      getSecurityService().saveOrUpdate(aRight);
    } catch (DataAccessException e) {
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

    // get the selected object
    Listitem item = this.listBoxSecRights.getSelectedItem();

    if (item != null) {
      // CAST AND STORE THE SELECTED OBJECT
      SecRight aRight = (SecRight) item.getAttribute("data");

      showDetailView(aRight);
    }
  }
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

    // create a new right object
    /** !!! DO NOT BREAK THE TIERS !!! */
    // We don't create a new DomainObject() in the frontend.
    // We GET it from the backend.
    SecRight aRight = getSecurityService().getNewSecRight();
    aRight.setRigType(1);

    showDetailView(aRight);

  }
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

  }

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecRight right = (SecRight) data;
    Listcell lc;

    lc = new Listcell(right.getRigName());
    lc.setStyle("padding-left: 5px");
    lc.setParent(item);

    final SecTyp typ = getSecurityService().getTypById(right.getRigType().intValue());

    lc = new Listcell(String.valueOf(typ.getStpTypname()));
    lc.setStyle("padding-left: 5px");
    lc.setParent(item);
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

  public void onDoubleClickedRightItem() {

    Listitem item = this.listBoxSingleRightSearch.getSelectedItem();

    if (item != null) {
      SecRight right = (SecRight) item.getAttribute("data");

      /* store the selected right */
      setRight(right);

      textbox_AddGroupRightDialog_RightName.setValue(right.getRigName());
    }

    doCloseBandbox();

  }
 
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

      if (cb != null) {

        if (cb.isChecked() == true) {

          // Get the object by casting
          SecRight right = (SecRight) listitem.getAttribute("data");
          // get the group
          SecGroup group = getSelectedGroup();

          // check if the item is newly checked. If so we cannot found
          // it in the SecGroupRight-table
          SecGroupright groupRight = getSecurityService().getGroupRightByGroupAndRight(group, right);

          // if new, we make a newly Object
          if (groupRight == null) {
            groupRight = getSecurityService().getNewSecGroupright();
            groupRight.setSecGroup(group);
            groupRight.setSecRight(right);
          }

          // save to DB
          try {
            getSecurityService().saveOrUpdate(groupRight);
          } catch (DataAccessException e) {
            ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());
          }

        } else if (cb.isChecked() == false) {

          // Get the object by casting
          SecRight right = (SecRight) listitem.getAttribute("data");
          // get the group
          SecGroup group = getSelectedGroup();

          // check if the item is newly unChecked. If so we must found
          // it in the SecGroupRight-table
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

@Deprecated
public class SecRightDAOImpl extends BasisDAO<SecRight> implements SecRightDAO {

  @Override
  public SecRight getNewSecRight() {
    return new SecRight();
  }
View Full Code Here

Examples of de.forsthaus.backend.model.SecRight

  }

  @Override
  public void render(Listitem item, Object data) throws Exception {

    final SecRight right = (SecRight) data;

    Listcell lc = new Listcell();
    final Checkbox cb = new Checkbox();

    // get the role for which we pull the data
    final SecGroup group = this.parentController.getSelected();

    if (group != null) {
      if (getSecurityService().isRightinGroup(right, group)) {
        cb.setChecked(true);
      } else {
        cb.setChecked(false);
      }
    } else {
      cb.setChecked(false);
    }

    lc.appendChild(cb);
    lc.setParent(item);

    lc = new Listcell(right.getRigName());
    lc.setParent(item);

    final SecTyp typ = getSecurityService().getTypById(right.getRigType().intValue());
    lc = new Listcell(String.valueOf(typ.getStpTypname()));
    lc.setParent(item);

    // lc = new Listcell();
    // Image img = new Image();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.