Package com.alu.e3.data.model

Examples of com.alu.e3.data.model.ApiDetail


  public void testAddPolicyAndUpdateApiAuthThenRemovePolicy() {

    // Add a new API
    Api api = new Api();
    api.setId("id1");
    api.setApiDetail(new ApiDetail());
    dataManager.addApi(api);

    // Add a new Auth
    Auth auth = new Auth();
    auth.setId("id2");
View Full Code Here


  @Test
  public void testAddPolicyAndUpdateApiAuthThenRemoveApi() {

    // Add a new API
    Api api = new Api();
    api.setApiDetail(new ApiDetail());
    api.setId("id51");
    dataManager.addApi(api);

    // Add a new Auth
    Auth auth = new Auth();
View Full Code Here

  public void testAddPolicyAndUpdateApiAuthThenRemoveAuth() {

    // Add a new API
    Api api = new Api();
    api.setId("id61");
    api.setApiDetail(new ApiDetail());
    dataManager.addApi(api);

    // Add a new Auth
    Auth auth = new Auth();
    auth.setId("id62");
View Full Code Here

  @Test
  public void testGetMatchingPolicies() {

    // Add a new API
    Api api = new Api();
    api.setApiDetail(new ApiDetail());
    api.setId("id31");
    dataManager.addApi(api);

    // Add a new API
    Api api2 = new Api();
    api2.setApiDetail(new ApiDetail());
    api2.setId("id32");
    dataManager.addApi(api2);

    // Add a new API
    Api api3 = new Api();
    api3.setApiDetail(new ApiDetail());
    api3.setId("id33");
    dataManager.addApi(api3);

    // Add a new API
    Api api4 = new Api();
    api4.setApiDetail(new ApiDetail());
    api4.setId("id34");
    dataManager.addApi(api4);

    // Add a new Auth
    Auth auth = new Auth();
View Full Code Here

  @Test
  public void testAddPolicyAndUpdateApiAuthWithCreateBucketThenRemovePolicy() {

    // Add a new API
    Api api = new Api();
    api.setApiDetail(new ApiDetail());
    api.setId("apiId1");
    dataManager.addApi(api);

    // Add a new Auth
    Auth auth = new Auth();
View Full Code Here

  @Test
  public void testAddPolicyWithBucketAndAppendAuthsThenRemovePolicy() {

    // Add a new API
    Api api = new Api();
    api.setApiDetail(new ApiDetail());
    api.setId("apiId1");
    dataManager.addApi(api);

    // Prepare Auths
    Auth auth = new Auth();
View Full Code Here

  public void testAddPolicyAppendAuthsBucketsRemoveBucketsRemovePolicy() {

    // Add a new API
    Api api = new Api();
    api.setId("apiId1");
    api.setApiDetail(new ApiDetail());
    dataManager.addApi(api);

    // Prepare Auths
    Auth auth = new Auth();
    auth.setId("authId1");
View Full Code Here

  @Test
  public void testGetMatchingPoliciesWithSeveralAuth() {

    // Add a new API
    Api api = new Api();
    api.setApiDetail(new ApiDetail());
    api.setId("id31");
    dataManager.addApi(api);

    // Add a new Auth
    Auth auth = new Auth();
View Full Code Here


  protected List<CallDescriptor> checkSubscriberIdAuth(String subscriberId, AuthIdentity authIdentity) throws GatewayException {

    // Get subscriber matching CallDescriptors
    Auth auth;
    try {
      auth = dataManager.getAuthById(subscriberId);
    } catch (InvalidIDException e) {
      throw new GatewayException(GatewayExceptionCode.AUTHORIZATION, e.getMessage() );
    }

    if (auth == null || !auth.getStatus().isActive()) {
      throw new GatewayException(GatewayExceptionCode.AUTHORIZATION, "Authorization status is invalid");
    }

    return   dataManager.getMatchingPolicies(authIdentity.getApi(), auth);
View Full Code Here

    Map<String, String> props = new HashMap<String,String>();

    props.putAll(identity.getApi().getProperties());
    Iterator<CallDescriptor> it = identity.getCallDescriptors().iterator();
    while(it.hasNext()){
      CallDescriptor cd = it.next();
      Policy policy = cd.getPolicy();
      if(policy != null){
        props.putAll(policy.getProperties());
      }
    }
View Full Code Here

TOP

Related Classes of com.alu.e3.data.model.ApiDetail

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.