Skip to content

Commit

Permalink
fixing image links in asciidoc paths
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltauil authored and gastaldi committed May 18, 2015
1 parent 8b9c94b commit ea30172
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
16 changes: 8 additions & 8 deletions tutorials/forge-hol/docs/chapters/developing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You will see Forge executing line by line each command in a few seconds. So what

The good thing about the http://www.oracle.com/technetwork/java/petstore1-3-1-02-139690.html[Java Petstore] is that we don't have to explain it much: most of us have heard about it. Haven't You?

image::developing/petstore-splash.png[title="Petstore splash" align="center"]
image::../images/developing/petstore-splash.png[title="Petstore splash" align="center"]

The Java Petstore was a sample application created by Sun for its http://www.oracle.com/technetwork/java/javaee/blueprints/index.html[Java BluePrints] program. The Java Petstore was designed to illustrate how J2EE (and then Java EE) could be used to develop an eCommerce web application. Yes, the point of the Petstore is to sell pets online. The Petstore had a huge momentum and we started to see plenty of Petstore-like applications flourish. The idea was to build an application with a certain technology. Let's face it, the J2EE version was far too complex using plenty of (today outdated) http://java.sun.com/blueprints/corej2eepatterns/[design patterns].

Expand Down Expand Up @@ -80,7 +80,7 @@ Before deploying the application on http://www.wildfly.org/[WildFly] you can gra

Then, just deploy the war file into WildFly, go to the URL http://localhost:8080/petstore and you should see the following homepage :

image::developing/petstore-forge.png[title="Petstore home page" align="center"]
image::../images/developing/petstore-forge.png[title="Petstore home page" align="center"]

Do not hesitate to browse the database content, create new items, remove customers, filter addresses, update categories... JBoss Forge has just created an entire CRUD web application for our domain model dealing with all the many-to-one, one-to-one... relationships.

Expand Down Expand Up @@ -136,7 +136,7 @@ $ project-new --named envers --type addon --topLevelPackage org.jboss.forge.addo

If you run Forge from JBDS, open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) then select _Project: New_ and specify _envers_ as project name, _org.jboss.forge.addon_ as top level package, enter project location per your preference and as a Project type select _Forge Addon_:

image::developing/forge-new-project.png[title="Creating new addon project"]
image::../images/developing/forge-new-project.png[title="Creating new addon project"]

This will create a skeleton Maven project that has the following artifacts:

Expand All @@ -161,7 +161,7 @@ If you are running from the command line interface, type in: +
In JBDS, open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac), then choose _Addon: New UI Command_
and enter _EnversSetupCommand_ in the Type Name field, _Envers: Setup_ in the Command Name field and add _Auditing_ to the Categories list box: +

image::developing/forge-envers-setup-command.png[title="Creating _Envers: Setup_ command"]
image::../images/developing/forge-envers-setup-command.png[title="Creating _Envers: Setup_ command"]

This will generate the `EnversSetupCommand` class in the `org.jboss.forge.addon.commands` package (unless you specify a different package). Forge makes this new command class extend `AbstractUICommand`, which provides some basic functionality like configuring the command name, the command dialog and the command execution. We will go through these in this and the next few sections. +

Expand Down Expand Up @@ -290,7 +290,7 @@ We will create the class for the new command in the same way that we created the

Or alternatively in the JBDS choose _Addon: New UI Command_, enter _EnversAuditEntityCommand_ in the Type Name field, _Envers: Audit entity_ in the Command name field and add _Auditing_ to the Categories list box: +

image::developing/forge-envers-audit-entity-command.png[title="Creating _Envers: Audit entity_ command"]
image::../images/developing/forge-envers-audit-entity-command.png[title="Creating _Envers: Audit entity_ command"]

Then open the newly created class and make it extend `AbstractProjectCommand` instead of `AbstractUICommand` and also add the unimplemented methods the way you did it in the setup command. +

Expand Down Expand Up @@ -453,12 +453,12 @@ $ addon-build-and-install --projectRoot <path-to-the-addon-sources>

In JBDS, either select the addon project before running the command, or specify the correct path in the command dialog:

