Application Structure
Add-In Manager Application Extension Environment
Application Structure
Java Code and Unit Tests
Java code and unit tests for each application or component are located in a separate Eclipse project:
View Code and Configuration Files
The schema and WEB-INF folders are located in webcentral-war project:
Web Central loads application files directly from the schema folder. One exception to this rule is the compiled Java classes for workflow rule services. Compiled Java classes are packaged into a JAR file using Web Central's command line utility, and loaded from the WEB-INF\lib folder.
Note: Before you change application files, back up all files in the application folder, in order to return to previous file versions if necessary.
Application Subfolders and Files
All applications should have the same internal folder structure, shown below for the logic-cookbook application:
The subfolders are:
Subfolder | Contents |
---|---|
src\main\java | Contains Java source code for workflow rules. |
src\main\resources | Contains resource or configuration files for workflow rules. |
src\test\java | Contains JUnit test classes for workflow rules. |
src\test\resources | Contains resource or configuration files for JUnit test classes for workflow rules. |
config | Contains configuration files for PMD, CheckStyle, FindBugs Eclipse plug-ins. Those produce code quality warnings. |
.settings | Contains Eclipse project configuration files. |
Files in the application root folder are:
Files | Description |
---|---|
.project .classpath |
Eclipse project files. |
.checkstyle .fbprefs .pmd |
Eclipse project files that reference files in config folder. |
build.gradle gradle.properties |
Gradle build files for automated builds. |
Adding a New Application
-
Copy the
webcentral-platform-solutions-logic-cookbook
project: in Eclipse, select the project, then right-click the project and select Copy in the pop-up menu. -
Eclipse shows the Copy Project dialog:
-
In Copy Project, enter a new project name. Also specify the project's location, which should contain the new project name:
- Click OK .
- Copy file webcentral-platform-solutions-logic-cookbook/.settings/org.eclipse.buildship.core.prefs into webcentral-application-my settings folder.
-
Rename project references in the created project to match the project name:
-
Edit webcentral-war-root\settings.gradle file: add line includeFlat 'webcentral-application-my' :
-
Select
webcentral-war-root
project, then right-click Gradle > Refresh Gradle Project .Eclipse regenerates Eclipse project files for all projects, and should not report any errors: