com.stratelia.webactiv.beans.admin
Class SpaceInst

java.lang.Object
  extended by com.silverpeas.util.i18n.AbstractI18NBean<SpaceI18N>
      extended by com.stratelia.webactiv.beans.admin.SpaceInst
All Implemented Interfaces:
I18NBean<SpaceI18N>, Serializable, Cloneable, Comparable<SpaceInst>

public class SpaceInst
extends AbstractI18NBean<SpaceI18N>
implements Serializable, Comparable<SpaceInst>, Cloneable

The class SpaceInst is the representation in memory of a space

See Also:
Serialized Form

Field Summary
static String DEFAULT_SPACE_ID
           
static int FP_TYPE_COMPONENT_INST
           
static int FP_TYPE_HTML_PAGE
           
static int FP_TYPE_PORTLET
           
static int FP_TYPE_STANDARD
           
static String PERSONAL_SPACE_ID
           
static String STATUS_REMOVED
           
 
Constructor Summary
SpaceInst()
          Constructor
 
Method Summary
 void addComponentInst(ComponentInst componentInst)
          Add a component in component list (WARNING : component will not be added in database, only in that spaceInst object !!!)
 void addSpaceProfileInst(SpaceProfileInst spaceProfileInst)
          Add a space profile in space profile list (WARNING : space profile will not be added in database, only in that spaceInst object !!!)
 SpaceInst clone()
           
 int compareTo(SpaceInst o)
           
 void deleteComponentInst(ComponentInst componentInst)
          Remove a component from component list (WARNING : component will not be removed from database, only in that spaceInst object !!!)
 void deleteSpaceProfileInst(SpaceProfileInst spaceProfileInst)
          Remove a space profile from space profile list (WARNING : space profile will not be removed from database, only from that spaceInst object !!!)
 boolean equals(Object obj)
           
 ArrayList<ComponentInst> getAllComponentsInst()
          Get all the components in that space
 ArrayList<SpaceProfileInst> getAllSpaceProfilesInst()
          Get all the space profiles from space profile list
 ComponentInst getComponentInst(int nIndex)
          Get a component from component list, given its name (WARNING : if more than one component instance match the given name, the first one will be returned)
 ComponentInst getComponentInst(String componentName)
          Add a component in component list (WARNING : component will not be added in database, only in that spaceInst object !!!)
 Quota getComponentSpaceQuota()
           
 String getComponentSpaceQuotaReachedErrorMessage(String language)
          Gets the error message about component space quota reached.
 Date getCreateDate()
           
 UserDetail getCreator()
           
 String getCreatorUserId()
          Get the space creator id
 Quota getDataStorageQuota()
           
 String getDataStorageQuotaReachedErrorMessage(String language)
          Gets the error message about data storage space quota reached.
 String getDomainFatherId()
          Get the domain father id
 String getFirstPageExtraParam()
          Get the space first page extra parameter
 int getFirstPageType()
          Get the space first page type
 String getId()
          Get the space id
 List<SpaceProfileInst> getInheritedProfiles()
           
 SpaceProfileInst getInheritedSpaceProfileInst(String sSpaceProfileName)
           
 int getLevel()
           
 String getLook()
           
 String getName(String language)
          Gets the name of the bean from the given language
 int getNumComponentInst()
          Get the number of components in that space
 int getNumSpaceProfileInst()
          Get the number of space profiles in that space
 int getOrderNum()
          Get the space relative order num
 List<SpaceProfileInst> getProfiles()
           
 Date getRemoveDate()
           
 UserDetail getRemover()
           
 String getRemoverUserId()
           
 SpaceProfileInst getSpaceProfileInst(int nIndex)
          Get a space profile from space profiles list, given its name (WARNING : if more than one space profile match the given name, the first one will be returned)
 SpaceProfileInst getSpaceProfileInst(String sSpaceProfileName)
          Get a space profile from space profiles list, given its name (WARNING : if more than one space profile match the given name, the first one will be returned)
 String getStatus()
           
 String[] getSubSpaceIds()
          Get the list of children space ids
 Date getUpdateDate()
           
 UserDetail getUpdater()
           
 String getUpdaterUserId()
           
 int hashCode()
           
 boolean isComponentSpaceQuotaReached()
          Indicates if the quota of the space or of a parent space is reached.
 boolean isDataStorageQuotaReached()
          Indicates if the quota of the space or of a parent space is reached.
 boolean isDisplaySpaceFirst()
           
 boolean isInheritanceBlocked()
           
 boolean isPersonalSpace()
           
 boolean isRoot()
           
 void removeAllComponentsInst()
          Remove all components from component list (WARNING : components will not be removed from database, only in that spaceInst object !!!)
 void removeAllSpaceProfilesInst()
          Remove all space profiles from space profiles list (WARNING : space profiles will not be removed from database, only from that spaceInst object !!!)
 void removeInheritedProfiles()
           
 void setComponentSpaceQuotaMaxCount(long componentSpaceQuotaMaxCount)
          Sets the max count of component space of the space
 void setCreateDate(Date createDate)
           
 void setCreator(UserDetail creator)
           
 void setCreatorUserId(String sCreatorUserId)
          Set the space creator id
 void setDataStorageQuotaMaxCount(long dataStorageQuotaMaxCount)
          Sets the max count of data storage of the space
 void setDisplaySpaceFirst(boolean isDisplaySpaceFirst)
           
 void setDomainFatherId(String sDomainFatherId)
          Set the space father id
 void setFirstPageExtraParam(String sFirstPageExtraParam)
          Set the space first page extra parameter
 void setFirstPageType(int iFirstPageType)
          Set the space first page type
 void setId(String sId)
          Set the space id
 void setInheritanceBlocked(boolean isInheritanceBlocked)
           
 void setLevel(int level)
           
 void setLook(String look)
           
 void setOrderNum(int iOrderNum)
          Set the space relative order num
 void setPersonalSpace(boolean isPersonalSpace)
           
 void setRemoveDate(Date removeDate)
           
 void setRemover(UserDetail remover)
           
 void setRemoverUserId(String removerUserId)
           
 void setStatus(String status)
           
 void setSubSpaceIds(String[] asSubSpaceIds)
          Set the list of children space ids
 void setUpdateDate(Date updateDate)
           
 void setUpdater(UserDetail updater)
           
 void setUpdaterUserId(String updaterUserId)
           
 