image::developing/addon-project-root.png[title="Specifying the addon project location"]
image::../images/developing/addon-project-root.png[title="Specifying the addon project location"]

This will trigger a build of the addon, and if it is successful, Forge will install it in its addon repository. You don't have to restart the tool; Forge it will automatically load the new software once it is deployed. After
you see the success message, you can re-run the Forge quick access menu and will see the new command in the command list:

image::developing/forge-envers-setup-command-wizard.png[title="_Envers: Setup_ command in the _Auditing_ category"]
image::../images/developing/forge-envers-setup-command-wizard.png[title="_Envers: Setup_ command in the _Auditing_ category"]

Now you can set up Hibernate Envers and open one of the JPA entities that you generated before starting to develop
this addon, e.g. Country. You should be able to call now the other command. In the CLI:
Expand All @@ -470,7 +470,7 @@ this addon, e.g. Country. You should be able to call now the other command. In t

Or in JBDS press Ctrl + 4 (or CMD + 4 on Mac) and then pick the _Envers: Audit entity_ from the command menu. Notice that the class that you opened in the editor (`org.jboss.forge.hol.petstore.model.Country`) was selected automatically for you:

image::developing/audit-entity.png[title="_Envers: Audit entity_ command dialog"]
image::../images/developing/audit-entity.png[title="_Envers: Audit entity_ command dialog"]

Just hit Enter and the entity will get the `@Audited` annotation. +

Expand Down
24 changes: 12 additions & 12 deletions tutorials/forge-hol/docs/chapters/installing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Follow these steps to install a Forge distribution:
Extract the distribution archive, to the directory you wish to install Forge. +
Add the `FORGE_HOME` environment variable.

image::installing/windows/forge-cli-install1.png[title="Installing Forge CLI Step 1"]
image::../images/installing/windows/forge-cli-install1.png[title="Installing Forge CLI Step 1"]

In the same dialog, add `%FORGE_HOME%\bin` to the system path.

image::installing/windows/forge-cli-install2.png[title="Installing Forge CLI Step 2"]
image::../images/installing/windows/forge-cli-install2.png[title="Installing Forge CLI Step 2"]

Now open a system `cmd` or `command` prompt and run JBoss Forge by typing the `forge` command.

Expand Down Expand Up @@ -71,19 +71,19 @@ This will launch the installation process for your platform (Windows, Linux and
are supported). The wizard will take you through a number of consecutive steps that are
illustrated using screenshots below.

image::installing/jbds-install-1.png[title="JBDS Installation Step 1"]
image::installing/jbds-install-2.png[title="JBDS Installation Step 2"]
image::installing/jbds-install-3.png[title="JBDS Installation Step 3"]
image::installing/jbds-install-4.png[title="JBDS Installation Step 4"]
image::installing/jbds-install-5.png[title="JBDS Installation Step 5"]
image::installing/jbds-install-6.png[title="JBDS Installation Step 6"]
image::installing/jbds-install-7.png[title="JBDS Installation Step 7"]
image::installing/jbds-install-9.png[title="JBDS Installation Step 9"]
image::../images/installing/jbds-install-1.png[title="JBDS Installation Step 1"]
image::../images/installing/jbds-install-2.png[title="JBDS Installation Step 2"]
image::../images/installing/jbds-install-3.png[title="JBDS Installation Step 3"]
image::../images/installing/jbds-install-4.png[title="JBDS Installation Step 4"]
image::../images/installing/jbds-install-5.png[title="JBDS Installation Step 5"]
image::../images/installing/jbds-install-6.png[title="JBDS Installation Step 6"]
image::../images/installing/jbds-install-7.png[title="JBDS Installation Step 7"]
image::../images/installing/jbds-install-9.png[title="JBDS Installation Step 9"]

Congratulations! Now you are all set! Pressing `Done` will automatically launch JBDS.

image::installing/workspace.png[title="Choose Workspace"]
image::../images/installing/workspace.png[title="Choose Workspace"]

Choose an appropriate workspace and press `OK` to see JBDS in all its glory.

