Package: grails.doc

## [Groovy] Class LegacyDocMigrator

- grails.doc.LegacyDocMigrator

-     class LegacyDocMigrator
      extends java.lang.Object

  Migrates gdoc-based user guides from the old style, in which the section numbers are included in the filenames, and the new style which uses a YAML-based TOC file to organise the sections. It doesn't do a perfect job but it does a lot of the hard work and you can fine tune the generated gdocs afterwards.

  The migration will not only rename and restructure the gdoc files, but it will also generate a toc.yml file that reproduces the existing guide structure. Additional files include:

  - `links.yml` - a YAML file mapping new section names to the old ones. Ensures that URL fragments in old external links continue to work.
  - `rewriteRules.txt` - a simple text file that maps the old chapter HTML filenames to their new ones. Useful for creating Apache URL rewrite rules.

  The names of the new sections are based on the old section names, so they may not be ideal. Also, the new style requires that every section has a unique name, although the documentation publishing will pick up and warn of duplicates.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.String` | `EOL` |
    `private java.lang.Object` | `aliasMap` |
    `private java.lang.Object` | `guideSrcDir` |
    `private java.lang.Object` | `outDir` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `LegacyDocMigrator (java.io.File guideSrcDir, java.lang.Object aliasMap)`
    `LegacyDocMigrator (java.io.File guideSrcDir, java.io.File outDir, java.lang.Object aliasMap)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private java.lang.Object` | `alias(java.lang.Object section)`
    `` | `java.lang.Object` | `migrate()`
    `` | `private java.lang.Object` | `migrateSection(java.lang.Object section, java.lang.Object pathElements, java.lang.Object writer)`
    `` | `private java.lang.Object` | `naturalNameToCamelCase(java.lang.Object name)`
    `` | `private java.lang.Object` | `writeSectionToToc(java.lang.Object section, java.lang.Object writer, java.lang.Object indent)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private static final java.lang.String EOL

    - #### private java.lang.Object aliasMap

    - #### private java.lang.Object guideSrcDir

    - #### private java.lang.Object outDir

  - ### Constructor Detail

    - #### LegacyDocMigrator(java.io.File guideSrcDir, java.lang.Object aliasMap)

    - #### LegacyDocMigrator(java.io.File guideSrcDir, java.io.File outDir, java.lang.Object aliasMap)

  - ### Method Detail

    - #### private java.lang.Object alias(java.lang.Object section)

    - #### java.lang.Object migrate()

    - #### private java.lang.Object migrateSection(java.lang.Object section, java.lang.Object pathElements, java.lang.Object writer)

    - #### private java.lang.Object naturalNameToCamelCase(java.lang.Object name)

    - #### private java.lang.Object writeSectionToToc(java.lang.Object section, java.lang.Object writer, java.lang.Object indent)