use of org.codice.alliance.nsili.common.GIAS.AccessCriteria in project alliance by codice.
the class NsiliSource method initMandatoryManagers.
/**
* Initializes all STANAG 4559 mandatory managers: CatalogMgr OrderMgr DataModelMgr ProductMgr
*/
private void initMandatoryManagers() {
try {
accessCriteria = new AccessCriteria(accessUserId, accessPassword, accessLicenseKey);
LibraryManager libraryManager = library.get_manager(CATALOG_MGR, accessCriteria);
setCatalogMgr(CatalogMgrHelper.narrow(libraryManager));
libraryManager = library.get_manager(ORDER_MGR, accessCriteria);
setOrderMgr(OrderMgrHelper.narrow(libraryManager));
libraryManager = library.get_manager(PRODUCT_MGR, accessCriteria);
setProductMgr(ProductMgrHelper.narrow(libraryManager));
libraryManager = library.get_manager(DATA_MODEL_MGR, accessCriteria);
setDataModelMgr(DataModelMgrHelper.narrow(libraryManager));
} catch (ProcessingFault | SystemFault | InvalidInputParameter e) {
LOGGER.debug("{} : Unable to retrieve mandatory managers.", sourceId, e);
}
if (catalogMgr != null && orderMgr != null && productMgr != null && dataModelMgr != null) {
LOGGER.debug("{} : Initialized STANAG mandatory managers.", getId());
} else {
LOGGER.debug("{} : Unable to initialize mandatory mangers.", getId());
}
}
use of org.codice.alliance.nsili.common.GIAS.AccessCriteria in project alliance by codice.
the class NsiliEndpointTest method setUp.
@Before
public void setUp() throws SecurityServiceException, AdapterInactive, InvalidName, ServantNotActive, WrongPolicy, IOException {
setupCommonMocks();
setupOrb();
doReturn(orb).when(mockCorbaOrb).getOrb();
testAccessCriteria = new AccessCriteria("", "", "");
createEndpoint();
}
use of org.codice.alliance.nsili.common.GIAS.AccessCriteria 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