Package org.zanata.exception

Examples of org.zanata.exception.EntityMissingException


        }
    }

    private TransMemory getTM(Optional<TransMemory> tm, String slug) {
        if (!tm.isPresent()) {
            throw new EntityMissingException("Translation memory '" + slug
                    + "' was not found.");
        }
        return tm.get();
    }
View Full Code Here


            Optional<TransMemory> transMemory = transMemoryDAO.getBySlug(slug);
            if (transMemory.isPresent()) {
                transMemoryDAO.makeTransient(transMemory.get());
                return "Translation memory '" + slug + "' deleted";
            } else {
                throw new EntityMissingException(slug);
            }
        } finally {
            lockManagerServiceImpl.release(tmLock);
        }
    }
View Full Code Here

     */
    public int deleteTransMemoryContents(@Nonnull String slug) {
        int totalDeleted = 0;
        Optional<TransMemory> tm = getBySlug(slug);
        if (!tm.isPresent()) {
            throw new EntityMissingException("Translation memory " + slug
                    + " was not found.");
        }

        final int batchSize = 100;
        int deleted;
View Full Code Here

TOP

Related Classes of org.zanata.exception.EntityMissingException

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.