Package org.dmlite.model.component.member

Examples of org.dmlite.model.component.member.Member


        String loginConcept = app.getModelConfig().getLoginConcept();
        Members members = (Members) app.getDbContext()
            .getPersistentModel().getPersistentEntry(loginConcept)
            .getEntities();
        IDomainModel domainModel = app.getDomainModel();
        Member newMember = (Member) domainModel.getModelMeta()
            .createEntity(members);
        Applicants applicants = (Applicants) app.getDbContext()
            .getPersistentModel().getPersistentEntry("Applicants")
            .getEntities();
        newMember.copyFromApplicant(applicant);

        members.add(newMember);
        applicants.remove(applicant);
      } catch (DmException e) {
        log.error("New member problem in ApplicantConfirmPanel: "
View Full Code Here


   * @return <code>true</code> if the user was authenticated
   */
  public final boolean authenticate(String code, String password) {
    String loginConcept = app.getModelConfig().getLoginConcept();
    Members members = (Members) app.getEntry(loginConcept);
    Member member = (Member) members.retrieveByCode(code);
    boolean isValidMember = false;
    if (member != null) {
      String memberPassword = member.getPassword();
      if (memberPassword != null && memberPassword.equals(password)) {
        isValidMember = true;
        loggedInMember = member;
      }
    }
View Full Code Here

      add(new FeedbackPanel("loginFeedback"));

      ModelContext loginModelContext = new ModelContext();
      loginModelContext.setDomainModel(app.getDomainModel());
      loginModelContext.setEntities(members);
      loginModelContext.setEntity(new Member(members.getDomainModel()));
      ViewContext loginViewContext = new ViewContext();
      loginViewContext.setApp(app);
      loginViewContext.setContextPage(this);
      loginViewContext.setPage(this);
      loginViewContext.setWicketId("loginPanel");
View Full Code Here

        if (!appSession.isMemberLoggedIn()) {
          if (!conceptConfig.isDisplay()) {
            allowed = false;
          }
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")
              && !loggedInMember.getRole().equals("manager")
              && !loggedInMember.getRole().equals("advanced")) {
            if (!conceptConfig.isDisplay()) {
              allowed = false;
            }
          }
        }
View Full Code Here

      ModelConfig modelConfig = conceptConfig.getContextModelConfig();
      if (modelConfig.isLogin()) {
        if (!appSession.isMemberLoggedIn()) {
          allowed = false;
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")) {
            if (!conceptConfig.isAdd() && !conceptConfig.isUpdate()
                && !conceptConfig.isRemove()) {
              allowed = false;
            }
          }
View Full Code Here

      ModelConfig modelConfig = conceptConfig.getContextModelConfig();
      if (modelConfig.isLogin()) {
        if (!appSession.isMemberLoggedIn()) {
          allowed = false;
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")) {
            if (loggedInMember.getRole().equals("manager")) {
              if (action.equals("remove")
                  && !conceptConfig.isRemove()) {
                allowed = false;
              }
            } else if (action.equals("add")
                && !conceptConfig.isAdd()) {
              allowed = false;
            } else if (action.equals("update")
                && !conceptConfig.isUpdate()) {
              allowed = false;
            } else if (action.equals("remove")) {
              if (!conceptConfig.isRemove()) {
                allowed = false;
              } else if (loggedInMember.getRole()
                  .equals("casual")) {
                allowed = false;
              }
            }
          }
View Full Code Here

      ModelConfig modelConfig = conceptConfig.getContextModelConfig();
      if (modelConfig.isLogin()) {
        if (!appSession.isMemberLoggedIn()) {
          allowed = false;
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")) {
            if (loggedInMember.getRole().equals("manager")) {
              if (action.equals("remove")
                  && !conceptConfig.isRemove()) {
                allowed = false;
              }
            } else {
              String loginConcept = modelConfig.getLoginConcept();
              if (conceptConfig.getCode().equals(loginConcept)) {
                Member currentMember = (Member) entity;
                if (currentMember != null
                    && !loggedInMember.getCode().equals(
                        currentMember.getCode())) {
                  allowed = false;
                }
              } else if (action.equals("add")
                  && !conceptConfig.isAdd()) {
                allowed = false;
View Full Code Here

        if (!appSession.isMemberLoggedIn()) {
          if (!propertyConfig.isDisplay()) {
            allowed = false;
          }
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")
              && !loggedInMember.getRole().equals("manager")
              && !loggedInMember.getRole().equals("advanced")) {
            if (!propertyConfig.isDisplay()) {
              allowed = false;
            }
          }
        }
View Full Code Here

          String conceptCode = propertyConfig.getContextConceptConfig().getCode();
          if (!conceptCode.equals("Applicant")) {
            allowed = false;
          }
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")
              && !loggedInMember.getRole().equals("manager")) {
            if (!propertyConfig.isUpdate()) {
              allowed = false;
            }
          }
        }
View Full Code Here

        if (!appSession.isMemberLoggedIn()) {
          if (!neighborConfig.isDisplay()) {
            allowed = false;
          }
        } else {
          Member loggedInMember = appSession.getLoggedInMember();
          if (!loggedInMember.getRole().equals("admin")
              && !loggedInMember.getRole().equals("manager")
              && !loggedInMember.getRole().equals("advanced")) {
            if (!neighborConfig.isDisplay()) {
              allowed = false;
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.dmlite.model.component.member.Member

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.