wiki/typical-data-mining-scenarios.md
... ...
@@ -19,6 +19,9 @@
19 19
* Create a `ResourceBundleStringMessages` in the `DataMiningBundleService`
20 20
* The `ResourceBundleStringMessages` needs the resource base name, which should be `<string messages package name>/<string messages base name>`
21 21
* A reference to this `ResourceBundleStringMessages` should be returned by the method `getStringMessages()`
22
+* **[Optional]** It may be necessary to implement GWT specific components for the new Data Mining Bundle, like DTOs or a [Serialization Dummy](wiki/typical-data-mining-scenarios#Include-a-Type-forcefully-in-the-GWT-Serialization-Policy).
23
+ * This should be done in a separate bundle.
24
+ * See [Typical Development Scenarios](wiki/typical-development-scenarios#Adding-a-shared-GWT-library-bundle) for instructions, how to add a shared GWT bundle.
22 25
23 26
## Adding an absolute new Data Type
24 27
... ...
@@ -120,9 +123,14 @@ It can happen, that a necessary type isn't included in the GWT Serialization Pol
120 123
121 124
* Create a dummy class in a shared bundle, if such a dummy class doesn't exist already in the scope of the type.
122 125
* For example like `SSEDataMiningSerializationDummy`.
123
- * The class has to implement `Serializable` and should only have a private standard constructor, to prevent an accidental instantiation.
126
+ * The class has to implement the interface `SerializationDummy` and should only have a private standard constructor, to prevent an accidental instantiation.
127
+ * Implementing this interface adds the dummy automatically to the serialization policy, without changing the `DataMiningService`.
124 128
* Add a private non-final instance variable of the type to the dummy.
125
-* Add a pseudo method to the GWT-Service, that uses the dummy class, if such a method doesn't exist already.
126
- * For example like `SSEDataMiningSerializationDummy pseudoMethodSoThatSomeSSEDataMiningClassesAreAddedToTheGWTSerializationPolicy()`.
127 129
128
-The type will be included in the GWT Serialization Policy, because the GWT-Service has a method, that uses the dummy class, that uses the type.
... ...
\ No newline at end of file
0
+The type will be included in the GWT Serialization Policy, because the `DataMiningService` has a method, that uses the interface `SerializationDummy`, that uses the type.
1
+
2
+If you can't implement `SerializationDummy` for any reasons do the following:
3
+
4
+* Implement the interface `Serializable` or `IsSerializable` instead.
5
+* Add a pseudo method to the GWT-Service, that uses the dummy class.
6
+ * For example like `SerializationDummy pseudoMethodSoThatSomeClassesAreAddedToTheGWTSerializationPolicy()`.
... ...
\ No newline at end of file
wiki/typical-development-scenarios.md
... ...
@@ -68,12 +68,14 @@ Sometimes we need a bundle containing code and resources which can be used by ot
68 68
To create and use such a bundle from another GWT bundle (e.g. com.sap.sailing.gwt.ui) some additional steps compared to the normal Java bundle creation are required.
69 69
70 70
GWT library bundle project creation
71
+
71 72
* Add a new Java plugin project, using <git-workspace>/java/<bundle-name> as the project directory
72 73
* Add the GWT-SDK dependency to the project
73 74
* Add a GWT module file to project (ModuleName.gwt.xml)
74 75
* Add the bundle to the main pom.xml in /git/java
75 76
76 77
Use the GWT library project in a GWT UI project
78
+
77 79
* Add the src folder of the GWT library bundle to classpath of all GWT-Launch configurations (required to let the GWT dev mode find the sources of java classes) -> Open GWT launch config, select tab 'classpath', select 'User entries', click 'Advanced' button, choose 'add folders' option and add the src folder of the GWT library project
78 80
* Add the bundle the pom.xml of the GWT UI project (for the maven build)
79 81