Package org.platformlayer.ops

Examples of org.platformlayer.ops.MultitenantConfiguration


    if (mappedItems.isEmpty()) {
      throw new OpsException(message);
    }

    MultitenantConfiguration config = new SimpleMultitenantConfiguration(authz, mappedItems);

    return config;
  }
View Full Code Here


  JobRegistry jobRegistry;

  public ProjectId getRunAsProjectId(ProjectAuthorization project) throws OpsException {
    ProjectAuthorization runAsProject = project; // authentication.getProject();

    MultitenantConfiguration multitenant = opsSystem.getMultitenantConfiguration();
    if (multitenant != null) {
      runAsProject = multitenant.getMasterProject();
    }

    ProjectId runAsProjectId = new ProjectId(runAsProject.getName());
    return runAsProjectId;
  }
View Full Code Here

    List<ProjectAuthorization> projects = Lists.newArrayList();

    ProjectAuthorization runAsProject = projectAuthz; // .getProject();
    projects.add(runAsProject);

    MultitenantConfiguration multitenant = opsSystem.getMultitenantConfiguration();
    if (multitenant != null) {
      ProjectAuthorization masterProject = multitenant.getMasterProject();
      if (runAsProject.getName().equals(masterProject.getName())) {
        // We're in the master project
        multitenant = null;
      } else {
        runAsProject = masterProject;
        projects.add(runAsProject);
      }
    }

    TypedPlatformLayerClient defaultClient = buildClient(runAsProject);

    FederationConfiguration federationMapConfig = FederatedPlatformLayerClient
        .buildFederationConfiguration(defaultClient);

    FederationMap federationMap = new FederationMap(httpStrategy, mapper, federationMapConfig);

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

      for (PlatformLayerKey mappedService : multitenant.getMappedItems()) {
        FederationMap.Rule rule = new FederationMap.Rule();
        rule.mappedItems = mappedService;
        rule.targetKey = mapKey;
        federationMap.addRule(rule);
      }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.MultitenantConfiguration

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.