Package de.forsthaus.backend.model

Examples of de.forsthaus.backend.model.SecGroupright


*/
@Repository
public class SecGrouprightDAOImpl extends BasisDAO<SecGroupright> implements SecGrouprightDAO {
  @Override
  public SecGroupright getNewSecGroupright() {
    return new SecGroupright();
  }
View Full Code Here


      return;
    } else if (textbox_AddGroupRightDialog_RightName.getValue().isEmpty()) {
      return;
    }

    SecGroupright groupRight = getSecurityService().getNewSecGroupright();
    groupRight.setSecGroup(getGroup());
    groupRight.setSecRight(getRight());

    /* check if already in table */
    SecGroupright gr = getSecurityService().getGroupRightByGroupAndRight(getGroup(), getRight());

    if (gr == null) {

      // save it to database
      try {
View Full Code Here

          // 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
          SecGroupright groupRight = getSecurityService().getGroupRightByGroupAndRight(group, right);

          if (groupRight != null) {
            // delete from DB
            getSecurityService().delete(groupRight);
          }
View Full Code Here

  }

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

    final SecGroupright groupRight = (SecGroupright) data;

    Listcell lc = null;
    lc = new Listcell(groupRight.getSecGroup().getGrpShortdescription());
    lc.setParent(item);
    lc = new Listcell(groupRight.getSecRight().getRigName());
    lc.setParent(item);

    // lc = new Listcell();
    // Image img = new Image();
    // img.setSrc("/images/icons/page_detail.gif");
View Full Code Here

TOP

Related Classes of de.forsthaus.backend.model.SecGroupright

Copyright © 2018 www.massapicom. 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.