Methods inherited from class com.silverpeas.util.i18n.AbstractI18NBean
addTranslation, getClonedTranslations, getDescription, getDescription, getLanguage, getLanguages, getLanguageToDisplay, getName, getNextTranslation, getTranslation, getTranslationId, getTranslations, isRemoveTranslation, setDescription, setLanguage, setName, setRemoveTranslation, setTranslationId, setTranslations, setTranslations, setTranslations
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSONAL_SPACE_ID

public static final String PERSONAL_SPACE_ID
See Also:
Constant Field Values

DEFAULT_SPACE_ID

public static final String DEFAULT_SPACE_ID
See Also:
Constant Field Values

FP_TYPE_STANDARD

public static final int FP_TYPE_STANDARD
See Also:
Constant Field Values

FP_TYPE_COMPONENT_INST

public static final int FP_TYPE_COMPONENT_INST
See Also:
Constant Field Values

FP_TYPE_PORTLET

public static final int FP_TYPE_PORTLET
See Also:
Constant Field Values

FP_TYPE_HTML_PAGE

public static final int FP_TYPE_HTML_PAGE
See Also:
Constant Field Values

STATUS_REMOVED

public static final String STATUS_REMOVED
See Also:
Constant Field Values
Constructor Detail

SpaceInst

public SpaceInst()
Constructor

Method Detail

compareTo

public int compareTo(SpaceInst o)
Specified by:
compareTo in interface Comparable<SpaceInst>

setId

public void setId(String sId)
Set the space id

Parameters:
sId - new space id

getId

public String getId()
Get the space id

Returns:
the requested space id

setDomainFatherId

public void setDomainFatherId(String sDomainFatherId)
Set the space father id

