com.google.code.rees.scope.struts2.StrutsScopeContainerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of struts2-conversation-scope-plugin Show documentation
Show all versions of struts2-conversation-scope-plugin Show documentation
A Struts2 plugin for leveraging conversation scopes in Struts2
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);
}
}