use of com.opentext.ia.sdk.dto.result.AllSearchComponents in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class PropertiesBasedConfigurer method ensureAllSearchComponents.
private void ensureAllSearchComponents(String searchName, SearchComposition composition) throws IOException {
AllSearchComponents components = new AllSearchComponents();
components.setSearchComposition(composition);
components.setXform(createXForm(searchName, composition.getName(), composition.getVersion()));
components.setResultMaster(createResultMaster(searchName, composition.getName(), composition.getVersion()));
SearchComposition updatedComposition = restClient.put(composition.getUri(LINK_ALLCOMPONENTS), SearchComposition.class, components);
Objects.requireNonNull(updatedComposition, "Failed to update search composition");
}
use of com.opentext.ia.sdk.dto.result.AllSearchComponents in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class WhenWorkingWithAllSearchComponenents method shouldHaveNoDefaults.
@Test
void shouldHaveNoDefaults() {
AllSearchComponents components = new AllSearchComponents();
assertNull(components.getResultMaster());
assertNull(components.getSearchComposition());
assertNull(components.getXform());
}
use of com.opentext.ia.sdk.dto.result.AllSearchComponents in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class WhenWorkingWithAllSearchComponenents method shouldUpdateStateWhenSettersAreCalled.
@Test
void shouldUpdateStateWhenSettersAreCalled() {
AllSearchComponents components = new AllSearchComponents();
ResultMaster resultMaster = new ResultMaster();
SearchComposition searchComposition = new SearchComposition();
XForm xform = new XForm();
components.setResultMaster(resultMaster);
components.setSearchComposition(searchComposition);
components.setXform(xform);
assertEquals(searchComposition, components.getSearchComposition());
assertEquals(resultMaster, components.getResultMaster());
assertEquals(xform, components.getXform());
}
use of com.opentext.ia.sdk.dto.result.AllSearchComponents in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class PropertiesBasedApplicationConfigurer method ensureAllSearchComponents.
private void ensureAllSearchComponents(String searchName, SearchComposition composition) throws IOException {
AllSearchComponents components = new AllSearchComponents();
components.setSearchComposition(composition);
components.setXform(createXForm(searchName, composition.getName(), composition.getVersion()));
components.setResultMaster(createResultMaster(searchName, composition.getName(), composition.getVersion()));
SearchComposition updatedComposition = restClient.put(composition.getUri(LINK_ALLCOMPONENTS), SearchComposition.class, components);
Objects.requireNonNull(updatedComposition, "Failed to update search composition");
}
Aggregations