Package com.ibm.sbt.services.client.smartcloud.bss

Examples of com.ibm.sbt.services.client.smartcloud.bss.SubscriberManagementService


      return authenticationService;
    }
   
    public SubscriberManagementService getSubscriberManagementService() {
      if (subscriberManagementService == null) {
        subscriberManagementService = new SubscriberManagementService(getBasicEndpoint());
      }
      return subscriberManagementService;
    }
View Full Code Here


      return authenticationService;
    }
   
    public SubscriberManagementService getSubscriberManagementService() {
      if (subscriberManagementService == null) {
        subscriberManagementService = new SubscriberManagementService(getBasicEndpoint());
      }
      return subscriberManagementService;
    }
View Full Code Here

      return authenticationService;
    }
   
    public SubscriberManagementService getSubscriberManagementService() {
      if (subscriberManagementService == null) {
        subscriberManagementService = new SubscriberManagementService(getBasicEndpoint());
      }
      return subscriberManagementService;
    }
View Full Code Here

      }
      */
      String subscriptionId = cp.createSubscription(customerId, 3, "D0NWLLL", 5);
      System.out.println("Subscription Id: " + subscriptionId);
     
      SubscriberManagementService subscriberManagement = cp.getSubscriberManagementService();
      //EntityList<JsonEntity> subscribers = subscriberManagement.getSubscribersByEmail(email);
      //JsonEntity subscriber = subscribers.get(0);
      //String subscriberId = String.valueOf(subscriber.getAsLong("Oid"));
      String subscriberId = cp.addSubscriber(customerId, cp.getUniqueEmail("mailinator.com"), SubscriberManagementService.Role.CustomerAdministrator);
      System.out.println("Subscriber Id: " + subscriberId);
      JsonEntity subscriber = cp.getSubscriberById(subscriberId);
      System.out.println("Subscriber: " + subscriber.toJsonString(false));
         String loginName = subscriber.getAsString("Subscriber/Person/EmailAddress");
         System.out.println("Login Name: " + loginName);
      String subscriberState = subscriber.getAsString("Subscriber/SubscriberState");
      System.out.println("Subscriber State: " + subscriberState);
     
      if (!"ACTIVE".equals(subscriberState)) {
        subscriberManagement.activateSubscriber(subscriberId);
        System.out.println("Activated subscriber: " + subscriberId);
      }
     
      cp.setOneTimePassword(loginName, "one-time-123");
      cp.changePassword(loginName, "one-time-123", "password1");
      System.out.println("Changed password: " + loginName);
     
      cp.entitleSubscriber(subscriberId, subscriptionId, true);
      System.out.println("Entitled subscriber: " + subscriptionId);
     
      subscriber = subscriberManagement.getSubscriberById(subscriberId);
      System.out.println(subscriber.toJsonString(false))
     
      System.out.println("Customer provisioning successful");
     
    } catch (Exception e) {
View Full Code Here

      return authenticationService;
    }
   
    public SubscriberManagementService getSubscriberManagementService() {
      if (subscriberManagementService == null) {
        subscriberManagementService = new SubscriberManagementService(getBasicEndpoint());
      }
      return subscriberManagementService;
    }
View Full Code Here

      return customerManagement;
    }
   
    public SubscriberManagementService getSubscriberManagementService() {
      if (subscriberManagement == null) {
      subscriberManagement = new SubscriberManagementService(getBasicEndpoint());
      }
      return subscriberManagement;
    }
View Full Code Here

    AuthenticationService authenticationService = getAuthenticationService();
    authenticationService.changePassword(userCredential);
    }
   
    public void updateSubscriberEmail(String subscriberId, String emailAddress) throws BssException {
    SubscriberManagementService subscriberManagement = getSubscriberManagementService();
   
    JsonEntity jsonEntity = subscriberManagement.getSubscriberById(subscriberId);
    JsonJavaObject rootObject = jsonEntity.getJsonObject();
   
    JsonJavaObject subscriberObject = rootObject.getAsObject("Subscriber");
    JsonJavaObject personObject = subscriberObject.getAsObject("Person");
    personObject.putString("EmailAddress", emailAddress);
   
    subscriberManagement.updateSubscribeProfile(rootObject);
    }
View Full Code Here

   
    subscriberManagement.updateSubscribeProfile(rootObject);
    }
   
    public void activateSubscriber(String subscriberId) throws BssException {
       SubscriberManagementService subscriberManagement = getSubscriberManagementService();
    subscriberManagement.activateSubscriber(subscriberId);
    }
View Full Code Here

       SubscriberManagementService subscriberManagement = getSubscriberManagementService();
    subscriberManagement.activateSubscriber(subscriberId);
    }
   
    public boolean entitleSubscriber(final String subscriberId, final String subscriptionId, final boolean acceptTOU) throws BssException {
    final SubscriberManagementService subscriberManagement = getSubscriberManagementService();

    StateChangeListener listener = new StateChangeListener() {
      @Override
      public void stateChanged(JsonEntity jsonEntity) {
        try {
          subscriberManagement.entitleSubscriber(subscriberId, subscriptionId, acceptTOU);
        } catch (BssException e) {
          System.err.println("Unable to entitle: "+subscriberId+" to: "+subscriptionId);
        }
      }
    };
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.smartcloud.bss.SubscriberManagementService

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.