|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.portlet.SpaceModelFactory
public class SpaceModelFactory
The SpaceModelFactory is a class used for its statics methods. its construct and maintain the SpaceModel hierarchie in memory. It implement the persistance for the SpaceModel class, ie : it provide read and save methods from/to a database. It can read/save the user specific state for the portlets (min, max or normal) either.
Field Summary | |
---|---|
protected static Map<String,WAComponent> |
compoDescriptors
|
protected static OrganisationController |
oc
|
Method Summary | |
---|---|
static Portlet |
getPortlet(int aInstanceId)
getPortlet Read an instance from database and contruct a Portlet in memory |
static PortletComponent[] |
getPortletList(SpaceModel space)
getPortletList Construct the list of portlet that can be added to a space : All instances that are not allready added the this space minus instance that are not "portlettizable" yet. |
static SpaceModel |
getSpaceModel(MainSessionController msc,
String aSpaceId,
boolean isAdmin)
get a spaceModel and remove the component that are not allowed for this user |
static SpaceModel |
getSpaceModel(PortletSchema os,
String aSpaceId)
Read a spaceModel from database and construct a SpaceModel in memory |
static boolean |
portletAvailable(MainSessionController mainSessionCtrl,
String spaceId)
Compute if there is any portlets avaible for this user in this space |
static void |
portletSaveState(SpaceModel space,
Portlet aPortlet)
portletSaveState Save the portlet state : minimized, normal or maximized |
static void |
saveSpaceModel(SpaceModel space)
saveSpaceModel Save all the spaceModel structure in database. the save in done by deleting and recreating the structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final OrganisationController oc
protected static final Map<String,WAComponent> compoDescriptors
Method Detail |
---|
public static SpaceModel getSpaceModel(PortletSchema os, String aSpaceId) throws PortletException
os
- aSpaceId
- the space database Id
PortletException
public static SpaceModel getSpaceModel(MainSessionController msc, String aSpaceId, boolean isAdmin) throws PortletException
msc
- parameter for getSpaceModelaSpaceId
- the required space IdisAdmin
- true if the user is editing the spaceModel. in this case, the unallowed portlets
are not remove from the spaceModel.
PortletException
- -public static void portletSaveState(SpaceModel space, Portlet aPortlet) throws PortletException
aSpaceId
- parameter for portletSaveStateaPortlet
- the portlet to save the state
PortletException
- -public static Portlet getPortlet(int aInstanceId) throws PortletException
aInstanceId
- parameter for getPortlet
PortletException
- -public static PortletComponent[] getPortletList(SpaceModel space)
space
- parameter for getPortletList
public static void saveSpaceModel(SpaceModel space) throws PortletException
space
- parameter for saveSpaceModel
PortletException
- -public static boolean portletAvailable(MainSessionController mainSessionCtrl, String spaceId)
mainSessionCtrl
- spaceId
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |