com.stratelia.silverpeas.portlet
Class SpaceModel

java.lang.Object
  extended by com.stratelia.silverpeas.portlet.SpaceModel

public class SpaceModel
extends Object

Class declaration

Author:

Constructor Summary
SpaceModel()
          Empty constructor to satisfy the J2EE requirement for the <jsp:useBean> tag Should never be called
SpaceModel(String aSpaceId)
          SpaceModel
 
Method Summary
 void addColumn(SpaceColumn aColumn)
          Add a column to the space model
 void addColumn(SpaceColumn aColumn, int col)
          Insert a column to the space model at the specified position
 void addPortlet(int col, int row, Portlet aPortlet)
          Insert a single portlet to the SpaceModel at the specified col, before the specified row if the col is invalid a new one is created and added to the spaceModel
 void addPortlet(int colNum, Portlet aPortlet)
          Append a single portlet to the SpaceModel to the specified column. if the column is invalid, create a new one.
 SpaceColumn getColumn(int col)
          getColumn
 int getcolumnsCount()
          getcolumnsCount
 String getColumnsRatios()
          getColumnsRatios
 boolean getIsAdministrator()
          getIsAdministrator
 String getname()
          Method declaration
 Portlet getPortlet(int col, int row)
          getPortlet
 int getPortletCount()
          Method declaration
 int getPortletIndex(int instanceId)
          return -1 if not found.
 Portlet getPortlets(int index)
          Retrieve a portlet by Its index in the space Model
 int getSpaceId()
          getSpaceId
 int getUserId()
          getUserId
 void removeColumn(int col)
          removeColumn
 void removePortlet(int col, int row)
          Remove the portlet from the in memory spaceModel
 void setIsAdministrator(boolean isAdmin)
          setIsAdministrator
 void setUserId(int aUserId)
          setUserId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpaceModel

public SpaceModel()
           throws PortletException
Empty constructor to satisfy the J2EE requirement for the <jsp:useBean> tag Should never be called

Throws:
PortletException

SpaceModel

public SpaceModel(String aSpaceId)
SpaceModel

Parameters:
String - aSpaceId
Method Detail

setIsAdministrator

public void setIsAdministrator(boolean isAdmin)
setIsAdministrator

Parameters:
isAdmin - true if the user is administrator

getIsAdministrator

public boolean getIsAdministrator()
getIsAdministrator

Returns:
the returned boolean

setUserId

public void setUserId(int aUserId)
setUserId

Parameters:
aUserId - parameter for setUserId

getUserId

public int getUserId()
getUserId

Returns:
the returned int

getSpaceId

public int getSpaceId()
getSpaceId

Returns:
the returned int

getname

public String getname()
Method declaration

Returns:
See Also:

getcolumnsCount

public int getcolumnsCount()
getcolumnsCount

Returns:
the returned int

getColumn

public SpaceColumn getColumn(int col)
getColumn

Parameters:
col - parameter for getColumn
Returns:
the returned SpaceColumn

getColumnsRatios

public String getColumnsRatios()
getColumnsRatios

Returns:
the ratios to be used in the frameset tag.

getPortlets

public Portlet getPortlets(int index)
Retrieve a portlet by Its index in the space Model


getPortletCount

public int getPortletCount()
Method declaration

Returns:
See Also:

getPortlet

public Portlet getPortlet(int col,
                          int row)
getPortlet

Parameters:
col - parameter for getPortlet
Returns:
the returned Portlet

getPortletIndex

public int getPortletIndex(int instanceId)
return -1 if not found.


addColumn

public void addColumn(SpaceColumn aColumn,
                      int col)
Insert a column to the space model at the specified position


addColumn

public void addColumn(SpaceColumn aColumn)
Add a column to the space model


addPortlet

public void addPortlet(int col,
                       int row,
                       Portlet aPortlet)
Insert a single portlet to the SpaceModel at the specified col, before the specified row if the col is invalid a new one is created and added to the spaceModel


addPortlet

public void addPortlet(int colNum,
                       Portlet aPortlet)
Append a single portlet to the SpaceModel to the specified column. if the column is invalid, create a new one.


removeColumn

public void removeColumn(int col)
removeColumn

Parameters:
col - parameter for removeColumn

removePortlet

public void removePortlet(int col,
                          int row)
Remove the portlet from the in memory spaceModel

Parameters:
col - is the index of the column in spaceColumns, first col is 0
row - is the index of the portlet in the column, first row is 0


Copyright © 2016 Silverpeas. All Rights Reserved.