Projects >> candlepin >>6d5cdec7eff93edcb48bee535fcc284208eab9b9

Chunk
Conflicting content
 */
package org.fedoraproject.candlepin.audit;

<<<<<<< HEAD
import org.fedoraproject.candlepin.auth.Principal;
import org.fedoraproject.candlepin.auth.PrincipalData;
import org.fedoraproject.candlepin.model.Persisted;
import org.fedoraproject.candlepin.util.Util;

import org.hibernate.annotations.GenericGenerator;

=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
import java.util.Date;

import javax.persistence.Column;
Solution content
 */
package org.fedoraproject.candlepin.audit;

import java.util.Date;

import javax.persistence.Column;
File
Event.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
=======
@Table(name = "cp_event")
@XmlRootElement(namespace = "http://fedorahosted.org/candlepin/Event")
@XmlAccessorType(XmlAccessType.PROPERTY)
<<<<<<< HEAD
public class Event implements Persisted {
@FilterDefs({ @FilterDef(name = "Event_OWNER_FILTER",
    parameters = @ParamDef(name = "owner_ids", type = "string")) })
@Filters({ @Filter(name = "Event_OWNER_FILTER", condition = "ownerId in (:owner_ids)") })
public class Event implements Persisted, AccessControlEnforced {
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf

    private static final long serialVersionUID = 1L;
Solution content
@Table(name = "cp_event")
@XmlRootElement(namespace = "http://fedorahosted.org/candlepin/Event")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class Event implements Persisted {

    private static final long serialVersionUID = 1L;
File
Event.java
Developer's decision
Version 1
Kind of conflict
Annotation
Class signature
Chunk
Conflicting content
    private static final HashMap MESSAGES;
    
=======
 * EventAdapterImpl
 */
public class EventAdapterImpl implements EventAdapter {
<<<<<<< HEAD
    
    private static HashMap messages;

>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    private I18n i18n;
    private Config config;
Solution content
 * EventAdapterImpl
 */
public class EventAdapterImpl implements EventAdapter {

    private static final HashMap MESSAGES;

    private I18n i18n;
    private Config config;
File
EventAdapterImpl.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    //TODO: Make them nicer strings if the system did it
    static {
<<<<<<< HEAD
        MESSAGES = new HashMap();
        MESSAGES.put("CONSUMERCREATED", I18n.marktr("{0} created new consumer {1}"));
        MESSAGES.put("CONSUMERMODIFED", I18n.marktr("{0} modifed the consumer {1}"));
        MESSAGES.put("CONSUMERDELETED", I18n.marktr("{0} deleted the consumer {1}"));
        MESSAGES.put("OWNERCREATED", I18n.marktr("{0} created new owner {1}"));
        MESSAGES.put("OWNERMODIFED", I18n.marktr("{0} modifed the owner {1}"));
        MESSAGES.put("OWNERDELETED", I18n.marktr("{0} deleted the owner {1}"));
        MESSAGES.put("ENTITLEMENTCREATED",
            I18n.marktr("{0} consumed a subscription for product {1}"));
        MESSAGES.put("ENTITLEMENTMODIFED",
            I18n.marktr("{0} modified a subscription for product {1}"));
        MESSAGES.put("ENTITLEMENTDELETED",
            I18n.marktr("{0} returned the subscription for {1}")); 
        MESSAGES.put("POOLCREATED", I18n.marktr("{0} created a pool for product {1}"));
        MESSAGES.put("POOLMODIFED", I18n.marktr("{0} modified a pool for product {1}"));
        MESSAGES.put("POOLDELETED", I18n.marktr("{0} deleted a pool for product {1}"));
        MESSAGES.put("EXPORTCREATED",
            I18n.marktr("{0} created an export for consumer {1}"));
        MESSAGES.put("IMPORTCREATED", I18n.marktr("{0} imported a manifest for owner {1}"));
        MESSAGES.put("USERCREATED", I18n.marktr("{0} created new user {1}"));
        MESSAGES.put("USERMODIFED", I18n.marktr("{0} modifed the user {1}"));
        MESSAGES.put("USERDELETED", I18n.marktr("{0} deleted the user {1}"));
        MESSAGES.put("ROLECREATED", I18n.marktr("{0} created new role {1}"));
        MESSAGES.put("ROLEMODIFED", I18n.marktr("{0} modifed the role {1}"));
        MESSAGES.put("ROLEDELETED", I18n.marktr("{0} deleted the role {1}"));
        MESSAGES.put("SUBSCRIPTIONCREATED",
            I18n.marktr("{0} created new subscription for product {1}"));
        MESSAGES.put("SUBSCRIPTIONMODIFED",
            I18n.marktr("{0} modifed a subscription for product {1}"));
        MESSAGES.put("SUBSCRIPTIONDELETED",
            I18n.marktr("{0} deleted a subscription for product{1}"));        
=======
        messages = new HashMap();
        messages.put("CONSUMERCREATED", I18n.marktr("{0} created new consumer {1}"));
        messages.put("CONSUMERMODIFED", I18n.marktr("{0} modifed the consumer {1}"));
        messages.put("CONSUMERDELETED", I18n.marktr("{0} deleted the consumer {1}"));
        messages.put("OWNERCREATED", I18n.marktr("{0} created new owner {1}"));
        messages.put("OWNERMODIFED", I18n.marktr("{0} modifed the owner {1}"));
        messages.put("OWNERDELETED", I18n.marktr("{0} deleted the owner {1}"));
        messages.put("ENTITLEMENTCREATED",
            I18n.marktr("{0} consumed a subscription for product {1}"));
        messages.put("ENTITLEMENTMODIFED",
            I18n.marktr("{0} modified a subscription for product {1}"));
        messages.put("ENTITLEMENTDELETED",
            I18n.marktr("{0} returned the subscription for {1}"));
        messages.put("POOLCREATED", I18n.marktr("{0} created a pool for product {1}"));
        messages.put("POOLMODIFED", I18n.marktr("{0} modified a pool for product {1}"));
        messages.put("POOLDELETED", I18n.marktr("{0} deleted a pool for product {1}"));
        messages.put("EXPORTCREATED",
            I18n.marktr("{0} created an export for consumer {1}"));
        messages.put("IMPORTCREATED", I18n.marktr("{0} imported a manifest for owner {1}"));
        messages.put("USERCREATED", I18n.marktr("{0} created new user {1}"));
        messages.put("USERMODIFED", I18n.marktr("{0} modifed the user {1}"));
        messages.put("USERDELETED", I18n.marktr("{0} deleted the user {1}"));
        messages.put("ROLECREATED", I18n.marktr("{0} created new role {1}"));
        messages.put("ROLEMODIFED", I18n.marktr("{0} modifed the role {1}"));
        messages.put("ROLEDELETED", I18n.marktr("{0} deleted the role {1}"));
        messages.put("SUBSCRIPTIONCREATED",
            I18n.marktr("{0} created new subscription for product {1}"));
        messages.put("SUBSCRIPTIONMODIFED",
            I18n.marktr("{0} modifed a subscription for product {1}"));
        messages.put("SUBSCRIPTIONDELETED",
            I18n.marktr("{0} deleted a subscription for product {1}"));
        messages.put("ACTIVATIONKEYCREATED",
            I18n.marktr("{0} created the activation key {1}"));
        messages.put("ACTIVATIONKEYDELETED",
            I18n.marktr("{0} deleted the activation key {1}"));
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    }

}
Solution content
    //TODO: Make them nicer strings if the system did it
    static {
        MESSAGES = new HashMap();
        MESSAGES.put("CONSUMERCREATED", I18n.marktr("{0} created new consumer {1}"));
        MESSAGES.put("CONSUMERMODIFED", I18n.marktr("{0} modifed the consumer {1}"));
        MESSAGES.put("CONSUMERDELETED", I18n.marktr("{0} deleted the consumer {1}"));
        MESSAGES.put("OWNERCREATED", I18n.marktr("{0} created new owner {1}"));
        MESSAGES.put("OWNERMODIFED", I18n.marktr("{0} modifed the owner {1}"));
        MESSAGES.put("OWNERDELETED", I18n.marktr("{0} deleted the owner {1}"));
        MESSAGES.put("ENTITLEMENTCREATED",
            I18n.marktr("{0} consumed a subscription for product {1}"));
        MESSAGES.put("ENTITLEMENTMODIFED",
            I18n.marktr("{0} modified a subscription for product {1}"));
        MESSAGES.put("ENTITLEMENTDELETED",
            I18n.marktr("{0} returned the subscription for {1}"));
        MESSAGES.put("POOLCREATED", I18n.marktr("{0} created a pool for product {1}"));
        MESSAGES.put("POOLMODIFED", I18n.marktr("{0} modified a pool for product {1}"));
        MESSAGES.put("POOLDELETED", I18n.marktr("{0} deleted a pool for product {1}"));
        MESSAGES.put("EXPORTCREATED",
            I18n.marktr("{0} created an export for consumer {1}"));
        MESSAGES.put("IMPORTCREATED", I18n.marktr("{0} imported a manifest for owner {1}"));
        MESSAGES.put("USERCREATED", I18n.marktr("{0} created new user {1}"));
        MESSAGES.put("USERMODIFED", I18n.marktr("{0} modifed the user {1}"));
        MESSAGES.put("USERDELETED", I18n.marktr("{0} deleted the user {1}"));
        MESSAGES.put("ROLECREATED", I18n.marktr("{0} created new role {1}"));
        MESSAGES.put("ROLEMODIFED", I18n.marktr("{0} modifed the role {1}"));
        MESSAGES.put("ROLEDELETED", I18n.marktr("{0} deleted the role {1}"));
        MESSAGES.put("SUBSCRIPTIONCREATED",
            I18n.marktr("{0} created new subscription for product {1}"));
        MESSAGES.put("SUBSCRIPTIONMODIFED",
            I18n.marktr("{0} modifed a subscription for product {1}"));
        MESSAGES.put("SUBSCRIPTIONDELETED",
            I18n.marktr("{0} deleted a subscription for product {1}"));
        MESSAGES.put("ACTIVATIONKEYCREATED",
            I18n.marktr("{0} created the activation key {1}"));
        MESSAGES.put("ACTIVATIONKEYDELETED",
            I18n.marktr("{0} deleted the activation key {1}"));
    }

}
File
EventAdapterImpl.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
            new TransportConfiguration(InVMConnectorFactory.class.getName()));
    }

<<<<<<< HEAD
    @Override
=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    public void sendEvent(Event event) {
        if (log.isDebugEnabled()) {
            log.debug("Sending event - " + event);
Solution content
            new TransportConfiguration(InVMConnectorFactory.class.getName()));
    }

