Skip to content

Commit

Permalink
gdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
igorrosenberg committed Nov 2, 2014
1 parent 03b22b3 commit 42a4b6d
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 53 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ curl -v -H "Content-Type: application/json" -d '{

## Screenshots

![Domain example](src/gdoc/0.2.5-domain.png)
![Domain example](src/docs/images/0.2.5-domain.png)

![Layers example](src/gdoc/0.2.5-layers.png)
![Layers example](src/docs/images/0.2.5-layers.png)

![Wizard example](src/gdoc/0.3.2-wizard.png)
![Wizard example](src/docs/images/0.3.2-wizard.png)

40 changes: 4 additions & 36 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
@@ -1,39 +1,7 @@
log4j = {
appenders {
file name:'appender', file:'/tmp/logs/classDomainUml.log'
}

// Set level for all application artifacts
info 'com.myapp',
'grails.app',
'grails.plugins' // plugins

error 'org.codehaus.groovy.grails',
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
}

// Uncomment and edit the following lines to start using Grails encoding & escaping improvements

/* remove this line
// GSP settings
grails {
views {
gsp {
encoding = 'UTF-8'
htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
codecs {
expression = 'html' // escapes values inside null
scriptlet = 'none' // escapes output from scriptlets in GSPs
taglib = 'none' // escapes output from taglibs
staticparts = 'none' // escapes output from static template parts
}
}
// escapes all not-encoded output at final stage of outputting
filteringCodecForContentType {
//'text/html' = 'html'
}
doc {
footer = "Developed by <a href='http://igor.rosenberg.free.fr/'>Igor Rosenberg</a>."
images = new File('src/docs/images')
}
}
remove this line */

14 changes: 0 additions & 14 deletions grails-app/conf/DataSource.groovy

This file was deleted.

19 changes: 19 additions & 0 deletions src/docs/guide/1. Introduction.gdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This plugins allows to generate UML diagrams for your Grails application.

Rendering is done via the integrated plantUML:http://plantuml.sourceforge.net/ library (without sending data on the internet).

The diagrams can be generated when the webapp is running
{code}
http://server:port/webapp/uml
{code}

Or before runtime
{code}
grails uml-class-diagram
{code}


The plugin is released under the "Apache License 2.0":http://www.apache.org/licenses/LICENSE-2.0.html license, source code is "available":http://grails.org/plugin/uml-class-diagram .

The data shown in the UML class diagrams is configurable.

24 changes: 24 additions & 0 deletions src/docs/guide/2. Online.gdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
When the webapp is running, the UML diagrams are exposed through the following URL:
{code}
http://server:port/webapp/uml
{code}

h3. HTML Form

An HTML form allows to configure the diagram data:

!0.3.2-wizard.png!

h3. HTTP access

The diagrams are available without using the online form, for example:

{code}
curl -v -H "Content-Type: application/json" -d '{
"fieldFilterRegexps"=["^id$","^version$"],
"classFilterRegexps"=[".*City"],
"diagramType"="DOMAIN",
"showCanonicalJavaClassNames"="false"
}' http://server:port/webapp/uml/draw
{code}

5 changes: 5 additions & 0 deletions src/docs/guide/3. Offline.gdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The UML diagrams can be generated before runtime
{code}
grails uml-class-diagram
{code}

12 changes: 12 additions & 0 deletions src/docs/guide/4. Configuration.gdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The data shown in the UML class diagrams is configurable.

h3. Configuration options

* @fieldFilterRegexps@: a list of String filters (interpreted as regular expressions) restricting the visibility of fields within classes, for example '^id$'
* @classFilterRegexps@: a list of String filters (interpreted as regular expressions) restricting the visibility of classes, for example '.*Race'
* @showCanonicalJavaClassNames@: boolean, removing the package prefix to Java classes (from the java API)
* @showGrailsInternalClasses@: boolean, removing Controllers and Services provided by the Grails framework
* @filterGrailsFields@: boolean
* @diagramType@: either 'DOMAIN' (uml class diagrams of the Grails Domain objects) or 'LAYERS' (uml class diagrams of the Grails Controllers and Services)
* @renderingEngine@: either 'LOCAL_PLANT_UML' (generate diagrams via embeded plantUML JAR), or 'WEB_PLANT_UML' (generate diagrams via online plantUML service)

File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 42a4b6d

Please sign in to comment.