Package lv.odylab.evemanage.client.rpc.dto.priceset

Examples of lv.odylab.evemanage.client.rpc.dto.priceset.PriceSetDto


    public PriceSetTabFirstLoadActionResponse execute(PriceSetTabFirstLoadAction action) throws Exception {
        List<PriceSetNameDto> priceSetNames = clientFacade.getPriceSetNames();
        List<PriceSetNameDto> corporationPriceSetNames = clientFacade.getCorporationPriceSetNames();
        List<PriceSetNameDto> alliancePriceSetNames = clientFacade.getAlliancePriceSetNames();
        Integer currentPriceSetNameIndex = 0;
        PriceSetDto priceSet = null;
        if (priceSetNames.size() > 0) {
            Long priceSetID = priceSetNames.get(currentPriceSetNameIndex).getPriceSetID();
            priceSet = clientFacade.getPriceSet(priceSetID);
        }
        List<CharacterNameDto> attachedCharacterNames = clientFacade.getAvailableAttachedCharacterNames();
View Full Code Here


        this.clientFacade = clientFacade;
    }

    @Override
    public PriceSetSaveActionResponse execute(PriceSetSaveAction action) throws Exception {
        PriceSetDto priceSet = action.getPriceSet();
        CharacterNameDto attachedCharacterName = priceSet.getAttachedCharacterName();
        Long attachedCharacterID = null;
        if (attachedCharacterName != null) {
            attachedCharacterID = attachedCharacterName.getId();
        }
        clientFacade.savePriceSet(priceSet.getId(), priceSet.getItems(), priceSet.getSharingLevel(), attachedCharacterID);

        PriceSetSaveActionResponse response = new PriceSetSaveActionResponse();
        response.setPriceSet(clientFacade.getPriceSet(priceSet.getId()));
        return response;
    }
View Full Code Here

        this.clientFacade = clientFacade;
    }

    @Override
    public PriceSetCreateActionResponse execute(PriceSetCreateAction action) throws InvalidNameException {
        PriceSetDto priceSet = clientFacade.createPriceSet(action.getPriceSetName());
        List<PriceSetNameDto> priceSetNames = clientFacade.getPriceSetNames();
        Integer currentPriceSetNameIndex = getPriceSetIndexPosition(priceSetNames, priceSet.getName());

        PriceSetCreateActionResponse response = new PriceSetCreateActionResponse();
        response.setPriceSetNames(priceSetNames);
        response.setPriceSet(priceSet);
        response.setCurrentPriceSetNameIndex(currentPriceSetNameIndex);
View Full Code Here

        this.clientFacade = clientFacade;
    }

    @Override
    public PriceSetDeleteActionResponse execute(PriceSetDeleteAction action) throws Exception {
        PriceSetDto deletedPriceSet = clientFacade.getPriceSet(action.getPriceSetID());
        String deletedPriceSetName = deletedPriceSet.getName();

        clientFacade.deletePriceSet(action.getPriceSetID());
        List<PriceSetNameDto> priceSetNames = clientFacade.getPriceSetNames();
        Integer currentPriceSetNameIndex = 0;
        PriceSetDto priceSet = null;
        if (priceSetNames.size() > 0) {
            Long priceSetID = priceSetNames.get(currentPriceSetNameIndex).getPriceSetID();
            priceSet = clientFacade.getPriceSet(priceSetID);
        }
View Full Code Here

        this.clientFacade = clientFacade;
    }

    @Override
    public PriceSetLoadForAllianceActionResponse execute(PriceSetLoadForAllianceAction action) throws Exception {
        PriceSetDto priceSetDto = clientFacade.getAlliancePriceSet(action.getPriceSetID());

        PriceSetLoadForAllianceActionResponse response = new PriceSetLoadForAllianceActionResponse();
        response.setPriceSet(priceSetDto);
        return response;
    }
View Full Code Here

        return priceSetNameDto;
    }

    @Override
    public PriceSetDto map(PriceSet priceSet, Class<PriceSetDto> priceSetDtoClass) {
        PriceSetDto priceSetDto = new PriceSetDto();
        priceSetDto.setId(priceSet.getId());
        priceSetDto.setName(priceSet.getName());
        if (priceSet.getAttachedCharacterInfo() != null) {
            priceSetDto.setAttachedCharacterName(map(priceSet.getAttachedCharacterInfo(), CharacterNameDto.class));
        }
        priceSetDto.setSharingLevel(priceSet.getSharingLevel());
        priceSetDto.setCreatedDate(priceSet.getCreatedDate());
        priceSetDto.setUpdatedDate(priceSet.getUpdatedDate());
        List<PriceSetItemDto> priceSetItemDtoList = new ArrayList<PriceSetItemDto>();
        for (PriceSetItem priceSetItem : priceSet.getItems()) {
            priceSetItemDtoList.add(map(priceSetItem, PriceSetItemDto.class));
        }
        Collections.sort(priceSetItemDtoList, new PriceSetItemDtoComparator());
        priceSetDto.setItems(priceSetItemDtoList);
        return priceSetDto;
    }
View Full Code Here

TOP

Related Classes of lv.odylab.evemanage.client.rpc.dto.priceset.PriceSetDto

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.