Package eu.lsem.bakalarka.model

Examples of eu.lsem.bakalarka.model.Directory


        final int result = thesesDao.updateParentDirectory(thesisId, directoryId);
        return (result==0 ? new CustomErrorResolution(400) : new TextResolution("OK"));
    }

    public Resolution deleteDirectory() {
        Directory dirToDelete = directoriesDao.getDirectory(directoryId);
        Integer deleted = directoriesDao.deleteDirectoriesAndMoveTheses(directoryId);
        if (deleted == 1) {
            getContext().getMessages().add(new SimpleMessage("Adres�� \"{0}\" byl smaz�n", dirToDelete.getName()));
        }
        return new RedirectResolution(BrowseThesesActionBean.class).addParameter("directoryId", dirToDelete.getParentId());
    }
View Full Code Here


        Integer deleted = (Integer) transactionTemplate.execute(new TransactionCallback() {

            @Override
            public Object doInTransaction(TransactionStatus status) {
                try {
                    Directory dirToDelete = getDirectory(rootDirId); //adr.ktery smazat
                    moveThesesInDirectory(dirToDelete.getId(), dirToDelete.getParentId());
                    return getSqlMapClientTemplate().delete("Directories.deleteDirectory", dirToDelete.getId());
                } catch (DataAccessException e) {
                    exc[0] = e;
                }
                return null;
            }
View Full Code Here

   
    @Override
    public List<Directory> getDirectoriesPath(Integer directoryId) {
        LinkedList<Directory> list = new LinkedList<Directory>();
        while (directoryId != null) {
            Directory currentDir = getDirectory(directoryId);
            list.addFirst(currentDir);
            directoryId = currentDir.getParentId();
        }

        list.addFirst(new Directory());
        return list;


    }
View Full Code Here

TOP

Related Classes of eu.lsem.bakalarka.model.Directory

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.