Skip to content

Commit a239d06

Browse files
naleehakeikeicheung
authored andcommitted
#1434 deleting duplicate rpc handler
1 parent 2b8386a commit a239d06

File tree

4 files changed

+13
-68
lines changed

4 files changed

+13
-68
lines changed

example/main-java/src/main/java/org/finos/vuu/person/PersonRpcHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.finos.vuu.person;
22

3-
import org.finos.vuu.core.module.typeahead.MyTypeAheadHandler;
3+
import org.finos.vuu.core.module.typeahead.ViewportTypeAheadRpcHandler;
44
import org.finos.vuu.core.table.DataTable;
55
import org.finos.vuu.core.table.TableContainer;
66
import org.finos.vuu.net.rpc.*;
@@ -13,7 +13,7 @@ public class PersonRpcHandler extends DefaultRpcHandler {
1313
public PersonRpcHandler(DataTable table, TableContainer tableContainer) {
1414
this.table = table;
1515

16-
var typeAheadHandler = new MyTypeAheadHandler(this, tableContainer);
16+
var typeAheadHandler = new ViewportTypeAheadRpcHandler(this, tableContainer);
1717
typeAheadHandler.register();
1818

1919
registerRpc("UpdateName", (params) -> processUpdateNameRpcRequest(params));

vuu/src/main/scala/org/finos/vuu/core/module/typeahead/ViewPortTypeAheadRpcHandler.scala

Lines changed: 0 additions & 63 deletions
This file was deleted.

vuu/src/main/scala/org/finos/vuu/core/module/typeahead/MyTypeAheadHandler.scala renamed to vuu/src/main/scala/org/finos/vuu/core/module/typeahead/ViewportTypeAheadRpcHandler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.finos.vuu.net.{RequestContext, RpcNames}
55
import org.finos.vuu.net.rpc.{DefaultRpcHandler, RpcFunctionResult, RpcFunctionSuccess, RpcParams}
66
import org.finos.vuu.viewport.ViewPortColumns
77

8-
class MyTypeAheadHandler(rpcRegistry: DefaultRpcHandler, tableContainer: TableContainer) {
8+
class ViewportTypeAheadRpcHandler(rpcRegistry: DefaultRpcHandler, tableContainer: TableContainer) {
99

1010
def register(): Unit = {
1111
rpcRegistry.registerRpc(RpcNames.UniqueFieldValuesRpc, params => processGetUniqueFieldValuesRequest(params))

vuu/src/test/scala/org/finos/vuu/wsapi/TypeAheadWSApiTest.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package org.finos.vuu.wsapi
22

33
import org.finos.vuu.api.{ColumnBuilder, TableDef, ViewPortDef}
44
import org.finos.vuu.core.IVuuServer
5-
import org.finos.vuu.core.module.typeahead.ViewPortTypeAheadRpcHandler
5+
import org.finos.vuu.core.module.typeahead.ViewportTypeAheadRpcHandler
66
import org.finos.vuu.core.module.{ModuleFactory, ViewServerModule}
77
import org.finos.vuu.core.table.{DataTable, TableContainer}
88
import org.finos.vuu.net._
9+
import org.finos.vuu.net.rpc.DefaultRpcHandler
910
import org.finos.vuu.provider.{Provider, ProviderContainer}
1011
import org.finos.vuu.viewport.{ViewPortRange, ViewPortTable}
1112
import org.finos.vuu.wsapi.helpers.TestExtension.ModuleFactoryExtension
@@ -201,7 +202,7 @@ class TypeAheadWSApiTest extends WebSocketApiTestBase {
201202
.addString("Name")
202203
.addInt("Account")
203204
.build(),
204-
service = new ViewPortTypeAheadRpcHandler(tableContainer)
205+
service = new TypeAheadTestRpcHandler(tableContainer)
205206
)
206207

207208
val dataSource = new FakeDataSource(ListMap(
@@ -267,3 +268,10 @@ class TypeAheadWSApiTest extends WebSocketApiTestBase {
267268
))
268269
}
269270
}
271+
272+
class TypeAheadTestRpcHandler(tableContainer: TableContainer) extends DefaultRpcHandler {
273+
274+
val typeAheadHandler = new ViewportTypeAheadRpcHandler(this, tableContainer)
275+
typeAheadHandler.register()
276+
277+
}

0 commit comments

Comments
 (0)