use of org.codice.alliance.nsili.common.UCO.InvalidInputParameter in project alliance by codice.
the class NsiliSource method getHitCount.
/**
* Obtains the number of hits that the given query has received from the server.
*
* @param query - a BQS query
* @param properties - a list of properties for the query
* @return - the hit count
*/
private int getHitCount(org.codice.alliance.nsili.common.GIAS.Query query, NameValue[] properties) {
IntHolder intHolder = new IntHolder();
try {
synchronized (queryLockObj) {
HitCountRequest hitCountRequest = catalogMgr.hit_count(query, properties);
hitCountRequest.complete(intHolder);
}
} catch (ProcessingFault | SystemFault | InvalidInputParameter e) {
LOGGER.debug("{} : Unable to get hit count for query. : {}", getId(), NsilCorbaExceptionUtil.getExceptionDetails(e), e);
}
LOGGER.debug("{} : Received {} hit(s) from query.", getId(), intHolder.value);
return intHolder.value;
}
use of org.codice.alliance.nsili.common.UCO.InvalidInputParameter 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;
}
Aggregations