use of org.codice.alliance.nsili.common.GIAS.LibraryManager in project alliance by codice.
the class NsiliEndpointTest method testCreationMgr.
@Test
public void testCreationMgr() throws Exception {
LibraryManager creationMgr = nsiliEndpoint.getLibrary().get_manager(NsiliManagerType.CREATION_MGR.getSpecName(), testAccessCriteria);
assertThat(creationMgr, notNullValue());
}
use of org.codice.alliance.nsili.common.GIAS.LibraryManager in project alliance by codice.
the class NsiliEndpointTest method testStandingQueryMgr.
@Test
public void testStandingQueryMgr() throws Exception {
LibraryManager standingQueryMgr = nsiliEndpoint.getLibrary().get_manager(NsiliManagerType.STANDING_QUERY_MGR.getSpecName(), testAccessCriteria);
assertThat(standingQueryMgr, notNullValue());
}
use of org.codice.alliance.nsili.common.GIAS.LibraryManager in project alliance by codice.
the class NsiliEndpointTest method testGetOrderMgr.
@Test
public void testGetOrderMgr() throws Exception {
LibraryManager orderMgr = nsiliEndpoint.getLibrary().get_manager(NsiliManagerType.ORDER_MGR.getSpecName(), testAccessCriteria);
assertThat(orderMgr, notNullValue());
}
use of org.codice.alliance.nsili.common.GIAS.LibraryManager in project alliance by codice.
the class LibraryImpl method get_manager.
@Override
public LibraryManager get_manager(String managerType, AccessCriteria accessCriteria) throws ProcessingFault, InvalidInputParameter, SystemFault {
org.omg.CORBA.Object obj;
String managerId = UUID.randomUUID().toString();
if (managerType.equals(NsiliManagerType.CATALOG_MGR.getSpecName())) {
obj = getCatalogMgrObject(managerId);
} else if (managerType.equals(NsiliManagerType.ORDER_MGR.getSpecName())) {
obj = getOrderMgrObject(managerId);
} else if (managerType.equals(NsiliManagerType.PRODUCT_MGR.getSpecName())) {
obj = getProductObject(managerId);
} else if (managerType.equals(NsiliManagerType.DATA_MODEL_MGR.getSpecName())) {
obj = getDataModelMgrObject(managerId);
} else if (managerType.equals(NsiliManagerType.CREATION_MGR.getSpecName())) {
obj = getCreationMgrObject(managerId);
} else if (managerType.equals(NsiliManagerType.STANDING_QUERY_MGR.getSpecName())) {
obj = getStandingQueryMgrObject(managerId);
} else {
String[] badParams = { managerType };
throw new InvalidInputParameter("UnknownMangerType", new exception_details("UnknownMangerType", true, managerType), badParams);
}
LibraryManager libraryManager = LibraryManagerHelper.narrow(obj);
LOGGER.trace("get_manager, type: {}, id: {}", managerType, managerId);
return libraryManager;
}
use of org.codice.alliance.nsili.common.GIAS.LibraryManager in project alliance by codice.
the class SampleNsiliClient method initManagers.
private void initManagers() throws Exception {
final AccessCriteria accessCriteria = new AccessCriteria("", "", "");
for (String managerType : getManagerTypes()) {
if (managerType.equals(NsiliManagerType.CATALOG_MGR.getSpecName())) {
// Get Mandatory Managers
LOGGER.info("Getting CatalogMgr from source...");
LibraryManager libraryManager = library.get_manager(NsiliManagerType.CATALOG_MGR.getSpecName(), accessCriteria);
catalogMgr = CatalogMgrHelper.narrow(libraryManager);
LOGGER.info(SOURCE_RETURNED, catalogMgr.getClass());
} else if (managerType.equals(NsiliManagerType.ORDER_MGR.getSpecName())) {
LOGGER.info("Getting OrderMgr from source...");
LibraryManager libraryManager = library.get_manager(NsiliManagerType.ORDER_MGR.getSpecName(), accessCriteria);
orderMgr = OrderMgrHelper.narrow(libraryManager);
LOGGER.info(SOURCE_RETURNED, orderMgr.getClass());
} else if (managerType.equals(NsiliManagerType.PRODUCT_MGR.getSpecName())) {
LOGGER.info("Getting ProductMgr from source...");
LibraryManager libraryManager = library.get_manager(NsiliManagerType.PRODUCT_MGR.getSpecName(), accessCriteria);
productMgr = ProductMgrHelper.narrow(libraryManager);
LOGGER.info(SOURCE_RETURNED, productMgr.getClass());
} else if (managerType.equals(NsiliManagerType.DATA_MODEL_MGR.getSpecName())) {
LOGGER.info("Getting DataModelMgr from source...");
LibraryManager libraryManager = library.get_manager(NsiliManagerType.DATA_MODEL_MGR.getSpecName(), accessCriteria);
dataModelMgr = DataModelMgrHelper.narrow(libraryManager);
LOGGER.info(SOURCE_RETURNED, dataModelMgr.getClass());
} else if (managerType.equals(NsiliManagerType.STANDING_QUERY_MGR.getSpecName())) {
LOGGER.info("Getting StandingQueryMgr from source...");
LibraryManager libraryManager = library.get_manager(NsiliManagerType.STANDING_QUERY_MGR.getSpecName(), accessCriteria);
standingQueryMgr = StandingQueryMgrHelper.narrow(libraryManager);
LOGGER.info(SOURCE_RETURNED, standingQueryMgr.getClass());
}
}
}
Aggregations