Skip to content

Commit

Permalink
#1434 deleting duplicate rpc handler
Browse files Browse the repository at this point in the history
  • Loading branch information
naleeha authored and keikeicheung committed Sep 5, 2024
1 parent 2b8386a commit a239d06
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 68 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.finos.vuu.person;

import org.finos.vuu.core.module.typeahead.MyTypeAheadHandler;
import org.finos.vuu.core.module.typeahead.ViewportTypeAheadRpcHandler;
import org.finos.vuu.core.table.DataTable;
import org.finos.vuu.core.table.TableContainer;
import org.finos.vuu.net.rpc.*;
Expand All @@ -13,7 +13,7 @@ public class PersonRpcHandler extends DefaultRpcHandler {
public PersonRpcHandler(DataTable table, TableContainer tableContainer) {
this.table = table;

var typeAheadHandler = new MyTypeAheadHandler(this, tableContainer);
var typeAheadHandler = new ViewportTypeAheadRpcHandler(this, tableContainer);
typeAheadHandler.register();

registerRpc("UpdateName", (params) -> processUpdateNameRpcRequest(params));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.finos.vuu.net.{RequestContext, RpcNames}
import org.finos.vuu.net.rpc.{DefaultRpcHandler, RpcFunctionResult, RpcFunctionSuccess, RpcParams}
import org.finos.vuu.viewport.ViewPortColumns

class MyTypeAheadHandler(rpcRegistry: DefaultRpcHandler, tableContainer: TableContainer) {
class ViewportTypeAheadRpcHandler(rpcRegistry: DefaultRpcHandler, tableContainer: TableContainer) {

def register(): Unit = {
rpcRegistry.registerRpc(RpcNames.UniqueFieldValuesRpc, params => processGetUniqueFieldValuesRequest(params))
Expand Down
12 changes: 10 additions & 2 deletions vuu/src/test/scala/org/finos/vuu/wsapi/TypeAheadWSApiTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package org.finos.vuu.wsapi

import org.finos.vuu.api.{ColumnBuilder, TableDef, ViewPortDef}
import org.finos.vuu.core.IVuuServer
import org.finos.vuu.core.module.typeahead.ViewPortTypeAheadRpcHandler
import org.finos.vuu.core.module.typeahead.ViewportTypeAheadRpcHandler
import org.finos.vuu.core.module.{ModuleFactory, ViewServerModule}
import org.finos.vuu.core.table.{DataTable, TableContainer}
import org.finos.vuu.net._
import org.finos.vuu.net.rpc.DefaultRpcHandler
import org.finos.vuu.provider.{Provider, ProviderContainer}
import org.finos.vuu.viewport.{ViewPortRange, ViewPortTable}
import org.finos.vuu.wsapi.helpers.TestExtension.ModuleFactoryExtension
Expand Down Expand Up @@ -201,7 +202,7 @@ class TypeAheadWSApiTest extends WebSocketApiTestBase {
.addString("Name")
.addInt("Account")
.build(),
service = new ViewPortTypeAheadRpcHandler(tableContainer)
service = new TypeAheadTestRpcHandler(tableContainer)
)

val dataSource = new FakeDataSource(ListMap(
Expand Down Expand Up @@ -267,3 +268,10 @@ class TypeAheadWSApiTest extends WebSocketApiTestBase {
))
}
}

class TypeAheadTestRpcHandler(tableContainer: TableContainer) extends DefaultRpcHandler {

val typeAheadHandler = new ViewportTypeAheadRpcHandler(this, tableContainer)
typeAheadHandler.register()

}

0 comments on commit a239d06

Please sign in to comment.