Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules
In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules
Added Files:
ServerInternalFrameRule.java ServerRule.java
Log Message:
Address Todo #755528
Address Todo #800902
--- NEW FILE: ServerInternalFrameRule.java ---
/*
* EJTools, the Enterprise Java Tools
*
* Distributable under LGPL license.
* See terms of license at www.gnu.org.
*/
package org.ejtools.jndi.browser.state.rules;
import java.util.Map;
import org.ejtools.jndi.browser.frame.ServerInternalFrame;
import org.ejtools.util.state.DefaultRule;
/**
* @author letiembl
* @version $Revision: 1.1 $
* @created 20 juin 2003
*/
public class ServerInternalFrameRule extends DefaultRule
{
/**
* Description of the Method
*
* @param context Description of the Parameter
*/
public void loadEnter(Map context)
{
ServerInternalFrame frame = new ServerInternalFrame();
context.put("FRAME", frame);
context.put("HOLDER", frame);
}
}
--- NEW FILE: ServerRule.java ---
/*
* Created on 20 juin 2003
*
* To change this generated comment go to
* Window>Preferences>Java>Code Generation>Code Template
*/
package org.ejtools.jndi.browser.state.rules;
import java.beans.beancontext.BeanContextServices;
import java.util.Map;
import org.ejtools.jndi.browser.frame.ServerInternalFrame;
import org.ejtools.jndi.browser.model.Server;
import org.ejtools.util.state.DefaultRule;
import org.xml.sax.Attributes;
/**
* @author letiemble
* @created 20 juin 2003
* @version $Revision: 1.1 $
*/
public class ServerRule extends DefaultRule
{
/**
* Description of the Method
*
* @param context Description of the Parameter
*/
public void loadEnter(Map context)
{
BeanContextServices container = (BeanContextServices) context.get("CONTAINER");
ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME");
Server server = new Server();
context.put("SERVER", server);
frame.setServer(server);
container.add(frame);
Attributes attrs = (Attributes) context.get("ATTRIBUTES");
String name = attrs.getValue("name");
server.setName(name);
}
}
|