Class SiteContext
- java.lang.Object
-
- org.ametys.web.frontoffice.search.instance.model.SiteContext
-
public class SiteContext extends Object
A site context
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>
_siteIds
private SiteManager
_siteManager
private SiteContextType
_type
-
Constructor Summary
Constructors Constructor Description SiteContext(SiteContextType type, List<String> sites, SiteManager siteManager)
Creates a SiteContext
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Optional<List<Site>>
getSites()
Gets the sites.SiteContextType
getType()
Gets the typeint
hashCode()
-
-
-
Field Detail
-
_type
private SiteContextType _type
-
_siteManager
private SiteManager _siteManager
-
-
Constructor Detail
-
SiteContext
public SiteContext(SiteContextType type, List<String> sites, SiteManager siteManager)
Creates a SiteContext- Parameters:
type
- the typesites
- the sites. Must be non-null if type isSiteContextType.AMONG
, must be null otherwise.siteManager
- The site manager
-
-
Method Detail
-
getType
public SiteContextType getType()
Gets the type- Returns:
- the type
-
getSites
public Optional<List<Site>> getSites()
Gets the sites. Must be non-empty ifgetType()
returnsSiteContextType.AMONG
, must be empty otherwise.- Returns:
- the sites
-
-