org.exoplatform.dashboard.webui.component
Class UIDashboardContainer

java.lang.Object
  extended by org.exoplatform.webui.core.UIComponent
      extended by org.exoplatform.webui.core.UIContainer
          extended by org.exoplatform.dashboard.webui.component.UIDashboardContainer

public class UIDashboardContainer
extends UIContainer


Nested Class Summary
static class UIDashboardContainer.AddNewGadgetActionListener
           
static class UIDashboardContainer.DeleteGadgetActionListener
           
static class UIDashboardContainer.MoveGadgetActionListener
           
static class UIDashboardContainer.SetShowSelectFormActionListener
           
 
Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer
UIContainer.SelectTabActionListener
 
Field Summary
static java.lang.String COLINDEX
           
static java.lang.String COLUMN_CONTAINER
          Column Type of Container
static int MAX_COLUMN
          Specify max number of columns in dashboard container Default value is 4
static java.lang.String ROOT_CONTAINER
          Root Type of Container
static java.lang.String ROW_CONTAINER
          Row Type of Container
static java.lang.String ROWINDEX
           
 
Fields inherited from class org.exoplatform.webui.core.UIComponent
config, OBJECTID, UICOMPONENT, uiparent
 
Constructor Summary
UIDashboardContainer(InitParams initParams)
          Constructs new UIDashboardContainer which belongs to a UIDashboardPortlet
 
Method Summary
 void addUIGadget(UIGadget gadget, int col, int row)
          Adds an UIGadget into UIDashboardContainer in specified position
 Container createContainer(java.lang.String type, java.lang.String id)
          Creates a Container that representation of row or column in this UIDashboardContainer
 UIContainer getColumn(int col)
          Gets an UIContainer representation of a column at specified index
 java.util.List<UIContainer> getColumns()
          Returns a List of the UIContainers of this UIDashboardContainer which representation of list of columns.
 java.lang.String getContainerTemplate()
           
 UIGadget getUIGadget(int col, int row)
          Gets an UIGadget at specified position
 UIGadget getUIGadget(java.lang.String gadgetId)
          Gets an UIGadget which has applicationInstanceUniqueId_ according to specified Id
 java.lang.String getWindowId()
          Get windowId of UIPortlet
 boolean hasUIGadget()
          Tests if this UIDashboardContainer has UIGadget
 void moveUIGadget(java.lang.String gadgetId, int col, int row)
          Moves an UIGadget which has specified applicationInstanceUniqueId_ to specified position
 void processRender(WebuiRequestContext context)
           
 UIGadget removeUIGadget(int col, int row)
          Removes an UIGadget at specified position
 UIGadget removeUIGadget(java.lang.String gadgetId)
          Removes an UIGadget belongs to this which has specified applicationInstanceUniqueId_
 void save()
          Saves all UIComponent of this UIDashboardContainer to database
 UIDashboardContainer setColumns(int num)
          Sets total of columns of this UIDashboardContainer, total of columns is between 1 and MAX_COLUMN
 void setContainerTemplate(java.lang.String template)
           
 
Methods inherited from class org.exoplatform.webui.core.UIContainer
addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypes, visit
 
Methods inherited from class org.exoplatform.webui.core.UIComponent
broadcast, createEvent, createUIComponent, createUIComponent, createUIComponent, event, event, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getName, getParent, getTemplate, getTemplateResourceResolver, getUIComponentName, isRendered, loadConfirmMesssage, processAction, processDecode, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibbling, url, url, url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_COLUMN

public static final int MAX_COLUMN
Specify max number of columns in dashboard container Default value is 4

See Also:
Constant Field Values

COLUMN_CONTAINER

public static final java.lang.String COLUMN_CONTAINER
Column Type of Container

See Also:
Constant Field Values

ROW_CONTAINER

public static final java.lang.String ROW_CONTAINER
Row Type of Container

See Also:
Constant Field Values

ROOT_CONTAINER

public static final java.lang.String ROOT_CONTAINER
Root Type of Container

See Also:
Constant Field Values

COLINDEX

public static final java.lang.String COLINDEX
See Also:
Constant Field Values

ROWINDEX

public static final java.lang.String ROWINDEX
See Also:
Constant Field Values
Constructor Detail

UIDashboardContainer

