Package org.platformlayer.ids

Examples of org.platformlayer.ids.ProjectId


    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


  }

  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

          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);
        }
      }

      if (rule.targetKey == null) {
View Full Code Here

    }
  }

  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) {
        throw new IllegalStateException("Cannot find target: " + rule.targetKey);
View Full Code Here

    FederationKey targetHost = original.getHost();
    if (targetHost == null) {
      targetHost = FederationKey.LOCAL;
    }

    ProjectId targetProject = original.getProject();

    return new FederationMapping(targetHost, targetProject);
  }
View Full Code Here

public class Utils {
  public static String formatUrl(PlatformLayerCliContext context, PlatformLayerKey key) {
    String text = key.getUrl();

    if (key.getHost() == null) {
      ProjectId project = context.getProject();
      if (Objects.equal(project, context.getProject())) {
        text = "pl:" + key.getItemTypeString() + "/" + key.getItemIdString();
      }
    }
View Full Code Here

      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

    ClientAction action = null;
    if (sshAddress != null) {
      String user = "root";

      ProjectId project = key.getProject();
      if (project == null) {
        project = client.getProject();
      }
      if (project == null) {
        throw new CliException("Cannot determine project");
      }
      String projectKey = project.getKey();
      String serviceKey = "service-" + key.getServiceType().getKey();

      File sshKey = IoUtils.resolve("~/.credentials/ssh/" + projectKey + "/" + serviceKey);

      // Hmmm... user? key?
View Full Code Here

      ModelClass<?> modelClass = serviceProvider.getModelClass(key.getItemType());

      ServiceType serviceType = key.getServiceType();
      ItemType itemType = key.getItemType();
      ProjectId project = key.getProject();
      ManagedItemId itemId = key.getItemId();

      return fetchItem(db, serviceType, itemType, project, itemId, modelClass.getJavaClass(), secretProvider,
          fetchTags);
    } catch (SQLException e) {
View Full Code Here

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

    ProjectId project = plk.getProject();
    if (project == null) {
      project = defaultProject;
      // project = federationMap.getLocalClient().getProject();
    }
View Full Code Here

TOP

Related Classes of org.platformlayer.ids.ProjectId

Copyright © 2018 www.massapicom. 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.