use of one.kii.summer.io.context.WriteContext in project kiimate by SINeWang.
the class PublishStatusCtl method commit.
private ResponseEntity<PublishStatusApi.Receipt> commit(String requestId, String operatorId, String ownerId, String stability, PublishStatusApi.Form form) {
form.setStability(stability);
WriteContext context = buildContext(requestId, operatorId, ownerId);
return CommitApiCaller.sync(api, context, form);
}
use of one.kii.summer.io.context.WriteContext in project kiimate by SINeWang.
the class RefreshStatusCtl method commit.
private ResponseEntity<RefreshStatusApi.Receipt> commit(String requestId, String operatorId, String ownerId, String subId, MultiValueMap<String, String> map) {
WriteContext context = buildContext(requestId, ownerId, operatorId);
RefreshStatusApi.SubIdForm form = new RefreshStatusApi.SubIdForm();
form.setSubId(subId);
form.setMap(map);
return CommitApiCaller.sync(api, context, form);
}
use of one.kii.summer.io.context.WriteContext in project kiimate by SINeWang.
the class TestDeclareReceiptApi method testNameOnly.
@Test
public void testNameOnly() {
DeclareExtensionApi.CommitForm commitForm = new DeclareExtensionApi.CommitForm();
commitForm.setName("testName");
WriteContext context = new WriteContext(requestId, ownerId, operatorId);
DeclareExtensionApi.CommitReceipt response = null;
try {
response = declareExtensionApi.commit(context, commitForm);
} catch (Exception e) {
e.printStackTrace();
}
Assert.assertNull(response);
}
use of one.kii.summer.io.context.WriteContext in project kiimate by SINeWang.
the class TestDeclareReceiptApi method testGroupOnly.
@Test
public void testGroupOnly() {
DeclareExtensionApi.CommitForm commitForm = new DeclareExtensionApi.CommitForm();
commitForm.setGroup("testGroup");
WriteContext context = new WriteContext(requestId, ownerId, operatorId);
DeclareExtensionApi.CommitReceipt response = null;
try {
response = declareExtensionApi.commit(context, commitForm);
} catch (Exception e) {
e.printStackTrace();
}
Assert.assertNull(response);
}
use of one.kii.summer.io.context.WriteContext in project kiimate by SINeWang.
the class TestPublishModelApi method test.
@Test
public void test() {
PublishModelApi.Form form = new PublishModelApi.Form();
form.setVersion(version);
form.setProviderId(providerId);
form.setExtId(extId);
modelPublicationMapper.deletePublicationByProviderIdExtIdPubVersion(providerId, extId, "SNAPSHOT", version);
WriteContext context = new WriteContext(requestId, ownerId, operatorId);
PublishModelApi.Receipt receipt = null;
try {
receipt = publishModelApi.commit(context, form);
} catch (Exception e) {
e.printStackTrace();
}
Assert.assertNotNull(receipt);
Assert.assertEquals(version, receipt.getVersion());
Assert.assertEquals(ownerId, receipt.getOwnerId());
Assert.assertEquals(providerId, receipt.getProviderId());
}
Aggregations