Package org.apache.jackrabbit.vault.util.console

Examples of org.apache.jackrabbit.vault.util.console.ExecutionException


        if (item instanceof Node) {
            format((Node) item, row, flags, 0);
        } else if (item instanceof Property) {
            format((Property) item, row, flags, 0);
        } else {
            throw new ExecutionException("Illegal argument: " + item.getClass().getName());
        }
    }
View Full Code Here


    private void format(Property prop, Table.Row r, int flags, int indent) {
        PropertyDefinition def;
        try {
            def = prop.getDefinition();
        } catch (RepositoryException e) {
            throw new ExecutionException(e);
        }
        /*
        if ((flags & LS_FLAG_DEF) > 0) {
            StringBuffer buf = new StringBuffer();
            buf.append(def.isAutoCreated() ? "a" : "-");
View Full Code Here

            Node node = (Node) wo.unwrap();
            try {
                node.save();
                System.out.println("Modifications persisted.");
            } catch (RepositoryException e) {
                throw new ExecutionException("Error while saving: " + e);
            }
        } else {
            throw new ExecutionException("'save' only possible in repcontext");
        }
    }
View Full Code Here

    private Argument argJcrPath;
    private Argument argMountpoint;

    protected void doExecute(VaultFsConsoleExecutionContext ctx, CommandLine cl)
            throws Exception {
        throw new ExecutionException("internal error. command not supported in console");
    }
View Full Code Here

            } else {
                localPath = Text.getName(jcrPath);
            }
        }
        if (jcrPath == null || jcrPath.length() == 0 || !jcrPath.startsWith("/")) {
            throw new ExecutionException("JCR path needs to be absolute: " + jcrPath);
        }
        File localFile = app.getPlatformFile(localPath, false);
        if (localFile.isFile()) {
            throw new ExecutionException("Local file must be a directory: " + localFile.getPath());
        }
        if (!localFile.exists()) {
            localFile.mkdir();
        }
        VltContext vCtx = app.createVaultContext(localFile);
View Full Code Here

                localPath = Text.getName(jcrPath);
            }
        }
        File localFile = ctx.getVaultFsApp().getPlatformFile(localPath, false);
        if (localFile.isFile()) {
            throw new ExecutionException("Local file must be a directory: " + localFile.getPath());
        }
        if (!localFile.exists()) {
            localFile.mkdir();
        }
View Full Code Here

            VaultFsTransaction tx = remote.getFileSystem().startTransaction();
            tx.modify(remote, is);
            tx.commit();
            System.out.println(local.getName() + "  " + local.length() + " bytes.");
        } catch (IOException e) {
            throw new ExecutionException("Error while uploading file: " + e);
        } catch (RepositoryException e) {
            throw new ExecutionException("Error while uploading file: " + e);
        }
    }
View Full Code Here

            VaultFsTransaction tx = parent.getFileSystem().startTransaction();
            tx.add(path, is);
            tx.commit();
            System.out.println(local.getName() + "  " + local.length() + " bytes.");
        } catch (IOException e) {
            throw new ExecutionException("Error while uploading file: " + e);
        } catch (RepositoryException e) {
            throw new ExecutionException("Error while uploading file: " + e);
        }
    }
View Full Code Here

                    }
                }
            }
            row.addCol(f.getRelPath() + (isDir ? "/" : ""));
        } catch (RepositoryException e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

                defCredsProvider.setDefaultCredentials(getProperty(KEY_DEFAULT_CREDS));
            }
            File cwd = getPlatformFile("", true).getCanonicalFile();
            return new VltContext(cwd, localFile, repProvider, confCredsProvider);
        } catch (IOException e) {
            throw new ExecutionException(e);
        } catch (ConfigurationException e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.util.console.ExecutionException

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.