Package org.platformlayer.xaas.model

Examples of org.platformlayer.xaas.model.ServiceAuthorization


  }

  static ServiceAuthorization mapRow(ServiceType serviceType, ResultSet rs) throws SQLException {
    String data = rs.getString("data");

    ServiceAuthorization authorization = new ServiceAuthorization();
    authorization.data = data;
    authorization.serviceType = serviceType.getKey();

    return authorization;
  }
View Full Code Here


  ServiceAuthorizationRepository repository;

  @Override
  public ServiceAuthorization findServiceAuthorization(ServiceType serviceType, ProjectId projectId)
      throws RepositoryException {
    ServiceAuthorization serviceAuthorization = repository.findServiceAuthorization(serviceType, projectId);
    if (serviceAuthorization == null) {
    }

    return serviceAuthorization;
  }
View Full Code Here

      platformLayerClient = FederatedPlatformLayerClient.build(runAsProjectId, federationMap);
    }

    ServiceConfiguration serviceConfiguration = new ServiceConfiguration(runAsProjectId, serviceType);

    ServiceAuthorization serviceAuthorization;
    try {
      serviceAuthorization = serviceAuthorizationService.findServiceAuthorization(serviceType, runAsProjectId);
      // if (serviceAuthorization == null) {
      // throw new OpsServiceNotAuthorizedException();
      // }
      if (serviceAuthorization == null) {
        serviceAuthorization = new ServiceAuthorization();
        serviceAuthorization.serviceType = serviceConfiguration.getServiceType().getKey();
      }
    } catch (RepositoryException e) {
      throw new OpsException("Error reading from repository", e);
    }
View Full Code Here

  @GET
  @Produces({ XML, JSON })
  public ServiceAuthorization retrieveItem() throws RepositoryException {
    ServiceType serviceType = getServiceType();

    ServiceAuthorization auth = authorizationRepository.findServiceAuthorization(serviceType, getProject());
    if (auth == null) {
      throw new WebApplicationException(404);
    }

    // For security, never return the data
View Full Code Here

    // }
    // });

    // serviceProvider.validateAuthorization(authorization);

    ServiceAuthorization created = authorizationRepository.createAuthorization(getProject(), authorization);

    // For security, never return the data
    created.data = null;

    return created;
View Full Code Here

TOP

Related Classes of org.platformlayer.xaas.model.ServiceAuthorization

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.