How to get Url Patterns for Particular Site using Groovy Script in Hybris?

  1. 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.
  2. Enter the Groovy script.


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 =, params);
for (final CMSSiteModel csmSite : searchResult.getResult()){
println csmSite.getUid()+” – “+csmSite.getUrlPatterns();

Leave a Comment

Your email address will not be published. Required fields are marked *