- In the SAP Commerce Administration Console, go the Console tab, select the Scripting Languages option, and select Groovy in the Script type drop-down menu.
- Enter the Groovy script.
import de.hybris.platform.servicelayer.search.FlexibleSearchService
import de.hybris.platform.servicelayer.search.SearchResult
import de.hybris.platform.cms2.model.site.CMSSiteModel;
Map params = new HashMap();
String query = “select {p:pk} from {CMSSite as p } where {p:uid} in (‘DemoSite1′,’DemoSite2’)”
params = null;
FlexibleSearchService fss = spring.getBean(“flexibleSearchService”);
final SearchResult searchResult = fss.search(query, params);
for (final CMSSiteModel csmSite : searchResult.getResult()){
println csmSite.getUid()+” – “+csmSite.getUrlPatterns();
};