use of org.codice.alliance.nsili.endpoint.managers.CatalogMgrImpl in project alliance by codice.
the class CatalogMgrImplTest method setUp.
@Before
public void setUp() throws Exception {
setupCommonMocks();
setupCatalogMgrMocks();
try {
setupOrb();
orbRunThread = new Thread(() -> orb.run());
orbRunThread.start();
} catch (InvalidName | AdapterInactive | WrongPolicy | ServantNotActive e) {
LOGGER.error("Unable to start the CORBA server", e);
} catch (IOException e) {
LOGGER.error("Unable to generate the IOR file", e);
} catch (SecurityServiceException e) {
LOGGER.error("Unable to setup guest security credentials", e);
}
testQuery = new Query(NsiliConstants.NSIL_ALL_VIEW, bqsQuery);
catalogMgr = new CatalogMgrImpl(rootPOA, new GeotoolsFilterBuilder(), null);
catalogMgr.setCatalogFramework(mockCatalogFramework);
}
use of org.codice.alliance.nsili.endpoint.managers.CatalogMgrImpl in project alliance by codice.
the class LibraryImpl method getCatalogMgrObject.
private Object getCatalogMgrObject(String managerId) {
Object obj;
CatalogMgrImpl catalogMgr = new CatalogMgrImpl(poa, filterBuilder, querySources);
catalogMgr.setCatalogFramework(catalogFramework);
catalogMgr.setOutgoingValidationEnabled(outgoingValidationEnabled);
catalogMgr.setRemoveSourceLibrary(removeSourceLibrary);
if (!CorbaUtils.isIdActive(poa, managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)))) {
try {
poa.activate_object_with_id(managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), catalogMgr);
} catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {
LOGGER.info("Error activating CatalogMgr: ", e);
}
}
obj = poa.create_reference_with_id(managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), CatalogMgrHelper.id());
return obj;
}
Aggregations