Class SpaceInst

    • Field Detail

      • FP_TYPE_STANDARD

        public static final int FP_TYPE_STANDARD
      • FP_TYPE_COMPONENT_INST

        public static final int FP_TYPE_COMPONENT_INST
      • FP_TYPE_PORTLET

        public static final int FP_TYPE_PORTLET
      • FP_TYPE_HTML_PAGE

        public static final int FP_TYPE_HTML_PAGE
      • QUOTA_STORAGE_PREFIX_KEY

        public static final String QUOTA_STORAGE_PREFIX_KEY
      • QUOTA_STORAGE_REACHED_PREFIX_KEY

        public static final String QUOTA_STORAGE_REACHED_PREFIX_KEY
      • QUOTA_COMPONENT_PREFIX_KEY

        public static final String QUOTA_COMPONENT_PREFIX_KEY
      • QUOTA_COMPONENT_REACHED_PREFIX_KEY

        public static final String QUOTA_COMPONENT_REACHED_PREFIX_KEY
    • Constructor Detail

      • SpaceInst

        public SpaceInst()
        Constructor
      • SpaceInst

        public SpaceInst​(SpaceInst si)
        Constructs a new collaboration space by copying the specified one. Only the identifier isn't copied as it should be unique.
        Parameters:
        si - the collaboration space to copy.
    • Method Detail

      • setLocalId

        public void setLocalId​(int id)
        Set the space local id
        Parameters:
        id - new space local id
      • getLocalId

        public int getLocalId()
      • getId

        public String getId()
        Get the absolute space id
        Specified by:
        getId in interface Identifiable
        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 in the given language. This method is a shortcut of the following code:
         myBean.getTranslation(language).getName();
         
        Overrides:
        getName in class AbstractI18NBean<SpaceI18N>
        Parameters:
        language - the ISO 631-1 code of the language
        Returns:
        the name of the bean in the specified language.
      • 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 - type of the home page of the space.
      • 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 - the order of the space relative to others
      • getOrderNum

        public int getOrderNum()
        Get the space relative order num
        Returns:
        the order of the space relative to the others spaces.
      • setFirstPageExtraParam

        public void setFirstPageExtraParam​(String sFirstPageExtraParam)
        Set the space first page extra parameter
        Parameters:
        sFirstPageExtraParam - parameters to pass to the home page of the space.
      • getFirstPageExtraParam

        public String getFirstPageExtraParam()
        Get the space first page extra parameter
        Returns:
        The space first page extra parameter
      • copyDataFrom

        public void copyDataFrom​(SpaceInst other)
      • resetData

        public void resetData()
      • 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
      • 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 List<SpaceProfileInst> getAllSpaceProfilesInst()
        Get all the user profiles defined for this space instance.
        Returns:
        an unmodifiable list of user profiles for this space instance.
      • 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)
      • getProfiles

        public List<SpaceProfileInst> getProfiles()
        Gets the specific right profiles of this space instance (that is to say all the non-inherited profiles)
        Returns:
        the specific right profiles of this space instance;
      • setLevel

        public void setLevel​(int level)
      • getLevel

        public int getLevel()
      • isRoot

        public boolean isRoot()
      • setCreationDate

        public void setCreationDate​(Date createDate)
      • getRemovalDate

        public Date getRemovalDate()
      • setRemovalDate

        public void setRemovalDate​(Date removeDate)
      • getStatus

        public String getStatus()
      • setStatus

        public void setStatus​(String status)
      • getLastUpdateDate

        public Date getLastUpdateDate()
        Description copied from interface: SilverpeasResource
        Gets the date at which the resource has been lastly updated. If the resource doesn't have such an information, then this method should return the date of the resource creation.
        Specified by:
        getLastUpdateDate in interface SilverpeasResource
        Returns:
        the date of the last update of the resource.
      • setLastUpdate

        public void setLastUpdate​(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)
      • getLastUpdater

        public User getLastUpdater()
        Description copied from interface: SilverpeasResource
        Gets the user that has lastly updated the resource. If the resource doesn't have such an information, then this method should return the user that has created the resource.
        Specified by:
        getLastUpdater in interface SilverpeasResource
        Returns:
        a User in Silverpeas.
      • getRemover

        public User getRemover()
      • 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
      • clearComponentSpaceQuotaCache

        public void clearComponentSpaceQuotaCache()
      • 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:
        true if the quota in storage space of the parent of this component instance is reached. False otherwise.
      • getComponentSpaceQuotaReachedErrorMessage

        public String getComponentSpaceQuotaReachedErrorMessage​(String language)
        Gets the error message about reached quota space of this component's father.
        Parameters:
        language - an ISO 631-1 code of the language.
        Returns:
        a localized error message to indicate a storage space quota is reached.
      • getDataStorageQuota

        public Quota getDataStorageQuota()
        Returns:
        the dataStorageQuota
      • clearDataStorageQuotaCache

        public void clearDataStorageQuotaCache()
      • 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:
        true if the storage space is reached for this component instance. False otherwise.
      • getDataStorageQuotaReachedErrorMessage

        public String getDataStorageQuotaReachedErrorMessage​(String language)
        Gets the error message about data storage space quota reached.
        Parameters:
        language - the ISO 631-1 code of the language.
        Returns:
        the localized error message for a reach storage quota space for a component instance.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isRemoved

        public boolean isRemoved()
      • canBeAccessedBy

        public boolean canBeAccessedBy​(User user)
        Description copied from interface: Securable
        Checks the given user can access this resource.
        Specified by:
        canBeAccessedBy in interface Securable
        Parameters:
        user - a user in Silverpeas.
        Returns:
        true if the user can access the data managed by this instance, false otherwise.
      • canBeModifiedBy

        public boolean canBeModifiedBy​(User user)
        Is the user can modify this collaboration space?
        Specified by:
        canBeModifiedBy in interface Securable
        Parameters:
        user - a user in Silverpeas.
        Returns:
        true if the user can both access this collaboration space and has management privilege on this space (by being either an administrator or a space manager)
      • canBeFiledInBy

        public boolean canBeFiledInBy​(User user)
        Can the user add spaces or component instances into this space?
        Specified by:
        canBeFiledInBy in interface Securable
        Parameters:
        user - a user in Silverpeas.
        Returns:
        true if he can, false otherwise.
        See Also:
        Securable.canBeFiledInBy(User)