Package com.ibm.sbt.services.client

Examples of com.ibm.sbt.services.client.RestClient$BasicAuthenticator


    }
 
    // File functions
    @Override
    public InputStream getInputStream() throws IOException {
      RestClient c = createGitClient(getUserName(),getPassword());
      String path = URLEncoding.encodeURIString(getPath(),"utf-8",0,false);
      try {
        Map<String,Object> json = (Map<String,Object>)c.get(path,new RestClient.HandlerJson(JsonJavaFactory.instance)).getData();
        String content = (String)json.get("content");
        if(content!=null) {
          String encoding = (String)json.get("encoding");
          if(StringUtil.equals(encoding, "base64")) {
            return new Base64.InputStream(new StringInputStream(content));
View Full Code Here


    // Directory functions
    @Override
    protected BaseFile[] loadChildren() throws IOException {
      try {
        ArrayList<BaseFile> files = new ArrayList<BaseFile>();
        RestClient c = createGitClient(getUserName(),getPassword());
        String path = URLEncoding.encodeURIString(getPath(),"utf-8",0,false);
        Object json = c.get(path,new RestClient.HandlerJson(JsonJavaFactory.instance)).getData();
        //System.out.println("Emit request for: "+path);       
        if(json instanceof List) {
          for(Object entry: (List)json) {
            if(entry instanceof Map) {
              Map m = (Map)entry;
View Full Code Here

    if(StringUtil.isEmpty(location)) {
      location = PathUtil.concat("http://127.0.0.1",getDatabase().getFilePath(),'/');
    }
   
    RestClient client = createDominoClient(location,source.getUserName(),source.getPassword());
   
    List<DocEntry> list = loadEntries(client,source);
    if(action!=null&&action.isCancelled()) {
      return 0;
    }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.RestClient$BasicAuthenticator

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.