code: public static String generateState(CmsSearchReplaceSettings settings) {
  
          String state = "";
          state = A_CmsWorkplaceApp.addParamToState(state, SITE_ROOT, settings.getSiteRoot());
          state = A_CmsWorkplaceApp.addParamToState(state, SEARCH_TYPE, settings.getType().name());
          state = A_CmsWorkplaceApp.addParamToState(state, SEARCH_PATTERN, settings.getSearchpattern());
          if (!settings.getPaths().isEmpty()) {
              state = A_CmsWorkplaceApp.addParamToState(state, FOLDER, settings.getPaths().get(0));
          }
          state = A_CmsWorkplaceApp.addParamToState(state, RESOURCE_TYPE, settings.getTypes());
          state = A_CmsWorkplaceApp.addParamToState(state, LOCALE, settings.getLocale());
          state = A_CmsWorkplaceApp.addParamToState(state, QUERY, settings.getQuery());
          state = A_CmsWorkplaceApp.addParamToState(state, INDEX, settings.getSource());
          state = A_CmsWorkplaceApp.addParamToState(state, XPATH, settings.getXpath());
          state = A_CmsWorkplaceApp.addParamToState(state, IGNORE_SUBSITES, String.valueOf(settings.ignoreSubSites()));
          state = A_CmsWorkplaceApp.addParamToState(state, PROPERTY, settings.getProperty().getName());
  
          return state;
      }
docs: Generates the state string for the given search settings.<p>
  
  @param settings the search settings
  
  @return the state string