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>_siteIdsprivate SiteManager_siteManagerprivate 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 booleanequals(Object obj)Optional<List<Site>>getSites()Gets the sites.SiteContextTypegetType()Gets the typeinthashCode()
-
-
-
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
-
-