Package com.ibm.xsp

Examples of com.ibm.xsp.FacesExceptionEx


                                                                                                                                 
           try {                                                                                                                 
             httpResp = svc.get(serviceUrl,inputStream).getData();                                                                       
                                                                                                                                 
           } catch (ClientServicesException e) {                                                                                 
               throw new FacesExceptionEx(e, "Failed to perform proxy request");                                                 
           }                                                                                                                     
                                                                                                                                 
//             servletResponse.setContentType(((BasicHttpResponse)httpResp).getEntity().getContentType().getValue());                                   
//             // TODO - what is this?                                                                                             
//             String status = ((BasicHttpResponse)httpResp).getStatusLine().toString();                                                                
View Full Code Here


            BasicHttpResponse httpResp = null;
            Args args = new Args();
            try {
                httpResp = (BasicHttpResponse) svc.get(args).getData();
            } catch (ClientServicesException e) {
                throw new FacesExceptionEx(e, "Failed to execute proxy request");
            }

            servletResponse.setContentType(request.getParameter("mimeType"));

            String status = httpResp.getStatusLine().toString();
View Full Code Here

    public String buildHref(String path, Endpoint bean) {
        try {
            // Encode path URL for spaces & special characters
            path = URLEncoding.encodeURIString(path, null, 0, false);
        } catch (IOException e) {
            throw new FacesExceptionEx(e, "Failed to encode URI string: {0}", path);
        }
        String href = ExtLibUtil.concatPath(getDropBoxApiVersion(bean), "files/dropbox", '/');
        href = ExtLibUtil.concatPath(href, path, '/');
        return href;
    }
View Full Code Here

        javaSource.append(");\n");
      }
      if(exp>=0) {
        int stend = source.indexOf(END_TAG,exp+2);
        if(stend<0) {
          throw new FacesExceptionEx(null,"{0} without a closing {1}",START_TAG,END_TAG);
        }
       
        if(source.charAt(exp+2)=='=') {
          String sub = source.substring(exp+3,stend).trim();
          javaSource.append("    emit(out,");
View Full Code Here

      if(dec<0) {
        break;
      }
      int stend = source.indexOf(END_DECLARATION,dec+2);
      if(stend<0) {
        throw new FacesExceptionEx(null,"{0} without a closing {1}",START_DECLARATION,END_DECLARATION);
      }
     
      String text = source.substring(dec+3,stend).trim();
      b.append('\n');
      b.append(text);
View Full Code Here

    public String getPath() {
        try {
            return URLEncoding.encodeURIString(_path, null, 0, false);
        } catch (UnsupportedEncodingException e) {
            throw new FacesExceptionEx(e, "Failed to encode url, {0}", _path);
        } catch (IOException e) {
            throw new FacesExceptionEx(e, "Failed to encode url, {0}", _path);
        }
    }
View Full Code Here

                            IFileType ift = (IFileType) ((FileServiceAccessor)accessor).findService();
                            try {
                                ift.uploadFile(endpoint, serverFile, this, params);
                                refresh();
                            } catch (CloneNotSupportedException e) {
                                throw new FacesExceptionEx(e, "Failed to upload file to {0}", endpoint.getLabel());
                            }
                        }
                    }
                }
            }
View Full Code Here

            String fileServiceName = null;
            try {
                Endpoint provider = findEndpointBean();
                IFileType fileService = findService();
                if (fileService == null) {
                    throw new FacesExceptionEx(null, "The file service type is not assigned (null)");
                }

                // Compose the URL to the service
                // (delegate to the service type)
                Map<String, String> params = getParameters(fileService, index, blockSize);

                ClientService svc;
                String serviceUrl = getServiceUrl();
                if(StringUtil.isEmpty(serviceUrl)){
                    //TODO we need to tidy this up - the fileServiceData should not have a serviceUrl attribute - that should only be associated with the FileType
                    serviceUrl = fileService.getServiceUrl();
                }
                urlForLog = serviceUrl;
                fileServiceName = fileService.getType();
                // Check if rootFolder param is being used
                if (getRootFolder() == null || getRootFolder().length() < 1) {
                    // Create the service and and read the file entries
                    if(StringUtil.isNotEmpty(serviceUrl)){
                        serviceUrl = ExtLibUtil.concatPath(serviceUrl, getCurrentDirectory(), '/');
                    }
                    svc = createService(provider, fileService, serviceUrl);
                }
                else {
                    if (getRootFolder().charAt(0) != '/') {
                        setRootFolder("/" + getRootFolder());
                    }
                    String root = getRootFolder();
                    String curr = getCurrentDirectory();
                    String path = "";
                    if (curr.length() > root.length()) {
                        path = curr.substring(root.length(), curr.length());
                    }
                    // Create the service and and read the file entries
                    svc = createService(provider, fileService, serviceUrl + root + path);
                }
              
               
                List<FileEntry> entries = fileService.readFileEntries(svc, this, params, serviceUrl);

                FileEntry[] data = entries.toArray(new FileEntry[entries.size()]);
                return new ArrayBlock(index, data);
            } catch (Exception ex) {
                throw new FacesExceptionEx(ex, "Error while calling the file service: {0}. Failed to access URL: {1}", fileServiceName, urlForLog);
            }
        }
View Full Code Here

                HandlerXml handler = new HandlerXml();
                Document doc = (Document)svc.get(getServiceUrl(),parameters, handler).getData();
               
                return new XmlBlock(index,doc);
            } catch(Exception ex) {
                throw new FacesExceptionEx(ex,"Error while reading the Connections entries");
            }
        }
View Full Code Here

                        if(path.startsWith("/")){
                            path = path.substring(1);
                        }
                    }
                } catch (UnsupportedEncodingException e) {
                    throw new FacesExceptionEx(e, "Filed to decode file path for column ({0})", path);
                }
                return path;
            }
            if (name.equals("description")) {
                return getDescription();
View Full Code Here

TOP

Related Classes of com.ibm.xsp.FacesExceptionEx

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.