Examples of UserModel


Examples of org.cast.cwm.data.models.UserModel

  public Whiteboard(PageParameters parameters) {
    super(parameters);

    // set teacher flag and target user
    isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    mUser = new UserModel(ISISession.get().getUser());     

    pageTitleEnd = (new StringResourceModel("Whiteboard.pageTitle", this, null, "Whiteboard").getString());
    setPageTitle(pageTitleEnd);
    add(new Label("pageTitle", new PropertyModel<String>(this, "pageTitle")));
    add(ISIApplication.get().getToolbar("tht", this));
View Full Code Here

Examples of org.cast.cwm.data.models.UserModel

   * @param mCurrentPage the "current" page to be highlighted in the list; may be null.
   */
  public PageLinkPanel(String id, IModel<? extends XmlSection> mSection, IModel<? extends XmlSection> mCurrentPage) {
    super(id);

    mUser = new UserModel(ISISession.get().getUser());
    mTargetUser = ISISession.get().getTargetUserModel();
    teacher = mUser.getObject().getRole().equals(Role.TEACHER);

    ISIXmlSection currentPage = mCurrentPage != null ? (ISIXmlSection) mCurrentPage.getObject() : null;
     ISIXmlSection currentSection = ((ISIXmlSection) mSection.getObject()); // May be itself
View Full Code Here

Examples of org.cast.cwm.data.models.UserModel

          if (qstr != null)
            qstr = qstr.trim();
          if (!Strings.isEmpty(qstr)) {
            if (qstr.length() > 250)
              qstr = qstr.substring(0, 250);
            questionService.createQuestion(new UserModel(mTargetUser.getObject()), qstr, getPageName());
            questionList.doQuery();
            target.addComponent(questionContainer);
            target.addComponent(NewQuestionForm.this);
          }
          target.appendJavascript("$('#newQuestionModal').hide();");
View Full Code Here

Examples of org.cast.cwm.data.models.UserModel

    setPageTitle(pageTitleEnd);

    // set teacher flag and target user
    isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    if (isTeacher) {
      mUser = new UserModel(ISISession.get().getStudent());
    } else {
      mUser = new UserModel(ISISession.get().getUser());     
    }

    selectedQuestion = null;
    Long questionId = parameters.getLong("question", -1);
    mSelectedQuestion = questionService.getQuestionModelById(questionId);
View Full Code Here

Examples of org.cast.cwm.data.models.UserModel

  private ISectionService sectionService;

  public PageNavPanel(String id, IModel<XmlSection> mSection) {
    super(id, mSection);

    UserModel mUser = new UserModel(ISISession.get().getUser());
    IModel<User> mTargetUser = ISISession.get().getTargetUserModel();
    boolean teacher = mUser.getObject().getRole().equals(Role.TEACHER);

    ISIXmlSection currentPage = (ISIXmlSection) mSection.getObject(); // FIXME: XmlSectionModel should be genericized to fix this and similar hacks
    ISIXmlSection currentSection = currentPage.getSectionAncestor(); // May be itself
   
    add(new PageLinkPanel("pageLinkPanel", new XmlSectionModel(currentSection), mSection));
View Full Code Here

Examples of org.cast.cwm.data.models.UserModel

    super(parameters);

    // set teacher flag and target user
    isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    if (isTeacher) {
      mUser = new UserModel(ISISession.get().getStudent());
    } else {
      mUser = new UserModel(ISISession.get().getUser());     
    }

    pageTitleEnd = (new StringResourceModel("ResponseCollections.pageTitle", this, null, "Collections").getString());
    setPageTitle(pageTitleEnd);
   
View Full Code Here

Examples of org.cast.cwm.data.models.UserModel

        }
      });
      rv1.add(studentContainer);
     
      // list all of the responses for this student
      ResponseList studentResponseList = new ResponseList("studentResponseList", mPrompt, responseMetadata, location, new UserModel(student));
      studentResponseList.setAllowEdit(false);
      studentResponseList.setAllowNotebook(false);
      studentContainer.add(studentResponseList);     
    }   
View Full Code Here

Examples of org.keycloak.models.UserModel

        // disable master realm by deleting the admin user.
        try {
            RealmManager manager = new RealmManager(session);
            RealmModel master = manager.getKeycloakAdminstrationRealm();
            UserModel admin = session.users().getUserByUsername("admin", master);
            if (admin != null) session.users().removeUser(master, admin);
            session.getTransaction().commit();
        } finally {
            session.close();
        }
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.