    @Override
    public void sendEvent(Event event) {
        if (log.isDebugEnabled()) {
            log.debug("Sending event - " + event);
File
EventSinkImpl.java
Developer's decision
Version 1
Kind of conflict
Annotation
Chunk
Conflicting content
import org.fedoraproject.candlepin.resource.ActivationKeyResource;
import org.fedoraproject.candlepin.resource.AdminResource;
import org.fedoraproject.candlepin.resource.AtomFeedResource;
<<<<<<< HEAD
import org.fedoraproject.candlepin.resource.RoleResource;
import org.fedoraproject.candlepin.resource.UserResource;
=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
import org.fedoraproject.candlepin.resource.CertificateSerialResource;
import org.fedoraproject.candlepin.resource.ConsumerResource;
import org.fedoraproject.candlepin.resource.ConsumerTypeResource;
Solution content
import org.fedoraproject.candlepin.resource.ActivationKeyResource;
import org.fedoraproject.candlepin.resource.AdminResource;
import org.fedoraproject.candlepin.resource.AtomFeedResource;
import org.fedoraproject.candlepin.resource.RoleResource;
import org.fedoraproject.candlepin.resource.CertificateSerialResource;
import org.fedoraproject.candlepin.resource.ConsumerResource;
import org.fedoraproject.candlepin.resource.ConsumerTypeResource;
File
CandlepinModule.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
import com.google.inject.name.Names;
import com.wideplay.warp.persist.jpa.JpaUnit;

<<<<<<< HEAD
import org.quartz.JobListener;
import org.quartz.spi.JobFactory;
import org.xnap.commons.i18n.I18n;

import java.util.Properties;
import org.fedoraproject.candlepin.auth.interceptor.SecurityHole;

=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
/**
 * CandlepinProductionConfiguration
 */
Solution content
import com.google.inject.name.Names;
import com.wideplay.warp.persist.jpa.JpaUnit;

import org.fedoraproject.candlepin.auth.interceptor.SecurityHole;
/**
 * CandlepinProductionConfiguration
 */
File
CandlepinModule.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
            "org.fedoraproject.candlepin.resource"));
        SecurityInterceptor securityEnforcer = new SecurityInterceptor();
        requestInjection(securityEnforcer);
<<<<<<< HEAD
        bindInterceptor(resourcePkgMatcher, 
                Matchers.not(Matchers.annotatedWith(SecurityHole.class)),
                securityEnforcer);
        
//        AccessControlInterceptor accessControlInterceptor =
//              new AccessControlInterceptor();
//        requestInjection(accessControlInterceptor);
//        
//        bindInterceptor(
//            Matchers.subclassesOf(AbstractHibernateCurator.class),
//            Matchers.annotatedWith(EnforceAccessControl.class), 
//            accessControlInterceptor);
        
=======
        bindInterceptor(resourcePkgMatcher, Matchers.any(), securityEnforcer);

        bindInterceptor(
            Matchers.subclassesOf(AbstractHibernateCurator.class),
            Matchers.annotatedWith(AllowRoles.class),
            securityEnforcer);

        AccessControlInterceptor accessControlInterceptor = new AccessControlInterceptor();
        requestInjection(accessControlInterceptor);

        bindInterceptor(
            Matchers.subclassesOf(AbstractHibernateCurator.class),
            Matchers.annotatedWith(EnforceAccessControl.class),
            accessControlInterceptor);

>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
        //amqp stuff below...

        bind(Function.class).annotatedWith(Names.named("abc"))
Solution content
            "org.fedoraproject.candlepin.resource"));
        SecurityInterceptor securityEnforcer = new SecurityInterceptor();
        requestInjection(securityEnforcer);
        bindInterceptor(resourcePkgMatcher, 
                Matchers.not(Matchers.annotatedWith(SecurityHole.class)),
                securityEnforcer);

//        AccessControlInterceptor accessControlInterceptor =
//              new AccessControlInterceptor();
//        requestInjection(accessControlInterceptor);
//        
//        bindInterceptor(
//            Matchers.subclassesOf(AbstractHibernateCurator.class),
//            Matchers.annotatedWith(EnforceAccessControl.class), 
//            accessControlInterceptor);

        //amqp stuff below...

        bind(Function.class).annotatedWith(Names.named("abc"))
File
CandlepinModule.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD
     * Kind of crazy - an owner owns itself.  This is so that the OwnerPermissions
     * will work properly when Owner is the target.
     *
     * @return this
     */
    @XmlTransient
    @Override
    public Owner getOwner() {
        return this;
    }

=======
     * @return the activationKeys
     */
    @XmlTransient
    public Set getActivationKeys() {
        return activationKeys;
    }

    /**
     * @param activationKeys the activationKeys to set
     */
    public void setActivationKeys(Set activationKeys) {
        this.activationKeys = activationKeys;
    }
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
}
Solution content
    }

    /**
     * Kind of crazy - an owner owns itself.  This is so that the OwnerPermissions
     * will work properly when Owner is the target.
     *
     * @return this
     */
    @XmlTransient
    @Override
    public Owner getOwner() {
        return this;
    }

    /**
     * @return the activationKeys
     */
    @XmlTransient
    public Set getActivationKeys() {
        return activationKeys;
    }

    /**
     * @param activationKeys the activationKeys to set
     */
    public void setActivationKeys(Set activationKeys) {
        this.activationKeys = activationKeys;
    }
}
File
Owner.java
Developer's decision
Concatenation
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
import org.fedoraproject.candlepin.exceptions.CandlepinException;
import org.fedoraproject.candlepin.exceptions.IseException;
import org.fedoraproject.candlepin.exceptions.NotFoundException;
<<<<<<< HEAD
import org.fedoraproject.candlepin.model.ConsumerTypeCurator;
import org.fedoraproject.candlepin.model.ConsumerType;
=======
import org.fedoraproject.candlepin.model.ActivationKey;
import org.fedoraproject.candlepin.model.ActivationKeyCurator;
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
import org.fedoraproject.candlepin.model.Consumer;
import org.fedoraproject.candlepin.model.ConsumerCurator;
import org.fedoraproject.candlepin.model.Entitlement;
Solution content
import org.fedoraproject.candlepin.exceptions.CandlepinException;
import org.fedoraproject.candlepin.exceptions.IseException;
import org.fedoraproject.candlepin.exceptions.NotFoundException;
import org.fedoraproject.candlepin.model.ActivationKey;
import org.fedoraproject.candlepin.model.ActivationKeyCurator;
import org.fedoraproject.candlepin.model.ConsumerTypeCurator;
import org.fedoraproject.candlepin.model.ConsumerType;
import org.fedoraproject.candlepin.model.Consumer;
import org.fedoraproject.candlepin.model.ConsumerCurator;
import org.fedoraproject.candlepin.model.Entitlement;
File
OwnerResource.java
Developer's decision
Concatenation
Kind of conflict
Import
Chunk
Conflicting content
import org.fedoraproject.candlepin.model.OwnerPermissionCurator;
import org.fedoraproject.candlepin.model.Pool;
import org.fedoraproject.candlepin.model.PoolCurator;
<<<<<<< HEAD
=======
import org.fedoraproject.candlepin.model.ProductCurator;
import org.fedoraproject.candlepin.model.Statistic;
import org.fedoraproject.candlepin.model.StatisticCurator;
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
import org.fedoraproject.candlepin.model.Subscription;
import org.fedoraproject.candlepin.model.SubscriptionCurator;
import org.fedoraproject.candlepin.model.User;
Solution content
import org.fedoraproject.candlepin.model.Statistic;
import org.fedoraproject.candlepin.model.OwnerPermissionCurator;
import org.fedoraproject.candlepin.model.Pool;
import org.fedoraproject.candlepin.model.PoolCurator;
import org.fedoraproject.candlepin.model.StatisticCurator;
import org.fedoraproject.candlepin.model.Subscription;
import org.fedoraproject.candlepin.model.SubscriptionCurator;
import org.fedoraproject.candlepin.model.User;
File
OwnerResource.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
    private Importer importer;
    private ExporterMetadataCurator exportCurator;
    private ImportRecordCurator importRecordCurator;
<<<<<<< HEAD
    private OwnerPermissionCurator permissionCurator;
=======
    private StatisticCurator statisticCurator;
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    private PoolManager poolManager;
    private ConsumerTypeCurator consumerTypeCurator;
    private static final int FEED_LIMIT = 1000;
Solution content
    private Importer importer;
    private ExporterMetadataCurator exportCurator;
    private ImportRecordCurator importRecordCurator;
    private OwnerPermissionCurator permissionCurator;
    private PoolManager poolManager;
    private ConsumerTypeCurator consumerTypeCurator;
    private static final int FEED_LIMIT = 1000;
File
OwnerResource.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
    @Inject
    public OwnerResource(OwnerCurator ownerCurator, PoolCurator poolCurator,
<<<<<<< HEAD
        SubscriptionCurator subscriptionCurator,
        SubscriptionTokenCurator subscriptionTokenCurator,
        ConsumerCurator consumerCurator,
        I18n i18n, UserServiceAdapter userService,
        EventSink sink, EventFactory eventFactory,
        EventCurator eventCurator, EventAdapter eventAdapter,
        Importer importer, PoolManager poolManager, ExporterMetadataCurator exportCurator,
=======
        ProductCurator productCurator, SubscriptionCurator subscriptionCurator,
        ActivationKeyCurator activationKeyCurator,
        ConsumerCurator consumerCurator,
        StatisticCurator statisticCurator, I18n i18n,
        UserServiceAdapter userService, EventSink sink,
        EventFactory eventFactory, EventCurator eventCurator,
        EventAdapter eventAdapter, Importer importer, PoolManager poolManager,
        ExporterMetadataCurator exportCurator,
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
        OwnerInfoCurator ownerInfoCurator,
        ImportRecordCurator importRecordCurator,
        SubscriptionServiceAdapter subService,
Solution content
    @Inject
    public OwnerResource(OwnerCurator ownerCurator, PoolCurator poolCurator,
        SubscriptionCurator subscriptionCurator,
        ActivationKeyCurator activationKeyCurator,
        ConsumerCurator consumerCurator,
        StatisticCurator statisticCurator,
        I18n i18n, UserServiceAdapter userService,
        EventSink sink, EventFactory eventFactory,
        EventCurator eventCurator, EventAdapter eventAdapter,
        Importer importer, PoolManager poolManager, ExporterMetadataCurator exportCurator,
        OwnerInfoCurator ownerInfoCurator,
        ImportRecordCurator importRecordCurator,
        SubscriptionServiceAdapter subService,
File
OwnerResource.java
Developer's decision
Manual
Kind of conflict
Variable
Chunk
Conflicting content
    }

    @GET
<<<<<<< HEAD
    @Path("{owner_key}/imports")
    public List getImports(
        @PathParam("owner_key") @Verify(Owner.class) String ownerKey) {
        Owner owner = findOwner(ownerKey);
        
        return this.importRecordCurator.findRecords(owner);
    }

=======
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    @Path("{owner_key}/statistics")
    @AllowRoles(roles = { Role.OWNER_ADMIN })
    public List getStatistics(
        @PathParam("owner_key") String ownerKey,
        @QueryParam("from") String from,
        @QueryParam("to") String to) {
        Owner o = findOwner(ownerKey);
        return statisticCurator.getStatisticsByOwner(o, "", "", 
                                  parseDateString(from), parseDateString(to));
    }

    @GET
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    @Path("{owner_key}/statistics/{type}")
    @AllowRoles(roles = { Role.OWNER_ADMIN })
    public List getStatistics(
        @PathParam("owner_key") String ownerKey,
        @PathParam("type") String qType, 
        @QueryParam("reference") String reference,
        @QueryParam("from") String from,
        @QueryParam("to") String to) {
        Owner o = findOwner(ownerKey);
        return statisticCurator.getStatisticsByOwner(o, qType, reference, 
                                  parseDateString(from), parseDateString(to));
    }
    
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    private void recordImportSuccess(Owner owner) {
        ImportRecord record = new ImportRecord(owner);
        record.recordStatus(ImportRecord.Status.SUCCESS,
Solution content
    }

    @GET
    @Path("{owner_key}/imports")
    public List getImports(
        @PathParam("owner_key") @Verify(Owner.class) String ownerKey) {
        Owner owner = findOwner(ownerKey);
        
        return this.importRecordCurator.findRecords(owner);
    }

    @GET
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    @Path("{owner_key}/statistics")
    public List getStatistics(
        @PathParam("owner_key") @Verify(Owner.class) String ownerKey,
        @QueryParam("from") String from,
        @QueryParam("to") String to) {
        Owner o = findOwner(ownerKey);
        return statisticCurator.getStatisticsByOwner(o, "", "", 
                                  parseDateString(from), parseDateString(to));
    }

    @GET
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    @Path("{owner_key}/statistics/{type}")
    public List getStatistics(
        @PathParam("owner_key") @Verify(Owner.class) String ownerKey,
        @PathParam("type") String qType, 
        @QueryParam("reference") String reference,
        @QueryParam("from") String from,
        @QueryParam("to") String to) {
        Owner o = findOwner(ownerKey);
        return statisticCurator.getStatisticsByOwner(o, qType, reference, 
                                  parseDateString(from), parseDateString(to));
    }
    
    private void recordImportSuccess(Owner owner) {
        ImportRecord record = new ImportRecord(owner);
        record.recordStatus(ImportRecord.Status.SUCCESS,
File
OwnerResource.java
Developer's decision
Manual
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
import javax.ws.rs.core.MediaType;

import org.apache.log4j.Logger;
<<<<<<< HEAD
=======
import org.fedoraproject.candlepin.auth.Role;
import org.fedoraproject.candlepin.auth.interceptor.AllowRoles;
import org.fedoraproject.candlepin.model.RulesCurator;
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
import org.fedoraproject.candlepin.model.Status;

import com.google.inject.Inject;
Solution content
import javax.ws.rs.core.MediaType;

import org.apache.log4j.Logger;
import org.fedoraproject.candlepin.model.RulesCurator;
import org.fedoraproject.candlepin.model.Status;

import com.google.inject.Inject;
File
StatusResource.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
import com.google.inject.matcher.Matchers;
import com.google.inject.name.Names;
import com.wideplay.warp.persist.jpa.JpaUnit;
<<<<<<< HEAD
import org.fedoraproject.candlepin.auth.interceptor.SecurityHole;
import org.fedoraproject.candlepin.controller.PoolManager;
import org.fedoraproject.candlepin.policy.PoolRules;
import org.fedoraproject.candlepin.policy.js.JsRules;
import org.fedoraproject.candlepin.policy.js.JsRulesProvider;
import org.fedoraproject.candlepin.policy.js.pool.JsPoolRules;
=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf

public class CandlepinCommonTestingModule extends CandlepinModule {
Solution content
import com.google.inject.matcher.Matchers;
import com.google.inject.name.Names;
import com.wideplay.warp.persist.jpa.JpaUnit;
import org.fedoraproject.candlepin.auth.interceptor.SecurityHole;

public class CandlepinCommonTestingModule extends CandlepinModule {
File
CandlepinCommonTestingModule.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
        securityInterceptor = new TestingInterceptor(se);

        bindInterceptor(Matchers.inPackage(Package
<<<<<<< HEAD
            .getPackage("org.fedoraproject.candlepin.resource")), 
            Matchers.not(Matchers.annotatedWith(SecurityHole.class)),
            securityInterceptor);
=======
            .getPackage("org.fedoraproject.candlepin.resource")),
            Matchers.any(), securityInterceptor);
        bindInterceptor(Matchers.subclassesOf(AbstractHibernateCurator.class),
            Matchers.annotatedWith(AllowRoles.class), securityInterceptor);
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf

//        AccessControlInterceptor crud = new AccessControlInterceptor();
//        requestInjection(crud);
Solution content
        securityInterceptor = new TestingInterceptor(se);

        bindInterceptor(Matchers.inPackage(Package
            .getPackage("org.fedoraproject.candlepin.resource")), 
            Matchers.not(Matchers.annotatedWith(SecurityHole.class)),
            securityInterceptor);

//        AccessControlInterceptor crud = new AccessControlInterceptor();
//        requestInjection(crud);
File
CandlepinCommonTestingModule.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    }

    @Test
<<<<<<< HEAD
    public void bindByTokenNewSubscription() {
        Product prod = TestUtil.createProduct();
        productCurator.create(prod);

        Subscription sub = TestUtil.createSubscription(owner, prod);

        SubscriptionToken token = TestUtil.createSubscriptionToken();
        token.setSubscription(sub);
        subCurator.create(sub);
        subTokenCurator.create(token);
        assertEquals(0, poolCurator.listByOwnerAndProduct(owner, prod.getId())
            .size());

        consumerResource.bind(consumer.getUuid(), null, token.getToken(), null,
            1, null, null);
        assertEquals(1, poolCurator.listByOwnerAndProduct(owner, prod.getId())
            .size());
    }

    @Test
    public void bindByTokenPreExistingSubscription() {
        setupPrincipal(owner, Access.ALL);

        Product prod = TestUtil.createProduct();
        productCurator.create(prod);

        Subscription sub = TestUtil.createSubscription(owner, prod);

        SubscriptionToken token = TestUtil.createSubscriptionToken();
        token.setSubscription(sub);
        subCurator.create(sub);
        subTokenCurator.create(token);
        poolManager.refreshPools(owner);
        List pools = poolCurator.listByOwnerAndProduct(owner,
            prod.getId());
        assertEquals(1, pools.size());

        List ents = consumerResource.bind(consumer.getUuid(),
            null, token.getToken(), null, 1, null, null);
        assertEquals(1, ents.size());
        assertEquals(sub.getId(), ents.get(0).getPool().getSubscriptionId());
        assertEquals(1, poolCurator.listByOwnerAndProduct(owner, prod.getId())
            .size());
    }

    @Test
=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    public void personalNameOverride() {
        Consumer personal = TestUtil.createConsumer(personType, owner);
Solution content
    @Test
    }

    public void personalNameOverride() {
        Consumer personal = TestUtil.createConsumer(personType, owner);
File
ConsumerResourceTest.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
import java.util.ArrayList;
import java.util.List;
<<<<<<< HEAD

import org.fedoraproject.candlepin.model.ConsumerTypeCurator;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.any;
=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf

import org.fedoraproject.candlepin.audit.EventFactory;
import org.fedoraproject.candlepin.audit.EventSink;
Solution content
import java.util.ArrayList;
import java.util.List;

import org.fedoraproject.candlepin.model.ConsumerTypeCurator;

import org.fedoraproject.candlepin.audit.EventFactory;
import org.fedoraproject.candlepin.audit.EventSink;
File
OwnerDeleteResourceTest.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
    @Before
    public void init() {
        this.ownerResource = new OwnerResource(ownerCurator, poolCurator,
<<<<<<< HEAD
                subscriptionCurator, subscriptionTokenCurator, consumerCurator,
                null, userService, eventSink, eventFactory, null,
                null, null, poolManager, exportCurator, null, importRecordCurator, subAdapter, 
                permCurator, consumerTypeCurator);
=======
                null, subscriptionCurator, subscriptionTokenCurator,
                consumerCurator, statisticCurator, null, userService, eventSink,
                eventFactory, null, null, null, poolManager, exportCurator, null,
                importRecordCurator, subAdapter);
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
    }

    @Test
Solution content
    @Before
    public void init() {
        this.ownerResource = new OwnerResource(ownerCurator, poolCurator,
                subscriptionCurator, subscriptionTokenCurator, consumerCurator,
                statisticCurator, null, userService, eventSink, eventFactory, null,
                null, null, poolManager, exportCurator, null, importRecordCurator, subAdapter, 
                permCurator, consumerTypeCurator);
    }

    @Test
File
OwnerDeleteResourceTest.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
import org.junit.Before;
import org.junit.Test;

<<<<<<< HEAD
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.fedoraproject.candlepin.model.OwnerPermission;
import org.fedoraproject.candlepin.model.Role;

=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
/**
 * OwnerResourceTest
 */
Solution content
import org.junit.Before;
import org.junit.Test;

import java.util.ArrayList;
import org.fedoraproject.candlepin.model.OwnerPermission;
import org.fedoraproject.candlepin.model.Role;
/**
 * OwnerResourceTest
 */
File
OwnerResourceTest.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
<<<<<<< HEAD
import java.util.Date;
import java.util.Arrays;
 */
package org.fedoraproject.candlepin.test;

import java.util.HashSet;
=======
import java.util.Date;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
Solution content
 */
package org.fedoraproject.candlepin.test;

import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
File
DatabaseTestFixture.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.wideplay.warp.persist.WorkManager;
import org.fedoraproject.candlepin.auth.permissions.Permission;

<<<<<<< HEAD
import org.junit.Before;
import org.xnap.commons.i18n.I18n;

=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
/**
 * Test fixture for test classes requiring access to the database.
 */
Solution content
import com.wideplay.warp.persist.WorkManager;
import org.fedoraproject.candlepin.auth.permissions.Permission;

/**
 * Test fixture for test classes requiring access to the database.
 */
File
DatabaseTestFixture.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD
     * Helper to commit the current db transaction. Pretty simple for now, but
     * may require additional logic and error handling down the road.
=======
     * Helper to commit the current db transaction. Pretty simple for now, but may
     * require additional logic and error handling down the road.
>>>>>>> Remove autosubscribe, since we really do not need it
     */
    protected void commitTransaction() {
        entityManager().getTransaction().commit();
Solution content
    }

    /**
<<<<<<< HEAD
     * Helper to commit the current db transaction. Pretty simple for now, but
     * may require additional logic and error handling down the road.
=======
     * Helper to commit the current db transaction. Pretty simple for now, but may
     * require additional logic and error handling down the road.
>>>>>>> Remove autosubscribe, since we really do not need it
     */
    protected void commitTransaction() {
        entityManager().getTransaction().commit();
File
DatabaseTestFixture.java
Developer's decision
Manual
Kind of conflict
Comment
Chunk
Conflicting content
import org.apache.commons.codec.binary.Base64;
import org.fedoraproject.candlepin.auth.Access;
import org.fedoraproject.candlepin.auth.UserPrincipal;
<<<<<<< HEAD
import org.fedoraproject.candlepin.auth.permissions.Permission;
=======
import org.fedoraproject.candlepin.model.ActivationKey;
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
import org.fedoraproject.candlepin.model.CertificateSerial;
import org.fedoraproject.candlepin.model.Consumer;
import org.fedoraproject.candlepin.model.ConsumerType;
Solution content
import org.apache.commons.codec.binary.Base64;
import org.fedoraproject.candlepin.auth.Access;
import org.fedoraproject.candlepin.auth.UserPrincipal;
import org.fedoraproject.candlepin.auth.permissions.Permission;
import org.fedoraproject.candlepin.model.ActivationKey;
import org.fedoraproject.candlepin.model.CertificateSerial;
import org.fedoraproject.candlepin.model.Consumer;
import org.fedoraproject.candlepin.model.ConsumerType;
File
TestUtil.java
Developer's decision
Concatenation
Kind of conflict
Import
Chunk
Conflicting content
import org.fedoraproject.candlepin.model.ProductAttribute;
import org.fedoraproject.candlepin.model.ProvidedProduct;
import org.fedoraproject.candlepin.model.Subscription;
<<<<<<< HEAD
import org.fedoraproject.candlepin.model.SubscriptionToken;
import org.fedoraproject.candlepin.model.User;
=======
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf

/**
 * TestUtil for creating various testing objects.
Solution content
import org.fedoraproject.candlepin.model.ProductAttribute;
import org.fedoraproject.candlepin.model.ProvidedProduct;
import org.fedoraproject.candlepin.model.Subscription;
import org.fedoraproject.candlepin.model.User;

/**
 * TestUtil for creating various testing objects.
File
TestUtil.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
//        byte[] bytes = Base64.encode(xml);
        Base64 encoder = new Base64();
        byte [] bytes = encoder.encode(xml.getBytes());
<<<<<<< HEAD
        
        StringBuilder buf = new StringBuilder();
=======

        StringBuffer buf = new StringBuffer();
>>>>>>> bd0e8320060ebb4f4717ad4c418dd37c19110dbf
        for (byte b : bytes) {
            buf.append((char) Integer.parseInt(Integer.toHexString(b), 16));
        }
Solution content
        }
//        byte[] bytes = Base64.encode(xml);
        Base64 encoder = new Base64();
        byte [] bytes = encoder.encode(xml.getBytes());

        StringBuilder buf = new StringBuilder();
        for (byte b : bytes) {
            buf.append((char) Integer.parseInt(Integer.toHexString(b), 16));
File
TestUtil.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable