code: public static String getEditStateForNew(
          CmsObject cms,
          I_CmsResourceType resourceType,
          String contextPath,
          String modelFilePath,
          boolean plainText,
          String backLink) {
  
          String state = "";
  
          state = A_CmsWorkplaceApp.addParamToState(
              state,
              CmsXmlContentEditor.PARAM_NEWLINK,
              CmsJspTagEdit.getNewLink(cms, resourceType, contextPath));
  
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(modelFilePath)) {
              state = A_CmsWorkplaceApp.addParamToState(state, CmsWorkplace.PARAM_MODELFILE, modelFilePath);
              state = A_CmsWorkplaceApp.addParamToState(
                  state,
                  CmsEditorConstants.PARAM_MODE,
                  CmsEditorConstants.MODE_COPY);
          }
          state = A_CmsWorkplaceApp.addParamToState(state, CmsEditor.RESOURCE_PATH_PREFIX, contextPath);
          state = A_CmsWorkplaceApp.addParamToState(state, CmsEditor.PLAIN_TEXT_PREFIX, String.valueOf(plainText));
          try {
              backLink = URLEncoder.encode(backLink, CmsEncoder.ENCODING_UTF_8);
          } catch (UnsupportedEncodingException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
          state = A_CmsWorkplaceApp.addParamToState(state, CmsEditor.BACK_LINK_PREFIX, backLink);
  
          return state;
      }
docs: Returns the edit state for the given resource structure id.<p>
  
  @param cms the cms context
  @param resourceType the resource type to create
  @param contextPath the context path
  @param modelFilePath the model file path
  @param plainText if plain text/source editing is required
  @param backLink the back link location
  
  @return the state