org.esupportail.crousannonces.controllers.AboutController.java Source code

Java tutorial

Introduction

Here is the source code for org.esupportail.crousannonces.controllers.AboutController.java

Source

/**
 * Licensed to ESUP-Portail under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 *
 * ESUP-Portail licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.esupportail.crousannonces.controllers;

import javax.portlet.RenderRequest;
import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.bind.annotation.RenderMapping;

@Controller
@RequestMapping("ABOUT")
public class AboutController {

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

    @Value("${activate.lokaviz}")
    private boolean isLokavizActivate;
    @Value("${activate.jobaviz}")
    private boolean isJobavizActivate;

    @RenderMapping
    public String about(RenderRequest req, Model model) {

        model.addAttribute("isLokavizActivate", isLokavizActivate);
        model.addAttribute("isJobavizActivate", isJobavizActivate);
        model.addAttribute("contextPath", req.getContextPath());
        return "about";
    }

}