openamf/src/java/org/openamf/config ConfigDigester.java,1.6,1.7 StateBeanConfig.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf/config
In directory sc8-pr-cvs1:/tmp/cvs-serv19486/src/java/org/openamf/config

Modified Files:
	ConfigDigester.java StateBeanConfig.java 
Log Message:
1) added the ability to store state-beans in HttpSession or ServletContext
2) fixed bug, where state-bean wasn't being stored in session

Index: ConfigDigester.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/config/ConfigDigester.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ConfigDigester.java	1 May 2003 16:22:06 -0000	1.6
--- ConfigDigester.java	2 May 2003 00:07:36 -0000	1.7
***************
*** 118,121 ****
--- 118,122 ----
  		addCallMethod(STATE_BEAN_PATH + "/name", "setName", 0);
  		addCallMethod(STATE_BEAN_PATH + "/class", "setClassName", 0);
+ 		addCallMethod(STATE_BEAN_PATH + "/scope", "setScope", 0);
  	}
  

Index: StateBeanConfig.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/config/StateBeanConfig.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** StateBeanConfig.java	30 Apr 2003 01:02:04 -0000	1.2
--- StateBeanConfig.java	2 May 2003 00:07:36 -0000	1.3
***************
*** 2,9 ****
  
  public class StateBeanConfig {
! 
  	private String name;
  	private String className;
  	
  	public String getName() {
  		return name;
--- 2,11 ----
  
  public class StateBeanConfig {
! 	
  	private String name;
  	private String className;
+ 	private String scope;
  	
+ 		
  	public String getName() {
  		return name;
***************
*** 21,24 ****
--- 23,42 ----
  		this.className = className;
  	}
+ 	
+ 	public String getScope() {
+ 		return scope;
+ 	}
+ 	
+ 	public void setScope(String scope) {
+ 		this.scope = scope;
+ 	}
+ 	
+ 	public boolean isSessionScope() {
+ 		return scope.toLowerCase().equals("session");
+ 	}
+ 
+ 	public boolean isApplcationScope() {
+ 		return scope.toLowerCase().equals("application");
+ 	}
  
  	public String toString() {
***************
*** 32,35 ****
--- 50,57 ----
  		sb.append("Class Name: ");
  		sb.append(getClassName());
+ 		sb.append('\n');
+ 		
+ 		sb.append("Scope: ");
+ 		sb.append(getScope());
  		sb.append('\n');
  		




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.