Parameters:
sDomainFatherId - The space father id

getDomainFatherId

public String getDomainFatherId()
Get the domain father id

Returns:
the space father id. If space has no father, returns an empty string.

getName

public String getName(String language)
Description copied from class: AbstractI18NBean
Gets the name of the bean from the given language

Overrides:
getName in class AbstractI18NBean<SpaceI18N>
Returns:

setCreatorUserId

public void setCreatorUserId(String sCreatorUserId)
Set the space creator id

Parameters:
sCreatorUserId - The user id of person who created the space

getCreatorUserId

public String getCreatorUserId()
Get the space creator id

Returns:
The user id of person who created the space

setFirstPageType

public void setFirstPageType(int iFirstPageType)
Set the space first page type

Parameters:
iFirstPageType -

getFirstPageType

public int getFirstPageType()
Get the space first page type

Returns:
The space first page type

setOrderNum

public void setOrderNum(int iOrderNum)
Set the space relative order num

Parameters:
iOrderNum -

getOrderNum

public int getOrderNum()
Get the space relative order num

Returns:

setFirstPageExtraParam

public void setFirstPageExtraParam(String sFirstPageExtraParam)
Set the space first page extra parameter

Parameters:
sFirstPageExtraParam -

getFirstPageExtraParam

public String getFirstPageExtraParam()
Get the space first page extra parameter

Returns:
The space first page extra parameter

setSubSpaceIds

public void setSubSpaceIds(String[] asSubSpaceIds)
Set the list of children space ids

Parameters:
asSubSpaceIds - Array of String containing all the children space ids

getSubSpaceIds

public String[] getSubSpaceIds()
Get the list of children space ids

Returns:
Array of String containing all the children space ids

getNumComponentInst

public int getNumComponentInst()
Get the number of components in that space

Returns:
The number of components in that space

addComponentInst

public void addComponentInst(ComponentInst componentInst)
Add a component in component list (WARNING : component will not be added in database, only in that spaceInst object !!!)

Parameters:
componentInst - component instance to be added

deleteComponentInst

public void deleteComponentInst(ComponentInst componentInst)
Remove a component from component list (WARNING : component will not be removed from database, only in that spaceInst object !!!)

Parameters:
componentInst - component instance to be removed

getAllComponentsInst

public ArrayList<ComponentInst> getAllComponentsInst()
Get all the components in that space

Returns:
The components in that space

removeAllComponentsInst

public void removeAllComponentsInst()
Remove all components from component list (WARNING : components will not be removed from database, only in that spaceInst object !!!)


getComponentInst

public ComponentInst getComponentInst(String componentName)
Add a component in component list (WARNING : component will not be added in database, only in that spaceInst object !!!)

Parameters:
componentName - component instance to be added

getComponentInst

public ComponentInst getComponentInst(int nIndex)
Get a component from component list, given its name (WARNING : if more than one component instance match the given name, the first one will be returned)

Parameters:
nIndex -
Returns:

getNumSpaceProfileInst

public int getNumSpaceProfileInst()
Get the number of space profiles in that space

Returns:
The number of space profiles in that space

addSpaceProfileInst

public void addSpaceProfileInst(SpaceProfileInst spaceProfileInst)
Add a space profile in space profile list (WARNING : space profile will not be added in database, only in that spaceInst object !!!)

Parameters:
spaceProfileInst - space profile to be added

deleteSpaceProfileInst

public void deleteSpaceProfileInst(SpaceProfileInst spaceProfileInst)
Remove a space profile from space profile list (WARNING : space profile will not be removed from database, only from that spaceInst object !!!)

Parameters:
spaceProfileInst - space profile to be removed

getAllSpaceProfilesInst

public ArrayList<SpaceProfileInst> getAllSpaceProfilesInst()
Get all the space profiles from space profile list

Returns:
The space profiles of that space

removeAllSpaceProfilesInst

public void removeAllSpaceProfilesInst()
Remove all space profiles from space profiles list (WARNING : space profiles will not be removed from database, only from that spaceInst object !!!)


