Examples of FeedClient


Examples of com.google.feedserver.tools.FeedClient

        System.out.println("  " + COMMAND_QUIT);
        System.out.println("    Quits shell");
      } else {
        args = append(args, shellArgs);

        FeedClient shell = new FeedClient(args);
        shell.execute(args);
      }
    }
  }
View Full Code Here

Examples of com.streamreduce.util.FeedClient

        return SUPPORTED_AUTH_TYPES;
    }

    @Override
    public FeedClient getClient(Connection connection) {
        return new FeedClient(connection);
    }
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

         this.confHosts = ifaceHosts.get(serverConf.getKey());
         this.webClient = getContext().getClientDispatcher();
      }

      public void configure() {
         FeedClient client = new FeedClient(webClient,new Reference(link.getLink()));
         client.setIdentity(link.getUsername(), link.getPassword());

         getContext().getLogger().info("Loading configuration for " + serverConf.getAddress() + ":" + serverConf.getPort() + " from " + link.getLink());

         changes = false;
         final Map<String, Boolean> found = new TreeMap<String, Boolean>();
         try {
            client.get(new FeedDestination() {

               public void onFeed(Document feedDoc) {
               }

               public void onEntry(Document entryDoc) {
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

         return;
      }
      // Load the layout locations
      URI protectedTermLoc = URI.create(autoConf.getLink().toString()+T_SECURITY_PROTECTED_PATH.toString());
      getLogger().info("Loading protected paths from "+protectedTermLoc);
      FeedClient layoutFeedClient = new FeedClient(client,new Reference(protectedTermLoc));
      if (autoConf.getUsername()!=null) {
         layoutFeedClient.setIdentity(autoConf.getUsername(),autoConf.getPassword());
      }
     
      try {
        
         FeedBuilder builder = new FeedBuilder();
         Response response = layoutFeedClient.get(builder);
         if (response.getStatus().isSuccess()) {
            Feed feed = builder.getFeed();
            feed.index();
           
            Set<String> names = new TreeSet<String>();
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

  
   protected void configureLayouts() {
      // Load layouts
      URI layoutTemLoc = URI.create(autoConf.getLink().toString()+T_LAYOUT.toString());
      getLogger().info("Loading Layouts from "+layoutTemLoc);
      FeedClient appFeedClient = new FeedClient(client,new Reference(layoutTemLoc));
      if (autoConf.getUsername()!=null) {
         appFeedClient.setIdentity(autoConf.getUsername(),autoConf.getPassword());
      }
      try {
         FeedBuilder builder = new FeedBuilder();
         Response response = appFeedClient.get(builder);
         boolean found = false;
         if (!response.getStatus().isSuccess()) {
            if (response.getStatus().getCode()!=404) {
               getLogger().severe("Cannot get feed "+layoutTemLoc+", status="+response.getStatus().getCode());
            } else {
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

  
   protected void configureResources() {
      // Load layouts
      URI resourceTermLoc = URI.create(autoConf.getLink().toString()+T_RESOURCE.toString());
      getLogger().info("Loading resources from "+resourceTermLoc);
      FeedClient appFeedClient = new FeedClient(client,new Reference(resourceTermLoc));
      if (autoConf.getUsername()!=null) {
         appFeedClient.setIdentity(autoConf.getUsername(),autoConf.getPassword());
      }
      try {
         FeedBuilder builder = new FeedBuilder();
         Response response = appFeedClient.get(builder);
         boolean found = false;
         if (!response.getStatus().isSuccess()) {
            if (response.getStatus().getCode()!=404) {
               getLogger().severe("Cannot get feed "+resourceTermLoc+", status="+response.getStatus().getCode());
            } else {
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

  
   protected void configureApplications() {
      // Load applications
      URI appTermLoc = URI.create(autoConf.getLink().toString()+T_APP.toString());
      getLogger().info("Loading Applications from "+appTermLoc);
      FeedClient appFeedClient = new FeedClient(client,new Reference(appTermLoc));
      if (autoConf.getUsername()!=null) {
         appFeedClient.setIdentity(autoConf.getUsername(),autoConf.getPassword());
      }
      try {
         FeedBuilder builder = new FeedBuilder();
         Response response = appFeedClient.get(builder);
         boolean found = false;
         if (!response.getStatus().isSuccess()) {
            if (response.getStatus().getCode()!=404) {
               getLogger().severe("Cannot get feed "+appTermLoc+", status="+response.getStatus().getCode());
            } else {
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

         this.link = link;
         this.hosts = new TreeMap<String,AutoConfiguredHost>();
      }
     
      public void configure() {
         FeedClient client = new FeedClient(link.getLink());
         client.setIdentity(link.getUsername(),link.getPassword());
        
         getLogger().info("Loading configuration from "+link.getLink());
        
         try {
            boolean changes = false;
            final List<Entry> hostsToDo = new ArrayList<Entry>();
            final List<Entry> dbToDo = new ArrayList<Entry>();
            final Map<String,Boolean> currentAuthList = new TreeMap<String,Boolean>();
            final Map<String,Boolean> changedAuth = new TreeMap<String,Boolean>();
            client.get(new FeedDestination() {
               public void onFeed(Document feedDoc) {
               }
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

    }

    public void testParse() throws Exception
    {
       setLogLevel(Level.FINER);
       FeedClient feedClient = new FeedClient(FeedClientTest.class.getResource("feed.atom").toURI());
       Response response = feedClient.get(new FeedDestination() {
          public void onFeed(Document doc) {
             System.out.println("Feed:");
             try {
                StringWriter w = new StringWriter();
                XMLWriter.writeDocument(doc,w);
View Full Code Here

Examples of org.atomojo.app.client.FeedClient

      }
      web.start();
     
      Identity admin = new Identity("admin","admin");
      Reference autoRef = new Reference("http://localhost:8080/R/");
      FeedClient client = new FeedClient(autoRef,admin);
     
      Status status = client.create("<feed xmlns='http://www.w3.org/2005/Atom'><title>autoconf</title></feed>");
      assertTrue(status.isSuccess());
     
      client.createEntry(
         "<entry xmlns='http://www.w3.org/2005/Atom'>" +
         "<title>test1 db</title>" +
         "<category scheme='http://www.atomojo.org/O/configuration/' term='db'/>"+
         "<category scheme='http://www.atomojo.org/O/configuration/db/' term='auth' value='auth'/>" +
         "<category scheme='http://www.atomojo.org/O/configuration/db/' term='name' value='test1'/>" +
         "<category scheme='http://www.atomojo.org/O/configuration/db/' term='group' value='test'/>" +
         "<category scheme='http://www.atomojo.org/O/configuration/db/' term='alias' value='web1'/>" +
         "</entry>");
     
      client.createEntry(
         "<entry xmlns='http://www.w3.org/2005/Atom'>" +
         "<title>testweb1 host</title>" +
         "<category scheme='http://www.atomojo.org/O/configuration/' term='host'/>"+
         "<content type='text/xml'>" +
         "<host name='testweb1' xmlns='http://www.atomojo.org/Vocabulary/Admin/2007/1/0' database='test1'/>" +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.