Package com.ibm.sbt.services.client.connections.activitystreams

Examples of com.ibm.sbt.services.client.connections.activitystreams.ActivityStreamService


       
        @Override
        protected Block loadBlock(int index, int blockSize) {
            try {
             
                ActivityStreamService svc = createService(findEndpointBean(),getServiceUrl());
                Map<String,String> parameters = getParameters(index, blockSize);

                //TODO Padraic Is this correct?
                DataNavigator.Json nav = new DataNavigator.Json(svc.getAllUpdates(parameters)); // this.data has the response feed.
          DataNavigator entry = nav.get("list");
               
                Object[] data = new Object[entry.getCount()];
                for(int i=0; i<data.length; i++) {
                    data[i] = entry.get(i);
View Full Code Here


            }
        }
       
        protected ActivityStreamService createService(Endpoint endpoint, String serviceUrl) {
          //TODO Padraic service URL ?
          ActivityStreamService svc = new ActivityStreamService();
          //ActivityStreamService svc = new ActivityStreamService(enpoint,serviceUrl);
         
            return svc;
        }
View Full Code Here

               
        @Override
        protected Block loadBlock(int index, int blockSize) {
            try {
             
                ActivityStreamService svc = createService(findEndpointBean(),getServiceUrl());
                Map<String,String> parameters = getParameters(index, blockSize);
               

                //TODO ActivityStream DataSource as XML?
//                XmlNavigator.Xml nav = new XmlNavigator.Xml(svc.get); // this.data has the response feed.
View Full Code Here

            }
        }
       
        protected ActivityStreamService createService(Endpoint endpoint, String serviceUrl) {
          //TODO Padraic
            ActivityStreamService svc = new ActivityStreamService();
            return svc;
        }
View Full Code Here

    assertEquals(assertUrl, url);
  }

  @Test
  public void testGenerateURLVariableParameters2() {
    ActivityStreamService service = new ActivityStreamService();
    //URL pattern is "connections/opensocial/{authType}/rest/{service}/{user}/{group}/{application}"
    // Those variables are @me @all and @status URLEncoded
    String user = "%40me";
    String group = "%40all";
    String app = "%40status";
View Full Code Here

     */
    public AdminPublishActivityStream(String endpointName, boolean initEnvironment){
        if(initEnvironment)
            this.initEnvironment();
       
        this._service = new ActivityStreamService();
        this.setEndpoint((BasicEndpoint)EndpointFactory.getEndpoint(endpointName));
    }
View Full Code Here

     * @return
     * @throws SBTServiceException
     */
    public String postToStream(JsonJavaObject template) throws SBTServiceException {
        if(_service == null){
            _service = new ActivityStreamService();
            _service.setEndpoint(this.endpoint);
        }
        String returnedData = _service.postEntry(template);
       
        return returnedData;
View Full Code Here

        setAuthType(AuthType.AUTO_DETECT);
    }
   
    protected ActivityStreamService getActivityStreamService() {
        if (activityStreamService == null) {
            activityStreamService = new ActivityStreamService();
        }
        return activityStreamService;
    }
View Full Code Here

      try {
     
      ((BasicEndpoint)ep).setUser(getEnvironment().getSecondaryUsername());
      ((BasicEndpoint)ep).setPassword(getEnvironment().getSecondaryUserPassword());
     
      ActivityStreamService svc = new ActivityStreamService(ep);
      JsonJavaObject postPayload = new JsonJavaObject();
      postPayload.put("content", "Notification message content");

    String entryID = svc.postMicroblogEntry(getEnvironment().getCurrentUserUuid(), null, null, postPayload);
    System.out.println("Created Notification Entry "+entryID);
      } finally {
        ((BasicEndpoint)ep).setUser(getEnvironment().getCurrentUsername());
        ((BasicEndpoint)ep).setPassword(getEnvironment().getCurrentUserPassword());
      }
View Full Code Here

    }
   
    protected ActivityStreamEntity getLastCreatedEntry() {
        try {
            ActivityStreamService asService = getActivityStreamService();
            ActivityStreamEntityList entries = asService.getAllUpdates();
            asEntry = entries.iterator().next();
            Trace.log("Last created entry: "+asEntry.getId());
        } catch (SBTServiceException e) {
          fail("SBTServiceException: " + e.getMessage());
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.connections.activitystreams.ActivityStreamService

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.