All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.code.rees.scope.struts2.StrutsScopeContainerProvider Maven / Gradle / Ivy

There is a newer version: 1.7.4
Show newest version
package com.google.code.rees.scope.struts2;

import com.google.code.rees.scope.container.ScopeContainer;
import com.google.code.rees.scope.container.ScopeContainerProvider;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;

public class StrutsScopeContainerProvider implements ScopeContainerProvider {
	
	private static final long serialVersionUID = 5288295007865319291L;
	
	private Container container;
	private String scopeContainerKey;
	
	@Inject(StrutsScopeConstants.SCOPE_CONTAINER_KEY)
	public void setScopeContainerKey(String key) {
		scopeContainerKey = key;
	}
	
	@Inject
	public void setContainer(Container container) {
		this.container = container;
	}

	@Override
	public ScopeContainer getScopeContainer() {
		return container.getInstance(ScopeContainer.class, scopeContainerKey);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy