Package org.rhq.core.domain.drift.dto

Examples of org.rhq.core.domain.drift.dto.DriftChangeSetDTO


import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSetEntry;

public class Mapper {
   
    public DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet) {
        DriftChangeSetDTO dto = new DriftChangeSetDTO();
        dto.setId(changeSet.getId());
        dto.setResourceId(changeSet.getResourceId());
        dto.setDriftDefinitionId(changeSet.getDriftDefinitionId());
        dto.setDriftHandlingMode(changeSet.getDriftHandlingMode());
        dto.setVersion(changeSet.getVersion());
        dto.setCtime(changeSet.getCtime());
        dto.setCategory(changeSet.getCategory());

        return dto;
    }
View Full Code Here


        Mapper mapper = new Mapper();
        List<MongoDBChangeSet> changeSets = changeSetDAO.findByChangeSetCritiera(criteria);
        PageList<DriftChangeSetDTO> results = new PageList<DriftChangeSetDTO>();

        for (MongoDBChangeSet changeSet : changeSets) {
            DriftChangeSetDTO changeSetDTO = mapper.toDTO(changeSet);
            if (criteria.isFetchDrifts()) {
                Set<DriftDTO> entries = new HashSet<DriftDTO>();
                for (MongoDBChangeSetEntry entry : changeSet.getDrifts()) {
                    DriftDTO driftDTO = mapper.toDTO(entry);
                    driftDTO.setChangeSet(changeSetDTO);
                    entries.add(driftDTO);
                }
                changeSetDTO.setDrifts(entries);
            }
            results.add(changeSetDTO);
        }

        return results;
View Full Code Here

        for (MongoDBChangeSetEntry entry : entries) {
            MongoDBChangeSet changeSet = entry.getChangeSet();
            DriftDTO driftDTO = mapper.toDTO(entry);
            if (criteria.isFetchChangeSet()) {
                DriftChangeSetDTO changeSetDTO = mapper.toDTO(changeSet);
                driftDTO.setChangeSet(changeSetDTO);
            }
            results.add(new DriftComposite(driftDTO, resources.get(changeSet.getResourceId()),
                    changeSet.getDriftDefinitionName()));
        }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.drift.dto.DriftChangeSetDTO

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.