Package lv.odylab.evemanage.application.exception.validation

Examples of lv.odylab.evemanage.application.exception.validation.InvalidNameException


    @Override
    @Caching
    public BlueprintDetailsDto getBlueprintDetailsForTypeName(String typeName) throws EveDbException, InvalidNameException {
        try {
            if (typeName.length() == 0) {
                throw new InvalidNameException(typeName, ErrorCode.NAME_CANNOT_BE_EMPTY);
            }
            lv.odylab.evedb.rpc.dto.BlueprintDetailsDto blueprintDetailsDto = client.getBlueprintDetailsForTypeName(typeName);
            return mapper.map(blueprintDetailsDto, BlueprintDetailsDto.class);
        } catch (BadRequestException e) {
            logger.error("Caught BadRequestException", e);
            throw new InvalidNameException(typeName, ErrorCode.INVALID_NAME);
        } catch (RuntimeException e) {
            logger.error("Caught RuntimeException", e);
            throw new EveDbException(e);
        }
    }
View Full Code Here


    @Override
    @Caching
    public Long getTypeID(String typeName) throws EveDbException, InvalidNameException {
        try {
            if (typeName.length() == 0) {
                throw new InvalidNameException(typeName, ErrorCode.NAME_CANNOT_BE_EMPTY);
            }
            return client.getTypeNameToTypeID(typeName);
        } catch (BadRequestException e) {
            logger.error("Caught BadRequestException", e);
            throw new InvalidNameException(typeName, ErrorCode.INVALID_NAME);
        } catch (RuntimeException e) {
            logger.error("Caught RuntimeException", e);
            throw new EveDbException(e);
        }
    }
View Full Code Here

    }

    @Override
    public PriceSet createPriceSet(String priceSetName, Key<User> userKey) throws InvalidNameException {
        if (priceSetName.length() == 0) {
            throw new InvalidNameException(priceSetName, ErrorCode.NAME_CANNOT_BE_EMPTY);
        }
        if (priceSetNameAlreadyExists(priceSetName, userKey)) {
            throw new InvalidNameException(priceSetName, ErrorCode.NAME_MUST_BE_UNIQUE);
        }
        PriceSet priceSet = new PriceSet();
        priceSet.setUser(userKey);
        priceSet.setName(priceSetName);
        priceSet.setAttachedCharacterInfo(null);
View Full Code Here

    }

    @Override
    public void renamePriceSet(Long priceSetID, String priceSetName, Key<User> userKey) throws InvalidNameException {
        if (priceSetName.length() == 0) {
            throw new InvalidNameException(priceSetName, ErrorCode.NAME_CANNOT_BE_EMPTY);
        }
        if (priceSetNameAlreadyExists(priceSetName, userKey)) {
            throw new InvalidNameException(priceSetName, ErrorCode.NAME_MUST_BE_UNIQUE);
        }
        PriceSet priceSet = priceSetDao.get(priceSetID, userKey);
        priceSet.setName(priceSetName);
        priceSet.setUpdatedDate(new Date());
        priceSetDao.put(priceSet, userKey);
View Full Code Here

TOP

Related Classes of lv.odylab.evemanage.application.exception.validation.InvalidNameException

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.