use of org.platformlayer.TypedItemMapper in project platformlayer by platformlayer.
the class FederatedPlatformLayerClient method build.
// public static PlatformLayerClient build(TypedPlatformLayerClient localClient, TypedItemMapper mapper)
// throws OpsException {
// FederationMap federationMap = buildFederationMap(localClient, mapper);
//
// ForkJoinStrategy forkJoinPool = new FakeForkJoinStrategy();
//
// return new FederatedPlatformLayerClient(federationMap, forkJoinPool);
// }
public static PlatformLayerClient build(ProjectId defaultProject, FederationMap federationMap) throws OpsException {
ForkJoinStrategy forkJoinPool = new FakeForkJoinStrategy();
TypedItemMapper mapper = null;
return new FederatedPlatformLayerClient(mapper, defaultProject, federationMap, forkJoinPool);
}
use of org.platformlayer.TypedItemMapper in project platformlayer by platformlayer.
the class OpsContextBuilder method buildClient.
private TypedPlatformLayerClient buildClient(ProjectAuthorization project) throws OpsException {
ProjectId projectId = new ProjectId(project.getName());
DirectAuthenticator directAuthenticator = buildDirectAuthenticator(project);
// TODO: Introduce a direct client for "loopback" (normal) calls?
String platformLayerUrl = OpsSystem.getPlatformLayerUrlBase();
List<String> trustKeys = opsSystem.getServerTrustKeys();
PlatformLayerClient client;
// client = HttpPlatformLayerClient.build(httpStrategy, platformLayerUrl,
// directAuthenticator, projectId, trustKeys);
DirectAuthentication auth = new DirectAuthentication(project);
TypedItemMapper mapper = null;
client = new DirectPlatformLayerClient(mapper, opsSystem, projectId, auth);
return new PlatformLayerHelpers(client, serviceProviderHelpers);
}
Aggregations