Examples of WebAppException


Examples of webapp.WebAppException

            @Override
            public Void execute(PreparedStatement st) throws SQLException {
                st.setString(1, uuid);

                if (st.executeUpdate() == 0) {
                    throw new WebAppException("Resume not found", uuid);
                }
                return null;
            }
        });
    }
View Full Code Here

Examples of webapp.WebAppException

                            st.setString(1, resume.getFullName());
                            st.setString(2, resume.getHomePage());
                            st.setString(3, resume.getLocation());
                            st.setString(4, resume.getUuid());
                            if (st.executeUpdate()==0) {
                                throw new WebAppException("Resume not found", resume);
                            }
                        }
                        replaceContact(conn, resume);
                        return null;
                    }
View Full Code Here

Examples of webapp.WebAppException

    public void doSave(File file, Resume resume) {
        try {
            file.createNewFile();
        } catch (IOException e) {
            throw new WebAppException("Couldn't write file " + file.getAbsolutePath(), resume, e);
        }
        write(file, resume);
    }
View Full Code Here

Examples of webapp.WebAppException

    protected void write(File file, Resume resume) {
        try {
            doWrite(new FileOutputStream(file), resume);
        } catch (IOException e) {
            throw new WebAppException("Couldn't write file " + file.getAbsolutePath(), resume, e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

        try {
            Resume r = doRead(new FileInputStream(file));
            r.setUuid(file.getName());
            return r;
        } catch (IOException e) {
            throw new WebAppException("Couldn't read file " + file.getAbsolutePath(), e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

        if (!exist(ctx)) {
            LOGGER.info("Save resume with uuid=" + resume.getUuid());
            doSave(ctx, resume);
            return resume.getUuid();
        }
        throw new WebAppException("Resume " + resume + " already present", resume);
    }
View Full Code Here

Examples of webapp.WebAppException

        LOGGER.info("Load resume with uuid=" + uuid);
        C ctx = createCtx(uuid);
        if (exist(ctx)) {
            return doLoad(ctx);
        }
        throw new WebAppException("Resume not found", uuid);
    }
View Full Code Here

Examples of webapp.WebAppException

        C ctx = createCtx(uuid);
        if (exist(ctx)) {
            doDelete(ctx);
            return;
        }
        throw new WebAppException("Resume not found", uuid);
    }
View Full Code Here

Examples of webapp.WebAppException

        C ctx = createCtx(resume.getUuid());
        if (exist(ctx)) {
            doUpdate(ctx, resume);
            return;
        }
        throw new WebAppException("Resume not found", resume);
    }
View Full Code Here

Examples of webapp.WebAppException

    @Override
    protected Resume doRead(InputStream is) throws IOException {
        try (ObjectInputStream ois = new ObjectInputStream(is)) {
            return (Resume) ois.readObject();
        } catch (ClassNotFoundException e) {
            throw new WebAppException("Error read resume", e);
        }
    }
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.