Examples of uploadFile()

  • org.modeshape.jcr.api.JcrTools.uploadFile()
    Upload the content in the supplied stream into the repository at the defined path, using the given session. This method will create a 'nt:file' node at the supplied path, and any non-existant ancestors with nodes of type 'nt:folder'. As defined by the JCR specification, the binary content (and other properties) will be placed on a child of the 'nt:file' node named 'jcr:content' with a node type of 'nt:resource'.

    This method always closes the supplied stream.

    @param session the JCR session @param path the path to the file @param stream the stream containing the content to be uploaded @return the newly created 'nt:file' node @throws RepositoryException if there is a problem uploading the file @throws IOException if there is a problem using the stream @throws IllegalArgumentException is any of the parameters are null
  • org.serviceconnector.api.cln.SCFileService.uploadFile()
    Upload file with default operation timeout. @param remoteFileName the remote file name to store the file @param inStream stream to upload @throws SCServiceException create file session to SC failed
    upload file to Server failed
    error message received from SC
  • org.uengine.util.ftp.Uploader.uploadFile()
  • sendspaceapi.Upload.Anonymous.AnonymousUpload.uploadFile()

  • Examples of org.apache.airavata.gfac.external.GridFtp.uploadFile()

                      // no need to do if it is unicore
                      if(isInputNonLocal) {
                        InputStream is = null;
                        try {
                          is = gridftpURL.toURL().openStream();
                          ftp.uploadFile(destURI, gssCred, (is));
                        }finally {
                          is.close();
                        }
                      } else {
                        // don't return destUri
    View Full Code Here

    Examples of org.apache.airavata.gfac.external.GridFtp.uploadFile()

                //if user give a url just to refer an endpoint, not a web resource we are not doing any transfer
                if (fileName != null && !"".equals(fileName)) {
                    destURI = GFacUtils.createGsiftpURI(endpoint, destLocalPath);
                    if (paramValue.startsWith("gsiftp")) {
                      // no need to do if it is unicore, as unicore will download this on user's behalf to the job space dir
                      if(isInputNonLocal) ftp.uploadFile(gridftpURL, destURI, gssCred);
                      else return paramValue;
                    } else if (paramValue.startsWith("file")) {
                        String localFile = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
                        FileInputStream fis = null;
                        try {
    View Full Code Here

    Examples of org.apache.airavata.gfac.external.GridFtp.uploadFile()

                    } else if (paramValue.startsWith("file")) {
                        String localFile = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
                        FileInputStream fis = null;
                        try {
                          fis = new FileInputStream(localFile);
                          ftp.uploadFile(destURI, gssCred, fis);
                        } catch (IOException e) {
                            throw new GFacException("Unable to create file : " + localFile ,e);
                        } finally {
                            if (fis != null) {
                                fis.close();
    View Full Code Here

    Examples of org.apache.airavata.gfac.external.GridFtp.uploadFile()

                      // no need to do if it is unicore
                      if(isInputNonLocal) {
                        InputStream is = null;
                        try {
                          is = gridftpURL.toURL().openStream();
                          ftp.uploadFile(destURI, gssCred, (is));
                        }finally {
                          is.close();
                        }
                      } else {
                        // don't return destUri
    View Full Code Here

    Examples of org.apache.airavata.gfac.gram.external.GridFtp.uploadFile()

                //if user give a url just to refer an endpoint, not a web resource we are not doing any transfer
                if (fileName != null && !"".equals(fileName)) {
                    destURI = GramProviderUtils.createGsiftpURI(endpoint, destLocalPath);
                    if (paramValue.startsWith("gsiftp")) {
                      // no need to do if it is unicore, as unicore will download this on user's behalf to the job space dir
                      if(isInputNonLocal) ftp.uploadFile(gridftpURL, destURI, gssCred);
                      else return paramValue;
                    } else if (paramValue.startsWith("file")) {
                        String localFile = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
                        FileInputStream fis = null;
                        try {
    View Full Code Here

    Examples of org.apache.airavata.gfac.gram.external.GridFtp.uploadFile()

                    } else if (paramValue.startsWith("file")) {
                        String localFile = paramValue.substring(paramValue.indexOf(":") + 1, paramValue.length());
                        FileInputStream fis = null;
                        try {
                          fis = new FileInputStream(localFile);
                          ftp.uploadFile(destURI, gssCred, fis);
                        } catch (IOException e) {
                            throw new GFacException("Unable to create file : " + localFile ,e);
                        } finally {
                            if (fis != null) {
                                fis.close();
    View Full Code Here

    Examples of org.apache.airavata.gfac.gram.external.GridFtp.uploadFile()

                      // no need to do if it is unicore
                      if(isInputNonLocal) {
                        InputStream is = null;
                        try {
                          is = gridftpURL.toURL().openStream();
                          ftp.uploadFile(destURI, gssCred, (is));
                        }finally {
                          is.close();
                        }
                      } else {
                        // don't return destUri
    View Full Code Here

    Examples of org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferService.uploadFile()

        public void testFileTransfer() throws Exception {
            // For testing purpose lets try uploading FileTransferClient.java file.
            DataHandler dataHandler = new DataHandler(new FileDataSource("FileTransferClient.java"));
            FileTransferService filetransfer = domain.getService(FileTransferService.class, "FileTransferServiceComponent");
            assertEquals("File uploaded Sucessfully", filetransfer.uploadFile(dataHandler));
        }

        @Override
        protected void setUp() throws Exception {
            domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite");
    View Full Code Here

    Examples of org.jahia.services.content.JCRNodeWrapper.uploadFile()

                            googleDocsServiceFactory.getDocsService(getRequest(), getResponse());
                    InputStream content = googleDocsService.downloadFile(uri);
                    try {
                        JCRNodeWrapper parent = node.getParent();
                        session.checkout(parent);
                        parent.uploadFile(node.getName(), content, node.getFileContent().getContentType());
                        session.save();
                    } finally {
                        IOUtils.closeQuietly(content);
                        String docId = null;
                        if (uri.contains("docId=")) {
    View Full Code Here

    Examples of org.jahia.services.content.JCRNodeWrapper.uploadFile()

                        if (zipentry.isDirectory()) {
                            target.createCollection(JCRContentUtils.escapeLocalNodeName(filename));
                        } else {
                            String contentType = JahiaContextLoaderListener.getServletContext().getMimeType(filename);
                            target.uploadFile(filename, zis, contentType);
                        }
                        result = true;
                    } /*catch (IOException e) {
                        logger.error("Error when unzipping file", e);
                        if (filename != null) {
    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.