[Ejtools-cvs] applications/management.browser/src/main/org/ejtools/management/browser/frame Notifica
Brought to you by:
letiemble
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame
In directory sc8-pr-cvs1:/tmp/cvs-serv18798/management.browser/src/main/org/ejtools/management/browser/frame
Modified Files:
NotificationsInternalFrame.java ResourceIndexer.java
ResourceRenderer.java ServerInternalFrame.java
Log Message:
Address Todo #800902
Address Todo #755528
Index: NotificationsInternalFrame.java
===================================================================
RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/NotificationsInternalFrame.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NotificationsInternalFrame.java 24 Feb 2003 22:35:20 -0000 1.2
--- NotificationsInternalFrame.java 27 Nov 2003 01:39:47 -0000 1.3
***************
*** 13,17 ****
import javax.swing.JScrollPane;
- import org.apache.log4j.Logger;
import org.ejtools.adwt.service.BeanContextInternalFrame;
import org.ejtools.management.browser.model.service.NotificationServiceProvider;
--- 13,16 ----
***************
*** 21,25 ****
*
* @author Laurent Etiemble
- * @created 5 septembre 2002
* @version $Revision$
*/
--- 20,23 ----
***************
*** 28,33 ****
/** Description of the Field */
protected NotificationServiceProvider provider = null;
- /** Description of the Field */
- private static Logger logger = Logger.getLogger(NotificationsInternalFrame.class);
/** Description of the Field */
private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources");
--- 26,29 ----
Index: ResourceIndexer.java
===================================================================
RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/ResourceIndexer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ResourceIndexer.java 24 Feb 2003 22:35:20 -0000 1.3
--- ResourceIndexer.java 27 Nov 2003 01:39:47 -0000 1.4
***************
*** 12,16 ****
/**
* @author Laurent Etiemble
- * @created 21 janvier 2003
* @version $Revision$
*/
--- 12,15 ----
Index: ResourceRenderer.java
===================================================================
RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/ResourceRenderer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ResourceRenderer.java 8 Mar 2003 20:52:11 -0000 1.4
--- ResourceRenderer.java 27 Nov 2003 01:39:47 -0000 1.5
***************
*** 19,28 ****
import org.apache.log4j.Logger;
import org.ejtools.adwt.util.DefaultObjectRenderer;
- import org.ejtools.adwt.util.ObjectWrapper;
import org.ejtools.management.browser.model.ManagedObject;
/**
* @author Laurent Etiemble
- * @created 21 janvier 2003
* @version $Revision$
*/
--- 19,26 ----
***************
*** 41,50 ****
* @return The icon value
*/
! public Icon getIcon(ObjectWrapper o)
{
! Object uo = o.getUserObject();
! if (uo instanceof ManagedObject)
{
! ManagedObject resource = (ManagedObject) uo;
String type = resource.getJ2EEType();
Icon icon = (Icon) icons.get(type);
--- 39,47 ----
* @return The icon value
*/
! public Icon getIcon(Object o)
{
! if (o instanceof ManagedObject)
{
! ManagedObject resource = (ManagedObject) o;
String type = resource.getJ2EEType();
Icon icon = (Icon) icons.get(type);
Index: ServerInternalFrame.java
===================================================================
RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/frame/ServerInternalFrame.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ServerInternalFrame.java 24 Feb 2003 22:35:20 -0000 1.2
--- ServerInternalFrame.java 27 Nov 2003 01:39:47 -0000 1.3
***************
*** 21,29 ****
--- 21,32 ----
import org.ejtools.adwt.service.ToolBarServiceProvider;
import org.ejtools.management.browser.action.ShowNotificationsAction;
+ import org.ejtools.management.browser.model.ManagedObject;
import org.ejtools.management.browser.model.Server;
+ import org.ejtools.management.browser.model.service.CacheService;
import org.ejtools.management.browser.model.service.CacheServiceProvider;
import org.ejtools.management.browser.model.service.ConnectionServiceProvider;
import org.ejtools.management.browser.model.service.NotificationServiceProvider;
import org.ejtools.util.service.Profile;
+ import org.ejtools.util.service.ProfileHolder;
/**
***************
*** 31,38 ****
*
* @author Laurent Etiemble
- * @created 5 septembre 2002
* @version $Revision$
*/
! public class ServerInternalFrame extends BeanContextInternalFrame
{
/** Description of the Field */
--- 34,40 ----
*
* @author Laurent Etiemble
* @version $Revision$
*/
! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder
{
/** Description of the Field */
***************
*** 63,72 ****
* @param profile Description of the Parameter
*/
! public ServerInternalFrame(Profile profile)
{
super();
- this.profile = profile;
this.connectionProvider = new ConnectionServiceProvider();
this.cacheProvider = new CacheServiceProvider();
--- 65,112 ----
* @param profile Description of the Parameter
*/
! public ServerInternalFrame()
{
super();
+ }
+
+ /**
+ * Description of the Method
+ *
+ * @param objectName Description of the Parameter
+ * @return Description of the Return Value
+ */
+ public ManagedObject queryMBean(String objectName)
+ {
+ ManagedObject resource = (ManagedObject) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName);
+ try
+ {
+ if ((resource != null) && (resource.isRegistered()))
+ {
+ return resource;
+ }
+ }
+ catch (Exception e)
+ {
+ logger.warn("Cannot find ObjectName " + objectName, e);
+ }
+ return null;
+ }
+
+
+ public void setProfile(Profile profile)
+ {
+ this.profile = profile;
+ }
+
+
+ /**
+ * Sets the server attribute of the ServerInternalFrame object
+ *
+ * @param server The new server value
+ */
+ public void setServer(Server server)
+ {
this.connectionProvider = new ConnectionServiceProvider();
this.cacheProvider = new CacheServiceProvider();
***************
*** 109,114 ****
BeanContextTreePanel panel = new BeanContextTreePanel(this.server);
! panel.getTree().setIndexer(new ResourceIndexer());
! panel.getTree().setRenderer(new ResourceRenderer());
panel.selectRoot();
--- 149,154 ----
BeanContextTreePanel panel = new BeanContextTreePanel(this.server);
! panel.setIndexer(new ResourceIndexer());
! panel.setRenderer(new ResourceRenderer());
panel.selectRoot();
***************
*** 120,123 ****
--- 160,174 ----
/**
+ * Gets the profile attribute of the ServerInternalFrame object
+ *
+ * @return The profile value
+ */
+ public Profile getProfile()
+ {
+ return this.profile;
+ }
+
+
+ /**
* @param event Description of the Parameter
*/
***************
*** 138,142 ****
// Hack to update the window title
- String name = this.server.getName();
this.server.setName("");
this.server.setName(resources.getString("connection.text.untitled"));
--- 189,192 ----
|