KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > content > explorer > component > UIJCRNodeInfo


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.portlets.content.explorer.component;
6
7 import javax.jcr.Node ;
8 import org.exoplatform.faces.core.component.UIExoCommand;
9 import org.exoplatform.faces.core.component.model.Parameter;
10 import org.exoplatform.faces.core.event.ExoActionEvent;
11 import org.exoplatform.faces.core.event.ExoActionListener;
12 import org.exoplatform.portlets.content.explorer.component.model.NodeDescriptor;
13 /**
14  * @email: tuan08@users.sourceforge.net
15  * @version: $Id: UIContentDisplayer.java,v 1.2 2004/08/07 18:11:26 tuan08 Exp $
16  */

17 public class UIJCRNodeInfo extends UIExoCommand implements ExplorerListener {
18   private static Parameter[] DELETE_PARAMS = {new Parameter(ACTION, DELETE_ACTION)} ;
19   
20   private Node currentNode_ ;
21   
22   public UIJCRNodeInfo() {
23     setRendererType("JCRNodeInfoRenderer") ;
24     addActionListener(RemoveNodeActionListener.class, DELETE_ACTION) ;
25   }
26   
27   public Node getCurrentNode() { return currentNode_ ; }
28   
29   public void onChange(UIExplorer uiExplorer, NodeDescriptor node) {
30     UIJCRExplorer uiJCRExplorer = (UIJCRExplorer) uiExplorer ;
31     currentNode_ = uiJCRExplorer.getCurrentNode() ;
32   }
33   
34   public void onRemove(UIExplorer uiExplorer, NodeDescriptor node) {
35     
36   }
37   
38   public void onModify(UIExplorer uiExplorer, NodeDescriptor node) {}
39   
40   public void onAddChild(UIExplorer uiExplorer, NodeDescriptor node) {
41     
42   }
43   
44   public String JavaDoc getFamily() {
45     return "org.exoplatform.portlets.content.explorer.component.UIJCRNodeInfo" ;
46   }
47   
48   static public class RemoveNodeActionListener extends ExoActionListener {
49     public void execute(ExoActionEvent event) throws Exception JavaDoc {
50      
51     }
52   }
53 }
Popular Tags