public UIDashboardContainer(InitParams initParams)
                     throws java.lang.Exception
Constructs new UIDashboardContainer which belongs to a UIDashboardPortlet

Parameters:
initParams - initial parameters
Throws:
java.lang.Exception - if can't create UIDashboardContainer
See Also:
DashboardParent, InitParams
Method Detail

processRender

public void processRender(WebuiRequestContext context)
                   throws java.lang.Exception
Overrides:
processRender in class UIComponent
Throws:
java.lang.Exception

addUIGadget

public void addUIGadget(UIGadget gadget,
                        int col,
                        int row)
Adds an UIGadget into UIDashboardContainer in specified position

Parameters:
gadget - UIGadget to add in UIDashboardContainer
col - index of column to add
row - index of row to add
See Also:
UIGadget

getUIGadget

public UIGadget getUIGadget(int col,
                            int row)
Gets an UIGadget at specified position

Parameters:
col - index of column
row - index of row
Returns:
null if specified position doesn't exist UIGadget otherwise
See Also:
UIGadget

getUIGadget

public UIGadget getUIGadget(java.lang.String gadgetId)
Gets an UIGadget which has applicationInstanceUniqueId_ according to specified Id

Parameters:
gadgetId - applicationInstanceUniqueId_ of UIGadget
Returns:
null if UIGadget doesn't exist
UIGadget otherwise
See Also:
UIGadget

removeUIGadget

public UIGadget removeUIGadget(java.lang.String gadgetId)
Removes an UIGadget belongs to this which has specified applicationInstanceUniqueId_

Parameters:
gadgetId - applicationInstanceUniqueId_ of UIGadget
Returns:
UIGadget which deleted
null otherwise
See Also:
UIGadget

removeUIGadget

public UIGadget removeUIGadget(int col,
                               int row)
Removes an UIGadget at specified position

Parameters:
col - index of the column
row - index of the row
Returns:
UIGadget which deleted
null otherwise
See Also:
UIGadget

moveUIGadget

public void moveUIGadget(java.lang.String gadgetId,
                         int col,
                         int row)
Moves an UIGadget which has specified applicationInstanceUniqueId_ to specified position

Parameters:
gadgetId - applicationInstanceUniqueId_ of UIGadget
col - index of destination column
row - index of destination row
See Also:
UIGadget

getColumn

public UIContainer getColumn(int col)
Gets an UIContainer representation of a column at specified index

Parameters:
col - index of column
Returns:
UIContainer if the column exist
null otherwise
See Also:
UIContainer

hasUIGadget

public boolean hasUIGadget()
Tests if this UIDashboardContainer has UIGadget

Returns:
false if and only if this UIDashboardContainer has no UIGadget
true otherwise

setColumns

public UIDashboardContainer setColumns(int num)
                                throws java.lang.Exception
Sets total of columns of this UIDashboardContainer, total of columns is between 1 and MAX_COLUMN

Parameters:
num - total of columns
Returns:
null if totals of columns is less than 1 or greater than MAX_COLUMN this UIDashboardContainer otherwise
Throws:
java.lang.Exception - if this UIDashboardContainer can not create new UIComponent

getColumns

public java.util.List<UIContainer> getColumns()
Returns a List of the UIContainers of this UIDashboardContainer which representation of list of columns.

Returns:
List of UIContainer
See Also:
List, UIContainer

createContainer

public Container createContainer(java.lang.String type,
                                 java.lang.String id)
                          throws java.lang.Exception
Creates a Container that representation of row or column in this UIDashboardContainer

Parameters:
type - type of Container, that is ROW_CONTAINER or COLUMN_CONTAINER
id - id of Container
Returns:
Container if UIDashboardContainer has specified type
null otherwise
Throws:
java.lang.Exception - if toContainer(String) method throws an Exception
See Also:
Container, toContainer(String)

getWindowId

public java.lang.String getWindowId()
Get windowId of UIPortlet

Returns:
a String represents windowId of portlet
See Also:
UIPortlet

setContainerTemplate

public void setContainerTemplate(java.lang.String template)

getContainerTemplate

public java.lang.String getContainerTemplate()

save

public void save()
          throws java.lang.Exception
Saves all UIComponent of this UIDashboardContainer to database

Throws:
java.lang.Exception


Copyright © 2011 eXo Platform SAS. All Rights Reserved.