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

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


    public PreferencesAddApiKeyActionResponse execute(PreferencesAddApiKeyAction action) throws Exception {
        Long apiKeyUserID;
        try {
            apiKeyUserID = Long.valueOf(action.getApiKeyUserID());
        } catch (NumberFormatException nfe) {
            throw new InvalidApiKeyException(action.getApiKeyUserID(), ErrorCode.INVALID_API_KEY_ID);
        }
        String apiKeyString = action.getApiKeyString();
        if (apiKeyString.length() != 64) {
            throw new InvalidApiKeyException(action.getApiKeyUserID(), ErrorCode.INVALID_API_KEY_ID);
        }
        clientFacade.createApiKey(apiKeyUserID, apiKeyString);
        List<ApiKeyDto> apiKeys = clientFacade.getApiKeys();
        UserDto user = clientFacade.getCurrentUser();
        CharacterDto mainCharacter = user.getMainCharacter();
View Full Code Here

TOP

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

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.