Thread: [Ejtools-cvs] applications/jndi.browser/src/main/org/ejtools/jndi/browser/model JNDIContext.java,1.2
Brought to you by:
letiemble
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/model Modified Files: JNDIContext.java JNDIEntry.java JNDIEnvEntry.java JNDILinkRef.java Proxy.java Server.java Log Message: Address Todo #755528 Address Todo #800902 Index: JNDIContext.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDIContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDIContext.java 12 Feb 2003 21:24:36 -0000 1.2 --- JNDIContext.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,134 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.awt.Component; ! import java.beans.Customizer; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.util.Iterator; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.beans.Sort; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Ancestor of all element in the JNDI tree. Represents a JNDI Context and can contains other context. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Context" ! * shortDescription="JNDI Context" ! * @javabean:icons color16="/toolbarButtonGraphics/general/Folder16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the context" ! */ ! public class JNDIContext extends CustomBeanContextServicesSupport implements BeanContextChildComponentProxy ! { ! /** Customizer of the JavaBean */ ! protected transient Customizer c = null; ! /** Class name of the context */ ! protected String className = ""; ! /** Name of the context */ ! protected String name = ""; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(JNDIContext.class); ! ! ! /** Constructor for the JndiServer object */ ! public JNDIContext() ! { ! super(); ! } ! ! ! /** ! * Gets the class name of the context ! * ! * @return The class name string ! */ ! public String getClassName() ! { ! return this.className; ! } ! ! ! /** ! * Gets the JavaBean customizer of the context ! * ! * @return The customizer ! */ ! public Component getComponent() ! { ! // Lazy creation ! if (c == null) ! { ! c = new GenericCustomizer(true, this); ! } ! return (Component) c; ! } ! ! ! /** ! * Gets the name of the context ! * ! * @return The name string ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Return the children of this context as an iterator ! * ! * @return The sorted iterator by class and by name ! */ ! public Iterator iterator() ! { ! return Sort.sortByName(super.iterator()); ! } ! ! ! /** ! * Implementation of toString() method ! * ! * @return The name of the context ! */ ! public String toString() ! { ! return name == null ? "Undefined" : name; ! } ! ! ! /** ! * Sets the class name of this context ! * ! * @param className The class name ! */ ! protected void setClassName(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the name of this context ! * ! * @param name The name ! */ ! protected void setName(String name) ! { ! String old = this.name; ! this.name = name; ! this.firePropertyChange("name", old, this.name); ! } ! } --- 1,131 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.awt.Component; ! import java.beans.Customizer; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.util.Iterator; ! ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.beans.Sort; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Ancestor of all element in the JNDI tree. Represents a JNDI Context and can contains other context. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Context" ! * shortDescription="JNDI Context" ! * @javabean:icons color16="/toolbarButtonGraphics/general/Folder16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the context" ! */ ! public class JNDIContext extends CustomBeanContextServicesSupport implements BeanContextChildComponentProxy ! { ! /** Customizer of the JavaBean */ ! protected transient Customizer c = null; ! /** Class name of the context */ ! protected String className = ""; ! /** Name of the context */ ! protected String name = ""; ! ! ! /** Constructor for the JndiServer object */ ! public JNDIContext() ! { ! super(); ! } ! ! ! /** ! * Gets the class name of the context ! * ! * @return The class name string ! */ ! public String getClassName() ! { ! return this.className; ! } ! ! ! /** ! * Gets the JavaBean customizer of the context ! * ! * @return The customizer ! */ ! public Component getComponent() ! { ! // Lazy creation ! if (c == null) ! { ! c = new GenericCustomizer(true, this); ! } ! return (Component) c; ! } ! ! ! /** ! * Gets the name of the context ! * ! * @return The name string ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Return the children of this context as an iterator ! * ! * @return The sorted iterator by class and by name ! */ ! public Iterator iterator() ! { ! return Sort.sortByName(super.iterator()); ! } ! ! ! /** ! * Implementation of toString() method ! * ! * @return The name of the context ! */ ! public String toString() ! { ! return name == null ? "Undefined" : name; ! } ! ! ! /** ! * Sets the class name of this context ! * ! * @param className The class name ! */ ! protected void setClassName(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the name of this context ! * ! * @param name The name ! */ ! protected void setName(String name) ! { ! String old = this.name; ! this.name = name; ! this.firePropertyChange("name", old, this.name); ! } ! } Index: JNDIEntry.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDIEntry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JNDIEntry.java 10 Feb 2003 21:17:23 -0000 1.1 --- JNDIEntry.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,30 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! ! /** ! * Describe a simple JNDI entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! */ ! public class JNDIEntry extends JNDIContext ! { ! } --- 1,30 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! ! /** ! * Describe a simple JNDI entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! */ ! public class JNDIEntry extends JNDIContext ! { ! } Index: JNDIEnvEntry.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDIEnvEntry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JNDIEnvEntry.java 10 Feb 2003 21:17:23 -0000 1.1 --- JNDIEnvEntry.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,79 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a environment entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="value" ! * class="java.lang.String" ! * displayName="Value" ! * shortDescription="Value of the environment entry" ! */ ! public class JNDIEnvEntry extends JNDIContext ! { ! /** Description of the Field */ ! protected Object value = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDIEnvEntry(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! ! Class clazz = o.getClass(); ! if (clazz.getName().startsWith("java.lang.")) ! { ! this.value = o; ! } ! if (clazz.equals(java.net.URL.class)) ! { ! this.value = o; ! } ! if (this.value == null) ! { ! throw new Exception("This object is not a valid environment entry"); ! } ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the value attribute of the JNDIEnvEntry object ! * ! * @return The value value ! */ ! public String getValue() ! { ! return this.value.toString(); ! } ! } --- 1,79 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a environment entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="value" ! * class="java.lang.String" ! * displayName="Value" ! * shortDescription="Value of the environment entry" ! */ ! public class JNDIEnvEntry extends JNDIContext ! { ! /** Description of the Field */ ! protected Object value = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDIEnvEntry(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! ! Class clazz = o.getClass(); ! if (clazz.getName().startsWith("java.lang.")) ! { ! this.value = o; ! } ! if (clazz.equals(java.net.URL.class)) ! { ! this.value = o; ! } ! if (this.value == null) ! { ! throw new Exception("This object is not a valid environment entry"); ! } ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the value attribute of the JNDIEnvEntry object ! * ! * @return The value value ! */ ! public String getValue() ! { ! return this.value.toString(); ! } ! } Index: JNDILinkRef.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDILinkRef.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDILinkRef.java 24 Feb 2003 22:32:12 -0000 1.2 --- JNDILinkRef.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,84 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! import javax.naming.LinkRef; ! ! ! /** ! * Describe a simple JNDI Link Reference. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="JNDI LinkRef" ! * shortDescription="JNDI Link Reference" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="linkName" ! * class="java.lang.String" ! * displayName="Link Reference" ! * shortDescription="Link Reference" ! */ ! public class JNDILinkRef extends JNDIEntry ! { ! /** Class name of the context */ ! protected String linkName = ""; ! /** Description of the Field */ ! protected LinkRef ref; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDILinkRef(Context context, String jndiName) ! throws Exception ! { ! this.setName(jndiName); ! ! Object o = context.lookupLink(jndiName); ! this.setClassName(o.getClass().getName()); ! ! ref = (LinkRef) o; ! this.setLinkName(ref.getLinkName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public String getLinkName() ! { ! return this.linkName; ! } ! ! ! /** ! * Sets the linkName attribute of the JNDILinkRef object ! * ! * @param linkName The new linkName value ! */ ! protected void setLinkName(String linkName) ! { ! this.linkName = linkName; ! } ! } --- 1,84 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! import javax.naming.LinkRef; ! ! ! /** ! * Describe a simple JNDI Link Reference. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="JNDI LinkRef" ! * shortDescription="JNDI Link Reference" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="linkName" ! * class="java.lang.String" ! * displayName="Link Reference" ! * shortDescription="Link Reference" ! */ ! public class JNDILinkRef extends JNDIEntry ! { ! /** Class name of the context */ ! protected String linkName = ""; ! /** Description of the Field */ ! protected LinkRef ref; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDILinkRef(Context context, String jndiName) ! throws Exception ! { ! this.setName(jndiName); ! ! Object o = context.lookupLink(jndiName); ! this.setClassName(o.getClass().getName()); ! ! ref = (LinkRef) o; ! this.setLinkName(ref.getLinkName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public String getLinkName() ! { ! return this.linkName; ! } ! ! ! /** ! * Sets the linkName attribute of the JNDILinkRef object ! * ! * @param linkName The new linkName value ! */ ! protected void setLinkName(String linkName) ! { ! this.linkName = linkName; ! } ! } Index: Proxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/Proxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Proxy.java 24 Feb 2003 22:32:12 -0000 1.2 --- Proxy.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,85 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a Proyx entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Proxy Class" ! * shortDescription="Proxy Class" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="interfaces" ! * class="java.lang.Class" ! * displayName="Interfaces" ! * shortDescription="Interfaces implemented by this proxy" ! */ ! public class Proxy extends JNDIEntry ! { ! /** Description of the Field */ ! protected Object proxy = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public Proxy(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! Class clazz = o.getClass(); ! ! if (java.lang.reflect.Proxy.isProxyClass(clazz)) ! { ! proxy = o; ! } ! else ! { ! if (clazz.getName().startsWith("$Proxy")) ! { ! proxy = o; ! } ! } ! ! if (proxy == null) ! { ! throw new Exception("This object is not a proxy"); ! } ! ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public Class[] getInterfaces() ! { ! return proxy.getClass().getInterfaces(); ! } ! } --- 1,85 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a Proyx entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Proxy Class" ! * shortDescription="Proxy Class" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="interfaces" ! * class="java.lang.Class" ! * displayName="Interfaces" ! * shortDescription="Interfaces implemented by this proxy" ! */ ! public class Proxy extends JNDIEntry ! { ! /** Description of the Field */ ! protected Object proxy = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public Proxy(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! Class clazz = o.getClass(); ! ! if (java.lang.reflect.Proxy.isProxyClass(clazz)) ! { ! proxy = o; ! } ! else ! { ! if (clazz.getName().startsWith("$Proxy")) ! { ! proxy = o; ! } ! } ! ! if (proxy == null) ! { ! throw new Exception("This object is not a proxy"); ! } ! ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public Class[] getInterfaces() ! { ! return proxy.getClass().getInterfaces(); ! } ! } Index: Server.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/Server.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Server.java 3 Mar 2003 20:34:32 -0000 1.2 --- Server.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,444 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.lang.reflect.Constructor; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Properties; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.naming.Context; ! import javax.naming.InitialContext; ! import javax.naming.LinkRef; ! import javax.naming.NameClassPair; ! import javax.naming.NamingEnumeration; ! import javax.naming.NamingException; ! ! import org.apache.log4j.Logger; ! import org.ejtools.jndi.browser.model.service.ConnectionMetaData; ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Add log4j logs ! * @javabean:class displayName="JNDI Server" ! * shortDescription="JNDI Server" ! * @javabean:icons color16="/toolbarButtonGraphics/development/Server16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Connection" ! * shortDescription="Connection Name" ! * @javabean:property name="factory" ! * class="java.lang.String" ! * displayName="Factory" ! * shortDescription="JNDI context factory" ! * @javabean:property name="packages" ! * class="java.lang.String" ! * displayName="Packages" ! * shortDescription="Packages for context" ! * @javabean:property name="url" ! * class="java.lang.String" ! * displayName="URL" ! * shortDescription="JNDI Server URL" ! * @javabean:property name="context" ! * class="java.lang.String" ! * displayName="Context" ! * shortDescription="Initial JNDI context" ! * @javabean:property name="principal" ! * class="java.lang.String" ! * displayName="Principal" ! * shortDescription="Principal to connect" ! * @javabean:property name="credentials" ! * class="java.lang.String" ! * displayName="Credentials" ! * shortDescription="Credentials to connect" ! */ ! public class Server extends JNDIContext ! { ! /** Description of the Field */ ! protected Profile profile = new Profile(); ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(Server.class); ! /** Description of the Field */ ! private static Vector proxies = new Vector(); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! ! /** ! * Constructor for the JndiServer object ! * ! * @todo I18N to complete ! */ ! public Server() ! { ! super(); ! this.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** ! * Gets the context attribute of the JNDIServer object ! * ! * @return The context value ! */ ! public String getContext() ! { ! return this.profile.getProperty(ConnectionMetaData.CONTEXT); ! } ! ! ! /** ! * Returns the credentials. ! * ! * @return String ! */ ! public String getCredentials() ! { ! return this.profile.getProperty(ConnectionMetaData.CREDENTIALS); ! } ! ! ! /** ! * Gets the provider attribute of the JndiServer object ! * ! * @return The provider value ! */ ! public String getFactory() ! { ! return this.profile.getProperty(ConnectionMetaData.FACTORY); ! } ! ! ! /** ! * Gets the packages attribute of the JndiServer object ! * ! * @return The packages value ! */ ! public String getPackages() ! { ! return this.profile.getProperty(ConnectionMetaData.PACKAGES); ! } ! ! ! ! /** ! * Returns the principal. ! * ! * @return String ! */ ! public String ge... [truncated message content] |