image::installing/jbds-welcome.png[title="JBDS Welcome"]
image::../images/installing/jbds-welcome.png[title="JBDS Welcome"]
48 changes: 24 additions & 24 deletions tutorials/forge-hol/docs/chapters/using.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ project-new --named cdbookstore --topLevelPackage com.example.project --target
If you run Forge from JBDS, open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) then select Project: New and specify _cdbookstore_ as project name,
_com.example_ as top level package, enter project location per your preference:

image::using/new-project.png[title="Creating new project"]
image::../images/using/new-project.png[title="Creating new project"]

=== Setting up persistence and validation

Expand Down Expand Up @@ -153,22 +153,22 @@ you should choose _JPA: New Entity_ and you'll see a JPA configuration window. T

In first step you need setup JPA in your project:

image::using/jpa-setup.png[title="Setup JPA"]
image::../images/using/jpa-setup.png[title="Setup JPA"]

The next step you need configure your connection settings:

image::using/configure-connection-settings.png[title="Configuring Connection Settings"]
image::../images/using/configure-connection-settings.png[title="Configuring Connection Settings"]

After the configuration step, you can create your first entity. +
Enter _Book_ as Entity name, _org.cdbookstore.model_ in Target package and click Finish.

image::using/jpa-new-entity.png[title="Creating a new Entity"]
image::../images/using/jpa-new-entity.png[title="Creating a new Entity"]

Then you need add fields to your Entity. After opening the Forge wizard (Ctrl + 4 or CMD + 4 on Mac), you should
choose _JPA: New Field_ and select the _Book_ as Target entity, _title_ as Field Name, _String_ as Type and click
Finish:

image::using/new-field.png[title="Creating a new field in Entity"]
image::../images/using/new-field.png[title="Creating a new field in Entity"]

Repeat the step to create all field's Book class:
[source]
Expand All @@ -183,7 +183,7 @@ Now you need to specify that a book is written in a certain language.
We'll create a Java enum and then have it as a JPA Enumerated in the Book entity. After opening the Forge wizard (Ctrl + 4 or CMD + 4 on Mac), you should
choose _Java: New Enum_ and enter _org.cdbookstore.model_ in Package name and _Language_ in Type Name:

image::using/new-enum.png[title="Creating a new Enum"]
image::../images/using/new-enum.png[title="Creating a new Enum"]

Now you need add new constants to it. After opening the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) you should choose _Java: New Enum Const_
and add all consts, this case:
Expand All @@ -195,11 +195,11 @@ FRENCH

and click Finish:

image::using/new-enum-const.png[title="Creating a new Enum Constant"]
image::../images/using/new-enum-const.png[title="Creating a new Enum Constant"]

Now, you need add this enum as field in book. After opening the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) you should choose _JPA: New Field_ and select the _Book_ as Target Entity, enter _language_ as Field name and select _org.cdbookstore.model.Language_ as Field Type:

image::using/new-enum-jpa-field.png[title="Creating a new Enum field in Entity"]
image::../images/using/new-enum-jpa-field.png[title="Creating a new Enum field in Entity"]

Now you need create a new Entity (Same that you did with Book):
[source]
Expand All @@ -217,34 +217,34 @@ Now you need to add a Many-to-One relationship with `Book`.

Open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) and choose _JPA: New Field_, select the _Book_ as Target Entity. Enter _author_ as Field name, select _org.cdbookstore.model.Author_ as Field Type and mark _Many-to-One_ as Relationship Type and click Finish (or Next):

image::using/new-relationship.png[title="Creating a new relationship"]
image::../images/using/new-relationship.png[title="Creating a new relationship"]

If you choose Next instead of Finish, You can configure your relationship:

image::using/relationship-configuration.png[title="Configuring relationship"]
image::../images/using/relationship-configuration.png[title="Configuring relationship"]

Forge takes care of all the JPA relational mapping between both entities. +

Now, on an entity, we can add Bean Validation constraints. Open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) and choose _Constrait: Add_. You'll see a configuration window, just like first step of the _JPA: New Entity_ that you executed before:

image::using/setup-constraint.png[title="Setup Bean Validation"]
image::../images/using/setup-constraint.png[title="Setup Bean Validation"]

You should choose the _Generic Java EE_ as Bean Validation provider and check "Provided by Application Server?".
If you don't want the default configuration provided by Application Server you are free to change your
configurations. Click Next, and choose _org.cdbookstore.model.Book_ as Class:

image::using/add-constraint.png[title="Adding Constraint"]
image::../images/using/add-constraint.png[title="Adding Constraint"]

In next step you need specify the property on which to operate _Property_ and the _Constraint_ to configure.
In this case, let's add NotNull on _title_ property:

image::using/add-notnull-constraint.png[title="Adding NotNull Constraint"]
image::../images/using/add-notnull-constraint.png[title="Adding NotNull Constraint"]

Once the constraint is selected, you can also specify if you want the constraint to appear on the property itself, or on the property accessor (getter method).

Click Next to configure _payload_, _groups_ and _message_:

image::using/configure-constraint.png[title="Configuring Constraint"]
image::../images/using/configure-constraint.png[title="Configuring Constraint"]

Click Finish.

Expand Down Expand Up @@ -290,17 +290,17 @@ $ faces-setup --facesVersion 2.2

In JBDS it's simple too. After opening the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) you should choose _Scaffold: Generate_, choose _Faces_ as Scaffold Type:

image::using/faces-scaffold.png[title="Configuring Faces Scaffold"]
image::../images/using/faces-scaffold.png[title="Configuring Faces Scaffold"]

Click Next to configure the Faces Scaffold:

image::using/faces-configuration-scaffold.png[title="Setup Facets"]
image::../images/using/faces-configuration-scaffold.png[title="Setup Facets"]

By default Forge scaffolds set suggested values for Java EE specification versions, but you can change this configuration as well.

Click Next to continue to select entities for which you want to generate scaffolding. In this case we'll generate for all entities:

image::using/select-jpa-entities.png[title="Selecting JPA entities"]
image::../images/using/select-jpa-entities.png[title="Selecting JPA entities"]

Click Finish and JBoss Forge will create your user interface.

Expand Down Expand Up @@ -338,11 +338,11 @@ deleteById(java.lang.Long)::javax.ws.rs.core.Response listAll(java.lang

Open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) and choose _REST: Generate Endpoints from Entities_, the first step, you need to configure the REST in your application, enter all information such as:

image::using/rest-setup.png[title="Configuring REST"]
image::../images/using/rest-setup.png[title="Configuring REST"]

Click next to select the entities for which endpoints should be generated, select all, and click Finish (or click Next for more options):

image::using/rest-entities.png[title="Generating RESTEndpoints from JPA entities"]
image::../images/using/rest-entities.png[title="Generating RESTEndpoints from JPA entities"]

You can customize some options if you prefer, such as _Configuration Strategy_, _Class Name_, _Content Type_ and so on.

Expand Down Expand Up @@ -416,7 +416,7 @@ _https://github.com/jerr/as-addon_ as GIT Repository URL ad _org.jboss.forge.add
GIT Repository: https://github.com/jerr/as-addon | Coordinate: org.jboss.forge.addon:as,2.0.0-SNAPSHOT
--

image::using/addon-install.png[title="Installing an Addon"]
image::../images/using/addon-install.png[title="Installing an Addon"]

Now perform the same action for:
[source]
Expand All @@ -427,21 +427,21 @@ GIT Repository: https://github.com/jerr/jboss-as-addon | Coordinate: org.jboss.f
It's now time to set up your server. Open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) and choose
_AS: Setup_, then select _wildfly8_:

image::using/as-setup.png[title="AS Setup"]
image::../images/using/as-setup.png[title="AS Setup"]

Click next to configure the _Install directory_, _Port_ and so on:

image::using/as-configuration.png[title="Configuration AS"]
image::../images/using/as-configuration.png[title="Configuration AS"]

Now let's build the application:

Open the Forge wizard (Ctrl + 4 or CMD + 4 on Mac) and choose _Build_:

image::using/build.png[title="Building"]
image::../images/using/build.png[title="Building"]

Now start server with the _AS: Start_ command and deploy application with _AS: Deploy_:

image::using/as-deploy.png[title="Deployinig"]
image::../images/using/as-deploy.png[title="Deployinig"]

Click Finish, and your application will be deployed on WildFly.

Expand Down

0 comments on commit ea30172

Please sign in to comment.