Examples of FederationKey


Examples of org.platformlayer.ids.FederationKey

    buildTargetMap(config);
    buildRules(config);
  }

  public void addDefault(TypedPlatformLayerClient defaultClient) {
    FederationKey host = FederationKey.LOCAL;
    ProjectId project = defaultClient.getProject();
    FederationMapping mapKey = new FederationMapping(host, project);

    MappedTarget target = new MappedTarget();
    target.client = defaultClient;
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    targetMap.put(mapKey, target);
  }

  private void buildTargetMap(FederationConfiguration config) {
    for (PlatformLayerConnectionConfiguration child : config.systems) {
      FederationKey host = FederationKey.build(child.authenticationEndpoint);
      ProjectId project = new ProjectId(child.tenant);
      FederationMapping key = new FederationMapping(host, project);

      MappedTarget target = new MappedTarget();
      target.configuration = child;
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

        if (Objects.equal(system.key, federationRule.target)) {
          if (rule.targetKey != null) {
            throw new IllegalStateException();
          }

          FederationKey host = FederationKey.build(system.authenticationEndpoint);
          ProjectId project = new ProjectId(system.tenant);
          rule.targetKey = new FederationMapping(host, project);
        }
      }
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

      addRule(rule);
    }
  }

  private FederationMapping toKey(PlatformLayerKey original, Rule rule) {
    FederationKey targetHost = original.getHost();
    ProjectId targetProject = original.getProject();

    if (rule.targetKey != null) {
      MappedTarget target = targetMap.get(rule.targetKey);
      if (target == null) {
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    return new FederationMapping(targetHost, targetProject);
  }

  private FederationMapping buildDefault(PlatformLayerKey original) {
    FederationKey targetHost = original.getHost();
    if (targetHost == null) {
      targetHost = FederationKey.LOCAL;
    }

    ProjectId targetProject = original.getProject();
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    if (Strings.isNullOrEmpty(itemId)) {
      throw new IllegalArgumentException("Cannot resolve path (item id not resolved): " + path);
    }

    FederationKey host = null;
    return new PlatformLayerKey(host, project, new ServiceType(serviceType), new ItemType(itemType),
        new ManagedItemId(itemId));
  }
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    } else {
      itemType = path;
      serviceType = getServiceTypeFromItemType(client, itemType);
    }

    FederationKey host = null;
    ProjectId project = client.getProject();
    return new PlatformLayerKey(host, project, new ServiceType(serviceType), new ItemType(itemType), null);
  }
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    ManagedItemId itemId = plk.getItemId();
    if (itemId == null || itemId.isEmpty()) {
      throw new IllegalArgumentException();
    }

    FederationKey host = plk.getHost();
    if (host == null) {
      host = FederationKey.LOCAL;
    }

    ProjectId project = plk.getProject();
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    if (multitenant != null) {
      ProjectAuthorization localProject = projectAuthz; // .getProject();
      TypedPlatformLayerClient localClient = buildClient(localProject);

      FederationKey host = FederationKey.LOCAL;
      ProjectId project = localClient.getProject();
      FederationMapping mapKey = new FederationMapping(host, project);

      federationMap.addMapping(mapKey, localClient);
View Full Code Here

Examples of org.platformlayer.ids.FederationKey

    if (!Objects.equal(SCHEME, uri.getScheme())) {
      throw new IllegalArgumentException();
    }

    FederationKey hostKey = null;
    String host = uri.getHost();
    if (!Strings.isNullOrEmpty(host)) {
      hostKey = FederationKey.build(host);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.