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
Definition of a
Site
parameter.-
Field Summary
Modifier and TypeFieldDescriptionThe 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
ConstructorDescriptionDefault constructor.SiteParameterWrapper
(SiteParameterWrapper<T> wrapperToCopy) Constructor by copying an existingSiteParameterWrapper
. -
Method Summary
Modifier and TypeMethodDescriptionGet the site type restriction, null for no restriction.boolean
isInSiteType
(String siteType) Test if the parameter is to appear in the specified site type.void
setSiteTypes
(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 Details
-
_siteTypes
The list of site types to which this parameter belongs, or null for no restriction.
-
-
Constructor Details
-
SiteParameterWrapper
public SiteParameterWrapper()Default constructor. -
SiteParameterWrapper
Constructor by copying an existingSiteParameterWrapper
.- Parameters:
wrapperToCopy
- TheSiteParameterWrapper
to copy
-
-
Method Details
-
getSiteTypes
Get the site type restriction, null for no restriction.- Returns:
- the site types or null for no restriction.
-
setSiteTypes
Set the site type restriction, null for no restriction.- Parameters:
siteTypes
- the site types to set.
-
isInSiteType
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.
-