Search in sources :

Example 1 with PlatformLayerHelpers

use of org.platformlayer.ops.machines.PlatformLayerHelpers 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);
}
Also used : DirectPlatformLayerClient(org.platformlayer.ops.DirectPlatformLayerClient) FederatedPlatformLayerClient(org.platformlayer.federation.FederatedPlatformLayerClient) PlatformLayerClient(org.platformlayer.PlatformLayerClient) TypedPlatformLayerClient(org.platformlayer.TypedPlatformLayerClient) PlatformLayerHelpers(org.platformlayer.ops.machines.PlatformLayerHelpers) DirectPlatformLayerClient(org.platformlayer.ops.DirectPlatformLayerClient) ProjectId(org.platformlayer.ids.ProjectId) DirectAuthenticator(org.platformlayer.auth.DirectAuthenticator) PlatformLayerTypedItemMapper(org.platformlayer.ops.machines.PlatformLayerTypedItemMapper) TypedItemMapper(org.platformlayer.TypedItemMapper) DirectAuthentication(org.platformlayer.ops.DirectAuthentication)

Aggregations

PlatformLayerClient (org.platformlayer.PlatformLayerClient)1 TypedItemMapper (org.platformlayer.TypedItemMapper)1 TypedPlatformLayerClient (org.platformlayer.TypedPlatformLayerClient)1 DirectAuthenticator (org.platformlayer.auth.DirectAuthenticator)1 FederatedPlatformLayerClient (org.platformlayer.federation.FederatedPlatformLayerClient)1 ProjectId (org.platformlayer.ids.ProjectId)1 DirectAuthentication (org.platformlayer.ops.DirectAuthentication)1 DirectPlatformLayerClient (org.platformlayer.ops.DirectPlatformLayerClient)1 PlatformLayerHelpers (org.platformlayer.ops.machines.PlatformLayerHelpers)1 PlatformLayerTypedItemMapper (org.platformlayer.ops.machines.PlatformLayerTypedItemMapper)1