| Chunk |
|---|
| Conflicting content |
|---|
import org.candlepin.model.PoolFilterBuilder; import org.candlepin.model.PoolQuantity; import org.candlepin.model.Product; <<<<<<< HEAD ======= import org.candlepin.model.ProductContent; >>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183 import org.candlepin.model.ProductCurator; import org.candlepin.model.Subscription; import org.candlepin.model.activationkeys.ActivationKey; |
| Solution content |
|---|
import org.candlepin.model.PoolFilterBuilder; import org.candlepin.model.PoolQuantity; import org.candlepin.model.Product; import org.candlepin.model.ProductContent; import org.candlepin.model.ProductCurator; import org.candlepin.model.Subscription; import org.candlepin.model.activationkeys.ActivationKey; |
| File |
|---|
| CandlepinPoolManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
* @param mergedPool
* @return
*/
<<<<<<< HEAD
private EntitlementCertificate generateEntitlementCertificate(Pool pool, Entitlement e,
boolean generateUeberCert) {
=======
private EntitlementCertificate generateEntitlementCertificate(
SubscriptionServiceAdapter subAdapter, Pool pool, Entitlement e, boolean generateUeberCert) {
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
Subscription sub = null;
if (pool.getSubscriptionId() != null) {
log.info("Getting subscription: " + pool.getSubscriptionId()); |
| Solution content |
|---|
* @param mergedPool
* @return
*/
private EntitlementCertificate generateEntitlementCertificate(
SubscriptionServiceAdapter subAdapter, Pool pool, Entitlement e, boolean generateUeberCert) {
Subscription sub = null;
if (pool.getSubscriptionId() != null) {
log.info("Getting subscription: " + pool.getSubscriptionId()); |
| File |
|---|
| CandlepinPoolManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
*/
@Override
@Transactional
<<<<<<< HEAD
public void regenerateCertificatesOf(Environment e, Set |
| Solution content |
|---|
*/
@Override
@Transactional
public void regenerateCertificatesOf(SubscriptionServiceAdapter subAdapter, Environment e,
Set |
| File |
|---|
| CandlepinPoolManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
@Transactional
<<<<<<< HEAD
public void regenerateCertificatesOf(Owner owner, String productId, boolean lazy) {
// TODO: Should probably enforce the presence of owner.
List |
| Solution content |
|---|
@Override
@Transactional
public void regenerateCertificatesOf(SubscriptionServiceAdapter subAdapter, Owner owner, String productId, boolean lazy) {
// TODO: Should probably enforce the presence of owner.
List |
| File |
|---|
| CandlepinPoolManager.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
void regenerateCertificatesOf(SubscriptionServiceAdapter subAdapter, Environment env, Set |
| Solution content |
|---|
void regenerateCertificatesOf(SubscriptionServiceAdapter subAdapter, Environment env, Set |
| File |
|---|
| PoolManager.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD import org.candlepin.model.Product; import org.candlepin.model.ProductCurator; import org.candlepin.pinsetter.core.model.JobStatus; ======= import org.candlepin.service.ProductServiceAdapter; import org.candlepin.service.SubscriptionServiceAdapter; >>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183 import org.candlepin.util.Util; import com.google.inject.Inject; |
| Solution content |
|---|
import org.candlepin.model.Product; import org.candlepin.model.ProductCurator; import org.candlepin.pinsetter.core.model.JobStatus; import org.candlepin.service.ProductServiceAdapter; import org.candlepin.service.SubscriptionServiceAdapter; import org.candlepin.util.Util; import com.google.inject.Inject; |
| File |
|---|
| RefreshPoolsForProductJob.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public class RefreshPoolsForProductJob extends KingpinJob {
<<<<<<< HEAD
private ProductCurator productCurator;
=======
private ProductServiceAdapter productAdapter;
private SubscriptionServiceAdapter subAdapter;
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
private PoolManager poolManager;
public static final String LAZY_REGEN = "lazy_regen"; |
| Solution content |
|---|
*/
public class RefreshPoolsForProductJob extends KingpinJob {
// TODO: FIX ME.
private ProductServiceAdapter productAdapter;
private SubscriptionServiceAdapter subAdapter;
private PoolManager poolManager;
public static final String LAZY_REGEN = "lazy_regen"; |
| File |
|---|
| RefreshPoolsForProductJob.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
public static final String LAZY_REGEN = "lazy_regen";
@Inject
<<<<<<< HEAD
public RefreshPoolsForProductJob(ProductCurator productCurator,
PoolManager poolManager) {
this.productCurator = productCurator;
=======
public RefreshPoolsForProductJob(ProductServiceAdapter productAdapter,
SubscriptionServiceAdapter subAdapter,
PoolManager poolManager) {
this.productAdapter = productAdapter;
this.subAdapter = subAdapter;
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
this.poolManager = poolManager;
}
|
| Solution content |
|---|
public static final String LAZY_REGEN = "lazy_regen";
@Inject
public RefreshPoolsForProductJob(ProductServiceAdapter productAdapter,
SubscriptionServiceAdapter subAdapter, PoolManager poolManager) {
this.productAdapter = productAdapter;
this.subAdapter = subAdapter;
this.poolManager = poolManager;
}
|
| File |
|---|
| RefreshPoolsForProductJob.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
String productUuid = context.getMergedJobDataMap().getString(JobStatus.TARGET_ID);
Boolean lazy = context.getMergedJobDataMap().getBoolean(LAZY_REGEN);
<<<<<<< HEAD
poolManager.getRefresher(lazy).add(this.productCurator.find(productUuid)).run();
=======
poolManager.getRefresher(subAdapter, lazy).add(productAdapter.getProductById(productId)).run();
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
context.setResult("Pools refreshed for product " + productUuid);
} |
| Solution content |
|---|
Boolean lazy = context.getMergedJobDataMap().getBoolean(LAZY_REGEN);
// TODO: We need either an owner or a product UUID here.
// poolManager.getRefresher(subAdapter, lazy).add(productAdapter.getProductById(productId)).run();
context.setResult("Pools refreshed for product " + productId);
} |
| File |
|---|
| RefreshPoolsForProductJob.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// needs to use the product's UUID.
String productId = arg0.getJobDetail().getJobDataMap().getString(PROD_ID);
boolean lazy = arg0.getJobDetail().getJobDataMap().getBoolean(LAZY_REGEN);
<<<<<<< HEAD
// this.poolManager.regenerateCertificatesOf(productId, lazy);
=======
this.poolManager.regenerateCertificatesOf(subAdapter, prodId, lazy);
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
}
} |
| Solution content |
|---|
// needs to use the product's UUID.
String productId = arg0.getJobDetail().getJobDataMap().getString(PROD_ID);
boolean lazy = arg0.getJobDetail().getJobDataMap().getBoolean(LAZY_REGEN);
// this.poolManager.regenerateCertificatesOf(subAdapter, productId, lazy);
}
} |
| File |
|---|
| RegenProductEntitlementCertsJob.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import org.candlepin.model.ContentCurator; import org.candlepin.model.EnvironmentContent; import org.candlepin.model.EnvironmentContentCurator; <<<<<<< HEAD import org.candlepin.model.Owner; import org.candlepin.model.OwnerCurator; import org.candlepin.model.ProductCurator; ======= import org.candlepin.service.ProductServiceAdapter; import org.candlepin.service.SubscriptionServiceAdapter; >>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183 import org.candlepin.service.UniqueIdGenerator; import com.google.inject.Inject; |
| Solution content |
|---|
import org.candlepin.model.ContentCurator; import org.candlepin.model.EnvironmentContent; import org.candlepin.model.EnvironmentContentCurator; import org.candlepin.model.Owner; import org.candlepin.model.OwnerCurator; import org.candlepin.model.ProductCurator; import org.candlepin.service.UniqueIdGenerator; import com.google.inject.Inject; |
| File |
|---|
| ContentResource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private UniqueIdGenerator idGenerator;
private EnvironmentContentCurator envContentCurator;
private PoolManager poolManager;
<<<<<<< HEAD
private ProductCurator productCurator;
private OwnerCurator ownerCurator;
=======
private SubscriptionServiceAdapter subAdapter;
private ProductServiceAdapter productAdapter;
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
@Inject
public ContentResource(ContentCurator contentCurator, I18n i18n, |
| Solution content |
|---|
private UniqueIdGenerator idGenerator;
private EnvironmentContentCurator envContentCurator;
private PoolManager poolManager;
private ProductCurator productCurator;
private OwnerCurator ownerCurator;
@Inject
public ContentResource(ContentCurator contentCurator, I18n i18n, |
| File |
|---|
| ContentResource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
@Inject
public ContentResource(ContentCurator contentCurator, I18n i18n,
UniqueIdGenerator idGenerator, EnvironmentContentCurator envContentCurator,
<<<<<<< HEAD
PoolManager poolManager, ProductCurator productCurator, OwnerCurator ownerCurator) {
=======
PoolManager poolManager, SubscriptionServiceAdapter subAdapter,
ProductServiceAdapter productAdapter) {
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
this.i18n = i18n;
this.contentCurator = contentCurator;
this.idGenerator = idGenerator; |
| Solution content |
|---|
@Inject
public ContentResource(ContentCurator contentCurator, I18n i18n,
UniqueIdGenerator idGenerator, EnvironmentContentCurator envContentCurator,
PoolManager poolManager, ProductCurator productCurator, OwnerCurator ownerCurator) {
this.i18n = i18n;
this.contentCurator = contentCurator;
this.idGenerator = idGenerator; |
| File |
|---|
| ContentResource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
this.idGenerator = idGenerator;
this.envContentCurator = envContentCurator;
this.poolManager = poolManager;
<<<<<<< HEAD
this.productCurator = productCurator;
this.ownerCurator = ownerCurator;
=======
this.subAdapter = subAdapter;
this.productAdapter = productAdapter;
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
}
/** |
| Solution content |
|---|
this.idGenerator = idGenerator;
this.envContentCurator = envContentCurator;
this.poolManager = poolManager;
this.productCurator = productCurator;
this.ownerCurator = ownerCurator;
}
/** |
| File |
|---|
| ContentResource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
@PUT
@Produces(MediaType.APPLICATION_JSON)
@Path("/{content_id}")
<<<<<<< HEAD
public Content updateContent(@PathParam("content_id") String contentId, Content changes) {
throw new UnsupportedOperationException(this.i18n.tr(
"Organization-agnostic content write operations are not supported."
));
=======
public Content updateContent(@PathParam("content_id") String contentId,
Content changes) {
Content lookedUp = contentCurator.find(contentId);
if (lookedUp == null) {
throw new NotFoundException(
i18n.tr("Content with id {0} could not be found.", contentId));
}
// FIXME: needs arches handled as well?
changes.setId(contentId);
Content updated = contentCurator.createOrUpdate(changes);
// require regeneration of entitlement certificates of affected consumers
Set |
| Solution content |
|---|
@PUT
@Produces(MediaType.APPLICATION_JSON)
@Path("/{content_id}")
public Content updateContent(@PathParam("content_id") String contentId, Content changes) {
throw new UnsupportedOperationException(this.i18n.tr(
"Organization-agnostic content write operations are not supported."
));
}
/** |
| File |
|---|
| ContentResource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Throw statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{content_id}")
<<<<<<< HEAD
public void remove(@PathParam("content_id") String contentId) {
throw new UnsupportedOperationException(this.i18n.tr(
"Organization-agnostic content write operations are not supported."
));
=======
public void remove(@PathParam("content_id") String cid) {
Set |
| Solution content |
|---|
@DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{content_id}")
public void remove(@PathParam("content_id") String contentId) {
throw new UnsupportedOperationException(this.i18n.tr(
"Organization-agnostic content write operations are not supported."
));
}
} |
| File |
|---|
| ContentResource.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| For statement |
| Method invocation |
| Method signature |
| Throw statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
/**
* Examine the list of products that are about to be imported, and return a set of them
* that have been modified from their state in the db.
*
* Will not return brand new products.
*
* @param products The list of yet to be imported products
* @return a set of all products that exist in the db, but will be changed
*/
Set |
| Solution content |
|---|
}
}
} |
| File |
|---|
| ProductImporter.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
mockPoolCurator, mockSubAdapter, mockProductCurator, entCertAdapterMock, mockEventSink,
eventFactory, mockConfig, enforcerMock, poolRulesMock, entitlementCurator,
consumerCuratorMock, certCuratorMock, complianceRules, autobindRules,
<<<<<<< HEAD
activationKeyRules)
);
=======
activationKeyRules, productCuratorMock));
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
when(entCertAdapterMock.generateEntitlementCert(any(Entitlement.class),
any(Subscription.class), any(Product.class))).thenReturn( |
| Solution content |
|---|
mockPoolCurator, mockSubAdapter, mockProductCurator, entCertAdapterMock, mockEventSink,
eventFactory, mockConfig, enforcerMock, poolRulesMock, entitlementCurator,
consumerCuratorMock, certCuratorMock, complianceRules, autobindRules,
activationKeyRules, productCuratorMock)
);
when(entCertAdapterMock.generateEntitlementCert(any(Entitlement.class),
any(Subscription.class), any(Product.class))).thenReturn( |
| File |
|---|
| PoolManagerTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
recj.execute(jec);
// verification
<<<<<<< HEAD
// TODO: This needs to be fixed.
// verify(pm).regenerateCertificatesOf(eq("foobarbaz"), eq(true));
=======
verify(pm).regenerateCertificatesOf(eq(subService), eq("foobarbaz"), eq(true));
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
}
} |
| Solution content |
|---|
recj.execute(jec);
// verification
// fail("FIX ME");
// verify(pm).regenerateCertificatesOf(eq(subService), eq("foobarbaz"), eq(true));
}
} |
| File |
|---|
| RegenEntitlementCertsJobTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
@Test
<<<<<<< HEAD
public void productIdChangeOnProductPoolAttributeTriggersUpdate() {
Subscription s = TestUtil.createSubscription(owner, TestUtil.createProduct(owner));
String testAttributeKey = "multi-entitlement";
s.getProduct().setAttribute(testAttributeKey, "yes");
Pool p = TestUtil.copyFromSub(s);
p.getProduct().setAttribute(testAttributeKey, "yes");
// Change the sub's product's ID
String expectedProductId = "NEW_TEST_ID";
s.getProduct().setId(expectedProductId);
when(productAdapterMock.getProductById(s.getProduct().getOwner(), s.getProduct().getId()))
.thenReturn(s.getProduct());
List |
| Solution content |
|---|
}
@Test
public void productAttributesCopiedOntoPoolWhenCreatingNewPool() {
Product product = TestUtil.createProduct(owner);
|
| File |
|---|
| PoolRulesTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
import org.candlepin.model.Environment; import org.candlepin.model.EnvironmentContent; import org.candlepin.model.EnvironmentContentCurator; <<<<<<< HEAD import org.candlepin.model.Owner; import org.candlepin.model.OwnerCurator; import org.candlepin.model.Product; import org.candlepin.model.ProductCurator; ======= import org.candlepin.service.ProductServiceAdapter; import org.candlepin.service.SubscriptionServiceAdapter; >>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183 import org.candlepin.service.impl.DefaultUniqueIdGenerator; import org.junit.Before; |
| Solution content |
|---|
import org.candlepin.model.Environment; import org.candlepin.model.EnvironmentContent; import org.candlepin.model.EnvironmentContentCurator; import org.candlepin.model.Owner; import org.candlepin.model.OwnerCurator; import org.candlepin.model.Product; import org.candlepin.model.ProductCurator; import org.candlepin.service.impl.DefaultUniqueIdGenerator; import org.junit.Before; |
| File |
|---|
| ContentResourceTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private I18n i18n;
private EnvironmentContentCurator envContentCurator;
private PoolManager poolManager;
<<<<<<< HEAD
private ProductCurator productCurator;
private OwnerCurator oc;
=======
private ProductServiceAdapter productAdapter;
private SubscriptionServiceAdapter subAdapter;
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
@Before
public void init() { |
| Solution content |
|---|
private I18n i18n;
private EnvironmentContentCurator envContentCurator;
private PoolManager poolManager;
private ProductCurator productCurator;
private OwnerCurator oc;
@Before
public void init() { |
| File |
|---|
| ContentResourceTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
cc = mock(ContentCurator.class);
envContentCurator = mock(EnvironmentContentCurator.class);
poolManager = mock(PoolManager.class);
<<<<<<< HEAD
oc = mock(OwnerCurator.class);
productCurator = mock(ProductCurator.class);
cr = new ContentResource(cc, i18n, new DefaultUniqueIdGenerator(),
envContentCurator, poolManager, productCurator, oc);
=======
productAdapter = mock(ProductServiceAdapter.class);
subAdapter = mock(SubscriptionServiceAdapter.class);
cr = new ContentResource(cc, i18n, new DefaultUniqueIdGenerator(),
envContentCurator, poolManager, subAdapter, productAdapter);
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
}
@Test |
| Solution content |
|---|
cc = mock(ContentCurator.class);
envContentCurator = mock(EnvironmentContentCurator.class);
poolManager = mock(PoolManager.class);
oc = mock(OwnerCurator.class);
productCurator = mock(ProductCurator.class);
cr = new ContentResource(
cc, i18n, new DefaultUniqueIdGenerator(), envContentCurator, poolManager, productCurator, oc
);
}
@Test |
| File |
|---|
| ContentResourceTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
verify(cc).find(eq(contentId));
verify(cc).createOrUpdate(eq(content));
<<<<<<< HEAD
verify(productCurator).getProductsWithContent(owner, Arrays.asList(contentId));
verify(poolManager).regenerateCertificatesOf(eq(owner), eq(productId), eq(true));
=======
verify(productAdapter).getProductsWithContent(setFrom(contentId));
verify(poolManager).regenerateCertificatesOf(eq(subAdapter), eq("productid"), eq(true));
>>>>>>> 3b56922c03fe0a58f2a0ddd2082f0ae1c1cfe183
}
@Test(expected = UnsupportedOperationException.class) |
| Solution content |
|---|
verify(cc, never()).find(eq(contentId));
verify(cc, never()).createOrUpdate(eq(content));
verify(productCurator, never()).getProductsWithContent(owner, Arrays.asList(contentId));
// verify(poolManager, never()).regenerateCertificatesOf(eq(owner), eq(productId), eq(true));
}
@Test(expected = UnsupportedOperationException.class) |
| File |
|---|
| ContentResourceTest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
@Test
<<<<<<< HEAD
public void testGetChangedProductsNoNewProducts() {
Product oldProduct = TestUtil.createProduct("fake id", "fake name", owner);
Set |
| Solution content |
|---|
}
@Test
public void testVendorSetToUnknown() throws Exception {
Product product = TestUtil.createProduct(owner);
addNoVendorContentTo(product); |
| File |
|---|
| ProductImporterTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |