Package de.forsthaus.backend.model

Examples of de.forsthaus.backend.model.SecGroup


@Repository
public class SecGroupDAOImpl extends BasisDAO<SecGroup> implements SecGroupDAO {

  @Override
  public SecGroup getNewSecGroup() {
    return new SecGroup();
  }
View Full Code Here


      if (cb != null) {

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

          // Get the group object by casting
          SecGroup aGroup = (SecGroup) listitem.getAttribute("data");
          // get the role
          SecRole aRole = getSelectedRole();

          // check if the item is newly checked. If so we cannot found
          // it in the SecGroupRight-table
          SecRolegroup aRoleGroup = getSecurityService().getRolegroupByRoleAndGroup(aRole, aGroup);

          // if new, we make a newly Object
          if (aRoleGroup == null) {
            aRoleGroup = getSecurityService().getNewSecRolegroup();
            aRoleGroup.setSecGroup(aGroup);
            aRoleGroup.setSecRole(aRole);
          }

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

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

          // Get the group object by casting
          SecGroup aGroup = (SecGroup) listitem.getAttribute("data");
          // get the role
          SecRole aRole = getSelectedRole();

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

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

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

      showDetailView(aGroup);
    }
  }
View Full Code Here

   * Call the SecGroup dialog with a new empty entry. <br>
   */
  public void onClick$button_SecGroupList_NewGroup(Event event) throws Exception {

    // create a new customer object
    SecGroup aGroup = getSecurityService().getNewSecGroup();

    showDetailView(aGroup);

  }
View Full Code Here

  private static final Logger logger = Logger.getLogger(SecGroupListModelItemRenderer.class);

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

    final SecGroup group = (SecGroup) data;

    Listcell lc;

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

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

    item.setAttribute("data", data);
    // ComponentsCtrl.applyForward(img, "onClick=onImageClicked");
View Full Code Here

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

    final SecGroup aGroup = getGroup();

    // Show a confirm box
    String msg = Labels.getLabel("message.Question.Are_you_sure_to_delete_this_record") + "\n\n --> " + aGroup.getGrpShortdescription();
    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

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

    final SecGroup aGroup = getGroup();

    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    // force validation, if on, than execute by component.getValue()
    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    if (!isValidationOn()) {
View Full Code Here

  }

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

    final SecGroup group = (SecGroup) data;

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

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

    //
    if (role != null) {
      if (getSecurityService().isGroupInRole(group, role)) {
        cb.setChecked(true);
      } else {
        cb.setChecked(false);
      }
    } else {
      cb.setChecked(false);
    }

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

    lc = new Listcell(group.getGrpShortdescription());
    lc.setParent(item);

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

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

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

    // Casting
    SecGroup aGroup = (SecGroup) item.getAttribute("data");
    setSelectedGroup(aGroup);

    if (tab_SecGroupRight_AllRights.isSelected()) {
      filterTypeForShowingRights();
    } else if (tab_SecGroupRight_Details.isSelected()) {
View Full Code Here

TOP

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

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.