Package org.apache.openmeetings.db.entity.user

Examples of org.apache.openmeetings.db.entity.user.Organisation


    updateView(target);
  }
 
  @Override
  protected void onRefreshSubmit(AjaxRequestTarget target, Form<?> form) {
    Organisation org = getModelObject();
    if (org.getOrganisation_id() != null) {
      org = getBean(OrganisationDao.class).get(org.getOrganisation_id());
    } else {
      org = new Organisation();
    }
    this.setModelObject(org);
    updateView(target);
  }
View Full Code Here


  }
 
  @Override
  protected void onDeleteSubmit(AjaxRequestTarget target, Form<?> form) {
    getBean(OrganisationDao.class).delete(getModelObject(), getUserId());
    this.setModelObject(new Organisation());
    updateView(target);
  }
View Full Code Here

            }
          }
        };
       
    //Adding the Group Form
    form = new GroupForm("form", listContainer, new Organisation()){
      private static final long serialVersionUID = 1L;

      private AjaxButton processAddClass() {
        boolean orgSaved = getModelObject().getOrganisation_id() != null;
        addUsersBtn.add(AttributeModifier.replace("class", orgSaved ? "formNewButton" : "formNewButton disabled"));
        addUsersBtn.setEnabled(orgSaved);
        return addUsersBtn;
      }
     
      @Override
      protected void onModelChanged() {
        super.onModelChanged();
        processAddClass();
      }
     
      @Override
      public void updateView(AjaxRequestTarget target) {
        super.updateView(target);
        target.add(processAddClass());
      }
    };
        add(form.add(addUsersBtn.setOutputMarkupId(true)));
        addUsersDialog = new AddUsersDialog("addUsers",WebSession.getString(180), form);
    add(addUsersDialog.setOutputMarkupId(true));

        //List view
        SearchableDataView<Organisation> dataView = new SearchableDataView<Organisation>("groupList", new SearchableDataProvider<Organisation>(OrganisationDao.class)) {
      private static final long serialVersionUID = 8715559628755439596L;

      @Override
      protected void populateItem(Item<Organisation> item) {
        final Organisation o = item.getModelObject();
        item.add(new Label("organisation_id", "" + o.getOrganisation_id()));
        item.add(new Label("name", "" + o.getName()));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

          protected void onEvent(AjaxRequestTarget target) {
            form.hideNewRecord();
            form.setModelObject(o);
            form.updateView(target);
            target.add(listContainer);
            target.appendJavaScript("groupsInit();");
          }
        });
        item.add(AttributeModifier.append("class", "clickable "
            + (item.getIndex() % 2 == 1 ? "even" : "odd")
            + (o.getOrganisation_id().equals(form.getModelObject().getOrganisation_id()) ? " selected" : "")));
      }
    };

    //Paging
    add(listContainer.add(dataView).setOutputMarkupId(true));
View Full Code Here

    add(trash/*.add(new WindowsTheme())*/); //TODO check theme here
    RepeatingView treesView = new RepeatingView("tree");
    treesView.add(selected = new RecordingTree(treesView.newChildId(), new MyRecordingTreeProvider()));
    treesView.add(new RecordingTree(treesView.newChildId(), new PublicRecordingTreeProvider(null, null)));
    for (Organisation_Users ou : getBean(UserDao.class).get(getUserId()).getOrganisation_users()) {
      Organisation o = ou.getOrganisation();
      treesView.add(new RecordingTree(treesView.newChildId(), new PublicRecordingTreeProvider(o.getOrganisation_id(), o.getName())));
    }
    add(trees.add(treesView).setOutputMarkupId(true));
    updateSizes();
    add(sizes.add(new Label("homeSize", homeSize), new Label("publicSize", publicSize)).setOutputMarkupId(true));
    sizes.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(30)) {
View Full Code Here

   * @param titelname
   * @param user_id
   */
  public Long addOrganisation(String orgname, long user_id) {
    try {
      Organisation org = new Organisation();
      org.setName(orgname);
      org.setInsertedby(new Long(user_id));
      org.setDeleted(false);
      org.setStarttime(new Date());
      org = em.merge(org);

      long id = org.getOrganisation_id();
      return id;
    } catch (Exception ex2) {
      log.error("[addOrganisation]", ex2);
    }
    return null;
View Full Code Here

  public Organisation getOrganisationByIdBackup(long organisation_id) {
    try {
      TypedQuery<Organisation> query = em.createNamedQuery("getAnyOrganisationById", Organisation.class);
      query.setParameter("organisation_id", organisation_id);
      Organisation o = null;
      try {
        o = query.getSingleResult();
      } catch (NoResultException e) {
        // o = null;
      }
View Full Code Here

    if (default_lang_id == null) {
      default_lang_id = 1L;
    }

    // Add default group
    Organisation org = new Organisation();
    org.setName(cfg.group);
    org.setInsertedby(1L);
    org.setDeleted(false);
    org.setStarttime(new Date());
    org = organisationDao.update(org, null);

    // BaseUrl as param is empty as we do not send an EMAIL here
    Long user_id = userManager.registerUserInit(new Long(3), 3, 1,
        1, cfg.username, cfg.password, "lastname", "firstname", cfg.email,
        new java.util.Date(), "street", "no", "fax", "zip", 1,
        "town", default_lang_id, false,
        Arrays.asList(org.getOrganisation_id()), "phone", false, "", false,
        timezoneUtil.getTimeZone(cfg.ical_timeZone),
        false, "", "", false, true, null);

    log.debug("Installation - User Added user-Id " + user_id);
View Full Code Here

    add(trash/*.add(new WindowsTheme())*/); //TODO check theme here
    RepeatingView treesView = new RepeatingView("tree");
    treesView.add(selected = new RecordingTree(treesView.newChildId(), new MyRecordingTreeProvider()));
    treesView.add(new RecordingTree(treesView.newChildId(), new PublicRecordingTreeProvider(null, null)));
    for (Organisation_Users ou : getBean(UserDao.class).get(getUserId()).getOrganisation_users()) {
      Organisation o = ou.getOrganisation();
      treesView.add(new RecordingTree(treesView.newChildId(), new PublicRecordingTreeProvider(o.getOrganisation_id(), o.getName())));
    }
    add(trees.add(treesView).setOutputMarkupId(true));
    updateSizes();
    add(sizes.add(new Label("homeSize", homeSize), new Label("publicSize", publicSize)).setOutputMarkupId(true));
    sizes.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(30)) {
View Full Code Here

    userToadd.add(new OnChangeAjaxBehavior() {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onUpdate(AjaxRequestTarget target) {
        Organisation o = GroupForm.this.getModelObject();
        User u = userToadd.getModelObject();
        boolean found = false;
        if (o.getOrganisation_id() != null) {
          found = null != getBean(OrganisationUserDao.class).getByOrganizationAndUser(o.getOrganisation_id(), u.getUser_id());
        }
        if (!found && u != null) {
          for (Organisation_Users ou : usersPanel.getUsers2add()) {
            if (ou.getUser().getUser_id().equals(u.getUser_id())) {
              found = true;
View Full Code Here

    return getModelObject().getOrganisation_id() != null ? getModelObject().getOrganisation_id() : 0;
  }
 
  @Override
  protected void onNewSubmit(AjaxRequestTarget target, Form<?> f) {
    setModelObject(new Organisation());
    updateView(target);
  }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.user.Organisation

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.