Spring Framework AbstractController - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractController class.

This code example shows how to use the following methods:
 * centralize control for doing any sort of common functionality. 
 * 
 * @author : Y Kamesh Rao 
 */ 
@Controller 
public class BaseController extends AbstractController { 
    @Autowired public HttpServletRequest request; 
 
    @Override 
    protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, 
                                                 HttpServletResponse httpServletResponse) throws Exception { 
        return null; 
    } 
} 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setCacheSeconds, setUseCacheControlHeader, setUseExpiresHeader
{ 
    private DebugSitePathResolver sitePathResolver; 
 
    protected SecurityService securityService; 
 
    public SiteDebugController() 
    { 
        setCacheSeconds( 0 ); 
        setUseCacheControlHeader( false ); 
        setUseExpiresHeader( false ); 
    } 
 
    @Autowired 
    public void setSitePathResolver( DebugSitePathResolver value ) 
    { 
        this.sitePathResolver = value; 
    } 
 
    @Autowired 
    public void setSecurityService( SecurityService value ) 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 */ 
public class ClasspathPublisher extends AbstractURLPublisher { 
    Class clazz;
 
    /** 
     * Creates the new classpath publisher. 
     *  
     * @param clazz the class used to perform classpath lookups with 
     *        {@link Class#getResource(String)} 
     */ 
    public ClasspathPublisher(Class clazz) {
        this.clazz = clazz;
    } 
 
    public ClasspathPublisher() { 
        this.clazz = ClasspathPublisher.class;
    } 
 
    @Override 
    protected URL getUrl(HttpServletRequest request) {
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setCacheSeconds
     * Boolean to determine if we will redirect to any url provided in the 
     * service request parameter. 
     */ 
    private boolean followServiceRedirects; 
     
    public LogoutController() { 
        setCacheSeconds(0); 
    } 
 
    protected ModelAndView handleRequestInternal( 
        final HttpServletRequest request, final HttpServletResponse response) 
        throws Exception { 
        final String ticketGrantingTicketId = this.ticketGrantingTicketCookieGenerator.retrieveCookieValue(request); 
        final String service = request.getParameter("service"); 
 
        if (ticketGrantingTicketId != null) { 
            this.centralAuthenticationService 
                .destroyTicketGrantingTicket(ticketGrantingTicketId); 
 
            this.ticketGrantingTicketCookieGenerator.removeCookie(response); 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
/** 
 * Controller for showing what's currently playing. 
 * 
 * @author Sindre Mehus 
 */ 
public class NowPlayingController extends AbstractController { 
 
    private PlayerService playerService; 
    private StatusService statusService; 
    private MediaFileService mediaFileService; 
 
    @Override 
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { 
 
        Player player = playerService.getPlayer(request, response); 
        List<TransferStatus> statuses = statusService.getStreamStatusesForPlayer(player); 
 
        MediaFile current = statuses.isEmpty() ? null : mediaFileService.getMediaFile(statuses.get(0).getFile()); 
        MediaFile dir = current == null ? null : mediaFileService.getParentOf(current); 
 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
    static Pattern URI = Pattern.compile("/icon/(?:([^/]+)/)?([^/]+)/?"); 
     
    private final Catalog catalog; 
 
    public IconService(Catalog catalog) { 
        this.catalog = catalog; 
    } 
 
    @Override 
    protected ModelAndView handleRequestInternal( 
        HttpServletRequest request, HttpServletResponse response) throws Exception { 
 
        String path = request.getPathInfo(); 
        Matcher m = URI.matcher(path); 
        if (!m.matches()) { 
            response.sendError(400,  
                "Bad request, path must be of form: /icons/[<workspace>/]<style>"); 
            return null; 
        } 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 * </pre> 
 *  
 * </p> 
 *  
 * @author Justin Deoliveira, The Open Planning Project 
 *  
 */ 
public class FilePublisher extends AbstractURLPublisher { 
    /** 
     * Resource loader 
     */ 
    protected GeoServerResourceLoader loader; 
 
    /** 
     * Servlet resource loader 
     */ 
    protected ServletContextResourceLoader scloader; 
 
    /** 
     * Creates the new file publisher. 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
import java.util.Map; 
 
 
@SuppressWarnings( { "PMD.SystemPrintln", "PMD.SingularField" }) 
@Controller 
public class GenericController extends AbstractController { 
 
    @Override 
    @RequestMapping(value={"/accessDenied.ftl","/pageNotFound.ftl","/ping.ftl","/cheetah.css.ftl","/gazelle.css.ftl","/adminHome.ftl","/maincss.css","/screen.css","/maincss.css.ftl","/screen.css.ftl","/admin.ftl","/defineLookupOptions.ftl","/viewChecklists.ftl","/viewEditCheckLists.ftl","/viewAdditionalFields.ftl","/viewReportsTemplates.ftl","/defineAdditionalFields.ftl","/defineNewChecklist.ftl","/redoLoansDisbursal.ftl","/editAdditionalFields.ftl", "/previewChecklist.ftl","confirmProductMix.ftl","confirmSavingsProduct.ftl", "confirmLoanProduct.ftl"}) 
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)  { 
            Map<String, Object> model = new HashMap<String, Object>(); 
            model.put("request", request); 
            Map<String, Object> status = new HashMap<String, Object>(); 
            List<String> errorMessages = new ArrayList<String>(); 
            status.put("errorMessages", errorMessages); 
            ModelAndView modelAndView = new ModelAndView(getPageToDisplay(request), "model", model); 
            modelAndView.addObject("status", status); 
            return modelAndView; 
    } 
 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
import org.springmodules.feedxt.web.controller.support.UserHolder; 
 
/** 
 * @author Sergio Bossa 
 */ 
public class LogOutController extends AbstractController implements ApplicationEventPublisherAware { 
     
    private UserHolder userHolder; 
    private String logOutView; 
     
    private ApplicationEventPublisher applicationEventPublisher; 
     
    public void setUserHolder(UserHolder userHolder) { 
        this.userHolder = userHolder; 
    } 
     
    public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) { 
        this.applicationEventPublisher = applicationEventPublisher; 
    } 
     
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
import java.util.HashMap; 
import java.util.List; 
import java.util.Map; 
 
@Controller 
public class InitializeApplicationController extends AbstractController { 
    private TestingService testingService; 
 
    @RequestMapping("/initializeApplication.ftl") 
    @SuppressWarnings("PMD.AvoidThrowingRawExceptionTypes") // Reason: here we want to surface a generic exception 
    @Override 
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { 
        ModelAndView returnValue = new ModelAndView("pageNotFound"); 
        if (TestMode.MAIN == getTestingService().getTestMode()) { 
            response.setStatus(HttpServletResponse.SC_NOT_FOUND); 
        } else { 
            getTestingService().reinitializeCaches(); 
 
            Map<String, Object> model = new HashMap<String, Object>(); 
            model.put("request", request); 
8
CodeRank
Experience pair programming with AI  Get Codota for Java