public NextServerSession(Request request) {
    super(request);
    Injector.get().inject(this);

    sectionContexts = new HashMap<String, SectionContext>();
    List<Section> sections = sectionManager.getSections();
    for (Section section : sections) {
      sectionContexts.put(section.getId(), SectionContextFactory.createSectionContext(section));
    }
    //		if (!sections.isEmpty()) {
    //			selectedSectionId = sections.get(0).getId();
    //		}
    String language = storageService.getSettings().getLanguage();
    Locale locale = LanguageManager.getInstance().getLocale(language);
    setLocale(locale);
    LOG.info("--------------------> Set locale to: " + language);
  }
  @Override
  protected void init() {
    log.debug("Starting CWM Application Init");
    super.init();

    Injector.get().inject(this);

    mailHost = configuration.getProperty("cwm.mailHost");
    mailFromAddress = configuration.getProperty("cwm.mailFromAddress");

    getDebugSettings().setOutputMarkupContainerClassName(true);

    initResponseTypes();
    loadContent();
    runDatabaseInitializers();
    configureMountPaths();

    loginSessionCloser = new LoginSessionCloser(this);
    loginSessionCloser.start();

    log.debug("Finished CWM Application Init");
  }
  public NextPivotDataSource(PivotWidget widget, Map<String, Object> urlQueryParameters)
      throws ReportRunnerException {

    Injector.get().inject(this);

    Entity entity = DashboardUtil.getEntity(widget, storageService);

    if (!(entity instanceof Chart) && !(entity instanceof Report)) {
      throw new IllegalArgumentException(
          "Entity for NextPivotDataSource must be a report or a chart!");
    }

    DataSource dataSource = getDataSource(entity);
    Connection connection = null;
    try {
      connection = ConnectionUtil.createConnection(storageService, dataSource);
      init(getQueryResult(connection, widget, urlQueryParameters));
    } catch (Exception e) {
      throw new ReportRunnerException(e);
    } finally {
      ConnectionUtil.closeConnection(connection);
    }
  }
 public PostsWaitingForModerationCounterModel() {
   Injector.get().inject(this);
 }
示例#5
0
 /**
  * Constructor for FileOwnModel.
  *
  * @param id int
  * @param name String
  * @param userId int
  */
 public FileOwnModel(int id, String name, int userId) {
   this.id = id;
   this.name = name;
   this.userId = userId;
   Injector.get().inject(this);
 }
	public GenericSession(Request request) {
		super(request);
		//so the autowiring works
		org.apache.wicket.injection.Injector.get().inject(this);
	}
示例#7
0
 public EcomSession(Request request) {
   super(request);
   Injector.get().inject(this);
 }
 public StudentDataProvider() {
   Injector.get().inject(this);
   filter = new Student();
 }
 public FilterObjectDataProvider(IModel<ArrayList<AnalysisFilter>> filterModel) {
   Injector.get().inject(this);
   this.filters = filterModel.getObject();
 }
示例#10
0
 public UserRolesAuthorizer() {
   super();
   Injector.get().inject(this);
 }
 public MemberProvider() {
   Injector.get().inject(this);
 }