Package org.ametys.web.site
Class SiteParameterWrapper<T>
- java.lang.Object
 - 
- org.ametys.runtime.model.CategorizedElementDefinitionWrapper<T>
 - 
- org.ametys.web.site.SiteParameterWrapper<T>
 
 
 
- 
- Type Parameters:
 T- Type of the element value
public class SiteParameterWrapper<T> extends CategorizedElementDefinitionWrapper<T>
Definition of aSiteparameter. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected Set<String>_siteTypesThe list of site types to which this parameter belongs, or null for no restriction.- 
Fields inherited from class org.ametys.runtime.model.CategorizedElementDefinitionWrapper
_definition, _displayCategory, _displayGroup, _position 
 - 
 
- 
Constructor Summary
Constructors Constructor Description SiteParameterWrapper()Default constructor.SiteParameterWrapper(SiteParameterWrapper<T> wrapperToCopy)Constructor by copying an existingSiteParameterWrapper. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getSiteTypes()Get the site type restriction, null for no restriction.booleanisInSiteType(String siteType)Test if the parameter is to appear in the specified site type.voidsetSiteTypes(Set<String> siteTypes)Set the site type restriction, null for no restriction.- 
Methods inherited from class org.ametys.runtime.model.CategorizedElementDefinitionWrapper
equals, getDefinition, getDisplayCategory, getDisplayGroup, getPosition, hashCode, setDefinition, setDisplayCategory, setDisplayGroup, setPosition, toString 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_siteTypes
protected Set<String> _siteTypes
The list of site types to which this parameter belongs, or null for no restriction. 
 - 
 
- 
Constructor Detail
- 
SiteParameterWrapper
public SiteParameterWrapper()
Default constructor. 
- 
SiteParameterWrapper
public SiteParameterWrapper(SiteParameterWrapper<T> wrapperToCopy)
Constructor by copying an existingSiteParameterWrapper.- Parameters:
 wrapperToCopy- TheSiteParameterWrapperto copy
 
 - 
 
- 
Method Detail
- 
getSiteTypes
public Set<String> getSiteTypes()
Get the site type restriction, null for no restriction.- Returns:
 - the site types or null for no restriction.
 
 
- 
setSiteTypes
public void setSiteTypes(Set<String> siteTypes)
Set the site type restriction, null for no restriction.- Parameters:
 siteTypes- the site types to set.
 
- 
isInSiteType
public boolean isInSiteType(String siteType)
Test if the parameter is to appear in the specified site type.- Parameters:
 siteType- the site type name (i.e. 'default', 'blog'...)- Returns:
 - true to appear, false otherwise.
 
 
 - 
 
 -