Spring Framework ApplicationObjectSupport - 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 ApplicationObjectSupport class.

This code example shows how to use the following methods:
 * Provides getApplicationContext, getServletContext, and getTempDir methods. 
 * 
 * @author Juergen Hoeller 
 * @since 2.0 
 */ 
public abstract class PortletApplicationObjectSupport extends ApplicationObjectSupport
		implements PortletContextAware { 
 
	private PortletContext portletContext;
 
 
	@Override 
	public void setPortletContext(PortletContext portletContext) {
		this.portletContext = portletContext;
	} 
 
 
	/** 
	 * Overrides the base class behavior to enforce running in an ApplicationContext. 
	 * All accessors will throw IllegalStateException if not running in a context. 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:initApplicationContext
	 * Calls {@link #initServletContext(javax.servlet.ServletContext)} if the 
	 * given ApplicationContext is a {@link WebApplicationContext}. 
	 */ 
	@Override 
	protected void initApplicationContext(ApplicationContext context) { 
		super.initApplicationContext(context); 
		if (this.servletContext == null && context instanceof WebApplicationContext) { 
			this.servletContext = ((WebApplicationContext) context).getServletContext(); 
			if (this.servletContext != null) { 
				initServletContext(this.servletContext); 
			} 
		} 
	} 
 
	/** 
	 * Subclasses may override this for custom initialization based 
	 * on the ServletContext that this application object runs in. 
	 * <p>The default implementation is empty. Called by 
	 * {@link #initApplicationContext(org.springframework.context.ApplicationContext)} 
	 * as well as {@link #setServletContext(javax.servlet.ServletContext)}. 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 * Concrete implementation of {@link ContactManager}. 
 * 
 * @author Ben Alex 
 */ 
@Transactional 
public class ContactManagerBackend extends ApplicationObjectSupport implements ContactManager, InitializingBean {
    //~ Instance fields ================================================================================================ 
 
    private ContactDao contactDao;
    private MutableAclService mutableAclService;
    private int counter = 1000;
 
    //~ Methods ======================================================================================================== 
 
    public void afterPropertiesSet() throws Exception {
        Assert.notNull(contactDao, "contactDao required");
        Assert.notNull(mutableAclService, "mutableAclService required");
    } 
 
    public void addPermission(Contact contact, Sid recipient, Permission permission) {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework ApplicationObjectSupport Methods: