Package lv.odylab.evemanage.integration.eveapi.dto

Examples of lv.odylab.evemanage.integration.eveapi.dto.CharacterSheetDto


        apiKey.setApiKeyUserID(2L);
        apiKey.setEncodedApiKeyString(Base64.encodeBytes("encryptedApiKey".getBytes()));
        Character character = new Character();
        character.setCharacterID(1L);
        character.setApiKey(apiKeyKey);
        CharacterSheetDto characterSheetDto = new CharacterSheetDto();
        characterSheetDto.setCharacterID(1L);
        characterSheetDto.setName("characterName");
        characterSheetDto.setCorporationID(4L);
        characterSheetDto.setCorporationName("corporationName");
        List<String> corporationTitles = new ArrayList<String>();
        corporationTitles.add("corporationTitle1");
        corporationTitles.add("corporationTitle2");
        characterSheetDto.setCorporationTitles(corporationTitles);
        CorporationSheetDto corporationSheetDto = new CorporationSheetDto();
        corporationSheetDto.setTicker("ticker");
        corporationSheetDto.setAllianceID(5L);
        corporationSheetDto.setAllianceName("allianceName");
View Full Code Here


            logger.error("Caught NotFoundException", e);
            logger.error("Api key was not found in datastore despite character having reference to it, this is inconsistency, character: {} ({})", character.getName(), character.getCharacterID());
            throw new EveApiException("Character has invalid api key");
        }

        CharacterSheetDto characterSheetDto = eveApiGateway.getCharacterSheet(decodeApiKeyString(apiKey.getEncodedApiKeyString()), apiKey.getApiKeyUserID(), character.getCharacterID());
        CorporationSheetDto corporationSheetDto = eveApiGateway.getCorporationSheet(characterSheetDto.getCorporationID());
        character.setName(characterSheetDto.getName());
        character.setCorporationID(characterSheetDto.getCorporationID());
        character.setCorporationName(characterSheetDto.getCorporationName());
        character.setCorporationTitles(characterSheetDto.getCorporationTitles());
        character.setCorporationTicker(corporationSheetDto.getTicker());
        character.setAllianceID(corporationSheetDto.getAllianceID());
        character.setAllianceName(corporationSheetDto.getAllianceName());
        character.setUpdatedDate(new Date());
    }
View Full Code Here

        return itemTypeDto;
    }

    @Override
    public CharacterSheetDto map(ApiCharacterSheetResult apiCharacterSheetResult, Class<CharacterSheetDto> characterSheetDtoClass) {
        CharacterSheetDto characterSheetDto = new CharacterSheetDto();
        characterSheetDto.setCharacterID(apiCharacterSheetResult.getCharacterID());
        characterSheetDto.setName(apiCharacterSheetResult.getName());
        characterSheetDto.setCorporationName(apiCharacterSheetResult.getCorporationName());
        characterSheetDto.setCorporationID(apiCharacterSheetResult.getCorporationID());

        List<ApiCharacterGenericRow> corporationTitleRows = apiCharacterSheetResult.getCorporationTitles();
        List<String> corporationTitles = new ArrayList<String>();
        if (corporationTitleRows != null) {
            for (ApiCharacterGenericRow corporationTitleRow : corporationTitleRows) {
                corporationTitles.add(corporationTitleRow.getTitleName().toUpperCase());
            }
        }
        characterSheetDto.setCorporationTitles(corporationTitles);
        return characterSheetDto;
    }
View Full Code Here

TOP

Related Classes of lv.odylab.evemanage.integration.eveapi.dto.CharacterSheetDto

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.