getSpaceProfileInst

public SpaceProfileInst getSpaceProfileInst(String sSpaceProfileName)
Get a space profile from space profiles list, given its name (WARNING : if more than one space profile match the given name, the first one will be returned)

Parameters:
sSpaceProfileName - name of requested space profile

getInheritedSpaceProfileInst

public SpaceProfileInst getInheritedSpaceProfileInst(String sSpaceProfileName)

getSpaceProfileInst

public SpaceProfileInst getSpaceProfileInst(int nIndex)
Get a space profile from space profiles list, given its name (WARNING : if more than one space profile match the given name, the first one will be returned)

Parameters:
nIndex - position of requested space profile in space profile list

getInheritedProfiles

public List<SpaceProfileInst> getInheritedProfiles()

getProfiles

public List<SpaceProfileInst> getProfiles()

setLevel

public void setLevel(int level)

getLevel

public int getLevel()

isRoot

public boolean isRoot()

getCreateDate

public Date getCreateDate()

setCreateDate

public void setCreateDate(Date createDate)

getRemoveDate

public Date getRemoveDate()

setRemoveDate

public void setRemoveDate(Date removeDate)

getStatus

public String getStatus()

setStatus

public void setStatus(String status)

getUpdateDate

public Date getUpdateDate()

setUpdateDate

public void setUpdateDate(Date updateDate)

getRemoverUserId

public String getRemoverUserId()

setRemoverUserId

public void setRemoverUserId(String removerUserId)

getUpdaterUserId

public String getUpdaterUserId()

setUpdaterUserId

public void setUpdaterUserId(String updaterUserId)

isInheritanceBlocked

public boolean isInheritanceBlocked()

setInheritanceBlocked

public void setInheritanceBlocked(boolean isInheritanceBlocked)

getLook

public String getLook()

setLook

public void setLook(String look)

getCreator

public UserDetail getCreator()

setCreator

public void setCreator(UserDetail creator)

getUpdater

public UserDetail getUpdater()

setUpdater

public void setUpdater(UserDetail updater)

getRemover

public UserDetail getRemover()

setRemover

public void setRemover(UserDetail remover)

isDisplaySpaceFirst

public boolean isDisplaySpaceFirst()

setDisplaySpaceFirst

public void setDisplaySpaceFirst(boolean isDisplaySpaceFirst)

setPersonalSpace

public void setPersonalSpace(boolean isPersonalSpace)

isPersonalSpace

public boolean isPersonalSpace()

getComponentSpaceQuota

public Quota getComponentSpaceQuota()
Returns:
the componentSpaceQuota

setComponentSpaceQuotaMaxCount

public void setComponentSpaceQuotaMaxCount(long componentSpaceQuotaMaxCount)
                                    throws QuotaException
Sets the max count of component space of the space

Throws:
QuotaException

isComponentSpaceQuotaReached

public boolean isComponentSpaceQuotaReached()
Indicates if the quota of the space or of a parent space is reached.

Returns:

getComponentSpaceQuotaReachedErrorMessage

public String getComponentSpaceQuotaReachedErrorMessage(String language)
Gets the error message about component space quota reached.

Parameters:
language -
Returns:

getDataStorageQuota

public Quota getDataStorageQuota()
Returns:
the dataStorageQuota

setDataStorageQuotaMaxCount

public void setDataStorageQuotaMaxCount(long dataStorageQuotaMaxCount)
                                 throws QuotaException
Sets the max count of data storage of the space

Throws:
QuotaException

isDataStorageQuotaReached

public boolean isDataStorageQuotaReached()
Indicates if the quota of the space or of a parent space is reached.

Returns:

getDataStorageQuotaReachedErrorMessage

public String getDataStorageQuotaReachedErrorMessage(String language)
Gets the error message about data storage space quota reached.

Parameters:
language -
Returns:

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public SpaceInst clone()
Overrides:
clone in class Object

removeInheritedProfiles

public void removeInheritedProfiles()


Copyright © 2016 Silverpeas. All Rights Reserved.