HHH-11411 - Two column navigation and search box for documentation
This commit is contained in:
parent
e9707461ee
commit
0148ede638
|
@ -301,8 +301,15 @@ task renderUserGuide(type: AsciidoctorTask, group: 'Documentation') {
|
|||
backends "html5"
|
||||
separateOutputDirs false
|
||||
options logDocuments: true
|
||||
attributes icons: 'font', experimental: true, 'source-highlighter': 'prettify', linkcss: true, stylesheet: "css/hibernate.css", majorMinorVersion: rootProject.hibernateMajorMinorVersion, fullVersion: rootProject.hibernateFullVersion
|
||||
resources {
|
||||
attributes icons: 'font', experimental: true,
|
||||
'source-highlighter': 'prettify',
|
||||
linkcss: true,
|
||||
stylesheet: "css/hibernate.css",
|
||||
majorMinorVersion: rootProject.hibernateMajorMinorVersion,
|
||||
fullVersion: rootProject.hibernateFullVersion,
|
||||
docinfo: true
|
||||
|
||||
resources {
|
||||
from('src/main/asciidoc/userguide/') {
|
||||
include 'images/**'
|
||||
}
|
||||
|
@ -312,6 +319,9 @@ task renderUserGuide(type: AsciidoctorTask, group: 'Documentation') {
|
|||
from('src/main/style/asciidoctor') {
|
||||
include 'css/**'
|
||||
}
|
||||
from('src/main/style/asciidoctor') {
|
||||
include 'js/**'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.1/jstree.min.js"></script>
|
||||
|
||||
<script src="js/toc.js"></script>
|
|
@ -1,6 +1,6 @@
|
|||
= Hibernate ORM {fullVersion} User Guide
|
||||
Vlad Mihalcea, Steve Ebersole, Andrea Boriero, Gunnar Morling, Gail Badner, Chris Cranford, Emmanuel Bernard, Sanne Grinovero, Brett Meyer, Hardy Ferentschik, Gavin King, Christian Bauer, Max Rydahl Andersen, Karel Maesen, Radim Vansa, Louis Jacomet
|
||||
:toc:
|
||||
:toc2:
|
||||
:toclevels: 3
|
||||
|
||||
include::Preface.adoc[]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -184,81 +184,112 @@ include::{sourcedir}/DefaultAuditTest.java[tags=envers-audited-rev4-example]
|
|||
See the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/envers/AuditReader.html[Javadocs] for details on other functionality offered.
|
||||
|
||||
[[envers-configuration]]
|
||||
=== Configuration
|
||||
=== Configuration Properties
|
||||
|
||||
It is possible to configure various aspects of Hibernate Envers behavior, such as table names, etc.
|
||||
|
||||
.Envers Configuration Properties
|
||||
[width="100%",cols="34%,33%,33%",options="header",]
|
||||
|=======================================================================
|
||||
|Property name |Default value |Description
|
||||
|`org.hibernate.envers.audit_table_prefix` | |String that will be prepended to the name of an audited entity to create the name of the entity and that will hold audit information.
|
||||
`*org.hibernate.envers.audit_table_prefix*`::
|
||||
String that will be prepended to the name of an audited entity to create the name of the entity and that will hold audit information.
|
||||
|
||||
|`org.hibernate.envers.audit_table_suffix` |`_AUD` |String that will be appended to the name of an audited entity to create the name of the entity and that will hold audit information.
|
||||
If you audit an entity with a table name Person, in the default setting Envers will generate a `Person_AUD` table to store historical data.
|
||||
`*org.hibernate.envers.audit_table_suffix`* (default: `_AUD`)::
|
||||
String that will be appended to the name of an audited entity to create the name of the entity and that will hold audit information.
|
||||
+
|
||||
If you audit an entity with a table name Person, in the default setting Envers will generate a `Person_AUD` table to store historical data.
|
||||
|
||||
|`org.hibernate.envers.revision_field_name` |`REV` |Name of a field in the audit entity that will hold the revision number.
|
||||
`*org.hibernate.envers.revision_field_name*` (default: `REV`)::
|
||||
Name of a field in the audit entity that will hold the revision number.
|
||||
|
||||
|`org.hibernate.envers.revision_type_field_name` |`REVTYPE` |Name of a field in the audit entity that will hold the type of the revision (currently, this can be: `add`, `mod`, `del`).
|
||||
`*org.hibernate.envers.revision_type_field_name*` (default: `REVTYPE` )::
|
||||
Name of a field in the audit entity that will hold the type of the revision (currently, this can be: `add`, `mod`, `del`).
|
||||
|
||||
|`org.hibernate.envers.revision_on_collection_change` |`true` |Should a revision be generated when a not-owned relation field changes (this can be either a collection in a one-to-many relation, or the field using `mappedBy` attribute in a one-to-one relation).
|
||||
`*org.hibernate.envers.revision_on_collection_change*` (default: `true` )::
|
||||
Should a revision be generated when a not-owned relation field changes (this can be either a collection in a one-to-many relation, or the field using `mappedBy` attribute in a one-to-one relation).
|
||||
|
||||
|`org.hibernate.envers.do_not_audit_optimistic_locking_field` |`true` |When true, properties to be used for optimistic locking, annotated with `@Version`, will not be automatically audited (their history won't be stored; it normally doesn't make sense to store it).
|
||||
`*org.hibernate.envers.do_not_audit_optimistic_locking_field*` (default: `true` )::
|
||||
When true, properties to be used for optimistic locking, annotated with `@Version`, will not be automatically audited (their history won't be stored; it normally doesn't make sense to store it).
|
||||
|
||||
|`org.hibernate.envers.store_data_at_delete` |`false` |Should the entity data be stored in the revision when the entity is deleted (instead of only storing the id and all other properties as null).
|
||||
This is not normally needed, as the data is present in the last-but-one revision.
|
||||
Sometimes, however, it is easier and more efficient to access it in the last revision (then the data that the entity contained before deletion is stored twice).
|
||||
`*org.hibernate.envers.store_data_at_delete*` (default: `false` )::
|
||||
Should the entity data be stored in the revision when the entity is deleted (instead of only storing the id and all other properties as null).
|
||||
+
|
||||
This is not normally needed, as the data is present in the last-but-one revision.
|
||||
Sometimes, however, it is easier and more efficient to access it in the last revision (then the data that the entity contained before deletion is stored twice).
|
||||
|
||||
|`org.hibernate.envers.default_schema` |`null` (same schema as table being audited) |The default schema name that should be used for audit tables.
|
||||
Can be overridden using the `@AuditTable( schema="..." )` annotation.
|
||||
If not present, the schema will be the same as the schema of the table being audited.
|
||||
`*org.hibernate.envers.default_schema*` (default: `null` - same schema as table being audited)::
|
||||
The default schema name that should be used for audit tables.
|
||||
+
|
||||
Can be overridden using the `@AuditTable( schema="..." )` annotation.
|
||||
+
|
||||
If not present, the schema will be the same as the schema of the table being audited.
|
||||
|
||||
|`org.hibernate.envers.default_catalog` |`null` (same catalog as table being audited) |The default catalog name that should be used for audit tables.
|
||||
Can be overridden using the `@AuditTable( catalog="..." )` annotation. If not present, the catalog will be the same as the catalog of the normal tables.
|
||||
`*org.hibernate.envers.default_catalog*` (default: `null` - same catalog as table being audited)::
|
||||
The default catalog name that should be used for audit tables.
|
||||
+
|
||||
Can be overridden using the `@AuditTable( catalog="..." )` annotation.
|
||||
+
|
||||
If not present, the catalog will be the same as the catalog of the normal tables.
|
||||
|
||||
|`org.hibernate.envers.audit_strategy`|`org.hibernate.envers.strategy.DefaultAuditStrategy` |The audit strategy that should be used when persisting audit data.
|
||||
The default stores only the revision, at which an entity was modified.
|
||||
An alternative, the `org.hibernate.envers.strategy.ValidityAuditStrategy` stores both the start revision and the end revision.
|
||||
Together these define when an audit row was valid, hence the name ValidityAuditStrategy.
|
||||
`*org.hibernate.envers.audit_strategy*`(default: `org.hibernate.envers.strategy.DefaultAuditStrategy` )::
|
||||
The audit strategy that should be used when persisting audit data.
|
||||
The default stores only the revision, at which an entity was modified.
|
||||
+
|
||||
An alternative, the `org.hibernate.envers.strategy.ValidityAuditStrategy` stores both the start revision and the end revision.
|
||||
Together these define when an audit row was valid, hence the name ValidityAuditStrategy.
|
||||
|
||||
|`org.hibernate.envers.audit_strategy_validity_end_rev_field_name` |`REVEND`|The column name that will hold the end revision number in audit entities.
|
||||
This property is only valid if the validity audit strategy is used.
|
||||
`*org.hibernate.envers.audit_strategy_validity_end_rev_field_name*` (default: `REVEND`)::
|
||||
The column name that will hold the end revision number in audit entities.
|
||||
This property is only valid if the validity audit strategy is used.
|
||||
|
||||
|`org.hibernate.envers.audit_strategy_validity_store_revend_timestamp`|`false` |Should the timestamp of the end revision be stored, until which the data was valid, in addition to the end revision itself.
|
||||
This is useful to be able to purge old Audit records out of a relational database by using table partitioning.
|
||||
Partitioning requires a column that exists within the table.
|
||||
This property is only evaluated if the `ValidityAuditStrategy` is used.
|
||||
`*org.hibernate.envers.audit_strategy_validity_store_revend_timestamp*`(default: `false` )::
|
||||
Should the timestamp of the end revision be stored, until which the data was valid, in addition to the end revision itself.
|
||||
This is useful to be able to purge old Audit records out of a relational database by using table partitioning.
|
||||
+
|
||||
Partitioning requires a column that exists within the table.
|
||||
This property is only evaluated if the `ValidityAuditStrategy` is used.
|
||||
|
||||
|`org.hibernate.envers.audit_strategy_validity_revend_timestamp_field_name`|`REVEND_TSTMP` |Column name of the timestamp of the end revision until which the data was valid.
|
||||
Only used if the 1ValidityAuditStrategy1 is used, and `org.hibernate.envers.audit_strategy_validity_store_revend_timestamp` evaluates to true
|
||||
`*org.hibernate.envers.audit_strategy_validity_revend_timestamp_field_name*`(default: `REVEND_TSTMP` )::
|
||||
Column name of the timestamp of the end revision until which the data was valid.
|
||||
Only used if the `ValidityAuditStrategy` is used, and `org.hibernate.envers.audit_strategy_validity_store_revend_timestamp` evaluates to true
|
||||
|
||||
|`org.hibernate.envers.use_revision_entity_with_native_id` |`true` | Boolean flag that determines the strategy of revision number generation.
|
||||
Default implementation of revision entity uses native identifier generator.
|
||||
If current database engine does not support identity columns, users are advised to set this property to false.
|
||||
In this case revision numbers are created by preconfigured `org.hibernate.id.enhanced.SequenceStyleGenerator`.
|
||||
See: `org.hibernate.envers.DefaultRevisionEntity` and `org.hibernate.envers.enhanced.SequenceIdRevisionEntity`.
|
||||
`*org.hibernate.envers.use_revision_entity_with_native_id*` (default: `true` )::
|
||||
Boolean flag that determines the strategy of revision number generation.
|
||||
Default implementation of revision entity uses native identifier generator.
|
||||
+
|
||||
If current database engine does not support identity columns, users are advised to set this property to false.
|
||||
+
|
||||
In this case revision numbers are created by preconfigured `org.hibernate.id.enhanced.SequenceStyleGenerator`.
|
||||
See: `org.hibernate.envers.DefaultRevisionEntity` and `org.hibernate.envers.enhanced.SequenceIdRevisionEntity`.
|
||||
|
||||
|`org.hibernate.envers.track_entities_changed_in_revision` |`false` |Should entity types, that have been modified during each revision, be tracked.
|
||||
The default implementation creates `REVCHANGES` table that stores entity names of modified persistent objects.
|
||||
Single record encapsulates the revision identifier (foreign key to `REVINFO` table) and a string value.
|
||||
For more information, refer to <<envers-tracking-modified-entities-revchanges>> and <<envers-tracking-modified-entities-queries>>.
|
||||
`*org.hibernate.envers.track_entities_changed_in_revision*` (default: `false` )::
|
||||
Should entity types, that have been modified during each revision, be tracked.
|
||||
The default implementation creates `REVCHANGES` table that stores entity names of modified persistent objects.
|
||||
Single record encapsulates the revision identifier (foreign key to `REVINFO` table) and a string value.
|
||||
For more information, refer to <<envers-tracking-modified-entities-revchanges>> and <<envers-tracking-modified-entities-queries>>.
|
||||
|
||||
|`org.hibernate.envers.global_with_modified_flag` |`false`, can be individually overridden with `@Audited( withModifiedFlag=true )` |Should property modification flags be stored for all audited entities and all properties.
|
||||
When set to true, for all properties an additional boolean column in the audit tables will be created, filled with information if the given property changed in the given revision.
|
||||
When set to false, such column can be added to selected entities or properties using the `@Audited` annotation.
|
||||
For more information, refer to <<envers-tracking-properties-changes>> and <<envers-tracking-properties-changes-queries>>.
|
||||
`*org.hibernate.envers.global_with_modified_flag*` (default: `false`, can be individually overridden with `@Audited( withModifiedFlag=true )` )::
|
||||
Should property modification flags be stored for all audited entities and all properties.
|
||||
+
|
||||
When set to true, for all properties an additional boolean column in the audit tables will be created, filled with information if the given property changed in the given revision.
|
||||
+
|
||||
When set to false, such column can be added to selected entities or properties using the `@Audited` annotation.
|
||||
+
|
||||
For more information, refer to <<envers-tracking-properties-changes>> and <<envers-tracking-properties-changes-queries>>.
|
||||
|
||||
|`org.hibernate.envers.modified_flag_suffix` |`_MOD` |The suffix for columns storing "Modified Flags".
|
||||
For example: a property called "age", will by default get modified flag with column name "age_MOD".
|
||||
`*org.hibernate.envers.modified_flag_suffix*` (default: `_MOD` )::
|
||||
The suffix for columns storing "Modified Flags".
|
||||
+
|
||||
For example: a property called "age", will by default get modified flag with column name "age_MOD".
|
||||
|
||||
|`org.hibernate.envers.embeddable_set_ordinal_field_name` |`SETORDINAL` |Name of column used for storing ordinal of the change in sets of embeddable elements.
|
||||
`*org.hibernate.envers.embeddable_set_ordinal_field_name*` (default: `SETORDINAL` )::
|
||||
Name of column used for storing ordinal of the change in sets of embeddable elements.
|
||||
|
||||
|`org.hibernate.envers.cascade_delete_revision` |`false` |While deleting revision entry, remove data of associated audited entities. Requires database support for cascade row removal.
|
||||
`*org.hibernate.envers.cascade_delete_revision*` (default: `false` )::
|
||||
While deleting revision entry, remove data of associated audited entities. Requires database support for cascade row removal.
|
||||
|
||||
|`org.hibernate.envers.allow_identifier_reuse` |`false` |Guarantees proper validity audit strategy behavior when application reuses identifiers of deleted entities. Exactly one row with `null` end date exists for each identifier.
|
||||
`*org.hibernate.envers.allow_identifier_reuse*` (default: `false` )::
|
||||
Guarantees proper validity audit strategy behavior when application reuses identifiers of deleted entities. Exactly one row with `null` end date exists for each identifier.
|
||||
|
||||
|`org.hibernate.envers.original_id_prop_name` |`originalId` |Specifies the composite-id key property name used by the audit table mappings.
|
||||
|=======================================================================
|
||||
`*org.hibernate.envers.original_id_prop_name*` (default: `originalId` )::
|
||||
Specifies the composite-id key property name used by the audit table mappings.
|
||||
|
||||
[IMPORTANT]
|
||||
====
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -7,7 +7,6 @@ audio:not([controls]){display:none;height:0}
|
|||
[hidden],template{display:none}
|
||||
script{display:none!important}
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
|
||||
body{margin:0}
|
||||
a{background:transparent}
|
||||
a:focus{outline:thin dotted}
|
||||
a:active,a:hover{outline:0}
|
||||
|
@ -42,7 +41,7 @@ textarea{overflow:auto;vertical-align:top}
|
|||
table{border-collapse:collapse;border-spacing:0}
|
||||
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
|
||||
html,body{font-size:100%}
|
||||
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto}
|
||||
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin-top:30px;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto}
|
||||
a:hover{cursor:pointer}
|
||||
img,object,embed{max-width:100%;height:auto}
|
||||
object,embed{height:100%}
|
||||
|
|
|
@ -5,8 +5,6 @@ body{
|
|||
background-repeat: repeat-x !important;
|
||||
background-size: 300px 300px;
|
||||
color:#333 !important;
|
||||
padding:25px !important;
|
||||
margin:0 !important;
|
||||
font-family:"Noto Serif","DejaVu Serif",serif !important;
|
||||
font-weight:400 !important;
|
||||
font-style:normal !important;
|
||||
|
@ -16,6 +14,7 @@ body{
|
|||
}
|
||||
body:before {
|
||||
content: url(../images/org/hibernate/logo_smaller.png);
|
||||
padding:25px;
|
||||
}
|
||||
#header {
|
||||
width: 1000px !important;
|
||||
|
@ -97,7 +96,6 @@ h4,h5,h6{
|
|||
border-radius: 1em !important;
|
||||
width: 100% !important;
|
||||
padding: 2em 0em 2em 0em !important;
|
||||
margin: 2em 2em 2em 2em !important;
|
||||
}
|
||||
td.icon {
|
||||
display:block !important;
|
||||
|
@ -110,7 +108,7 @@ td.content {
|
|||
.admonitionblock .icon [class^="fa icon-tip"]{
|
||||
background-image: url(../images/org/hibernate/docbook/tip.png) !important;
|
||||
background-repeat: no-repeat !important;
|
||||
margin: 1em 2em 1em 1em !important;
|
||||
margin: 0.5em !important;
|
||||
background-position: center !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
|
@ -119,7 +117,7 @@ td.content {
|
|||
.admonitionblock td.icon [class^="fa icon-note"]{
|
||||
background-image: url(../images/org/hibernate/docbook/note.png)!important;
|
||||
background-repeat: no-repeat !important;
|
||||
margin: 1em 2em 1em 1em !important;
|
||||
margin: 0.5em !important;
|
||||
background-position: center !important;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
|
@ -128,7 +126,7 @@ td.content {
|
|||
.admonitionblock td.icon [class^="fa icon-warning"]{
|
||||
background-image: url(../images/org/hibernate/docbook/warning.png) !important;
|
||||
background-repeat: no-repeat !important;
|
||||
margin: 1em 2em 1em 1em !important;
|
||||
margin: 0.5em !important;
|
||||
background-position: center !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
|
@ -146,7 +144,7 @@ td.content {
|
|||
.admonitionblock td.icon [class^="fa icon-important"]{
|
||||
background-image: url(../images/org/hibernate/docbook/important.png) !important;
|
||||
background-repeat: no-repeat !important;
|
||||
margin: 1em 2em 1em 1em !important;
|
||||
margin: 0.5em !important;
|
||||
background-position: center !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
|
@ -182,19 +180,13 @@ ul {
|
|||
padding-bottom:.25em !important;
|
||||
}
|
||||
.sectlevel1{
|
||||
font-weight: bolder !important;
|
||||
margin-left: 1.5em !important;
|
||||
display: none;
|
||||
}
|
||||
.sectlevel2{
|
||||
margin-left: 3em !important;
|
||||
padding-top: .5em;
|
||||
padding-bottom: .5em;
|
||||
font-weight: normal;
|
||||
display: none;
|
||||
}
|
||||
.sectlevel3{
|
||||
margin-left: 3em !important;
|
||||
padding-top: .5em !important;
|
||||
padding-bottom: .5em!important;
|
||||
display: none;
|
||||
}
|
||||
.exampleblock>.title{
|
||||
text-rendering:optimizeLegibility !important;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
@import url("hibernate-fonts.css");
|
||||
@import url("hibernate-layout.css");
|
||||
@import url("asciidoctor.css");
|
||||
@import url("asciidoctor.css");
|
||||
@import url("jstree-style.css");
|
||||
@import url("32px.png");
|
||||
@import url("40px.png");
|
||||
@import url("throbber.gif");
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,22 @@
|
|||
$(document).ready(function() {
|
||||
$('ul.sectlevel1').wrap('<div id="toctree"></div>');
|
||||
|
||||
$('#toctree').jstree({
|
||||
"core" : {
|
||||
"themes" : {"variant" : "small", "icons" : false}
|
||||
},
|
||||
"plugins" : [ "search", "state", "wholerow" ] })
|
||||
.on("activate_node.jstree", function (e, data) { location.href = data.node.a_attr.href; });
|
||||
$('#toctree').before('<input placeholder=" Search" id="tocsearch" type="text">');
|
||||
var searchTimeout = false;
|
||||
$('#tocsearch').keyup(function () {
|
||||
if(searchTimeout) { clearTimeout(searchTimeout); }
|
||||
searchTimeout = setTimeout(function () {
|
||||
var v = $('#tocsearch').val();
|
||||
$('#toctree').jstree(true).search(v);
|
||||
}, 250);
|
||||
});
|
||||
$('#tocsearch').after('<a href="#" id="toctreeexpand" title="Expand"><i class="fa fa-plus-square" aria-hidden="true"></i></a><a href="#" id="toctreecollapse" title="Collapse"><i class="fa fa-minus-square" aria-hidden="true"></i></a>');
|
||||
$('#toctreeexpand').click(function() { $('#toctree').jstree('open_all'); });
|
||||
$('#toctreecollapse').click(function() { $('#toctree').jstree('close_all'); });
|
||||
});
|
Loading…
Reference in New Issue