use of org.codice.alliance.nsili.mockserver.impl.managers.CatalogMgrImpl in project alliance by codice.
the class LibraryImpl method get_manager.
@Override
public LibraryManager get_manager(String manager_type, AccessCriteria access_criteria) throws ProcessingFault, InvalidInputParameter, SystemFault {
org.omg.CORBA.Object obj;
switch(manager_type) {
case "CatalogMgr":
CatalogMgrImpl catalogMgr = new CatalogMgrImpl(poa_);
try {
poa_.activate_object_with_id(manager_type.getBytes(Charset.forName(ENCODING)), catalogMgr);
} catch (Exception e) {
// Ignore
}
obj = poa_.create_reference_with_id(manager_type.getBytes(Charset.forName(ENCODING)), CatalogMgrHelper.id());
break;
case "OrderMgr":
OrderMgrImpl orderMgr = new OrderMgrImpl();
try {
poa_.activate_object_with_id(manager_type.getBytes(Charset.forName(ENCODING)), orderMgr);
} catch (Exception e) {
// Ignore
}
obj = poa_.create_reference_with_id(manager_type.getBytes(Charset.forName(ENCODING)), OrderMgrHelper.id());
break;
case "ProductMgr":
ProductMgrImpl productMgr = new ProductMgrImpl();
try {
poa_.activate_object_with_id(manager_type.getBytes(Charset.forName(ENCODING)), productMgr);
} catch (Exception e) {
// Ignore
}
obj = poa_.create_reference_with_id(manager_type.getBytes(Charset.forName(ENCODING)), ProductMgrHelper.id());
break;
case "DataModelMgr":
DataModelMgrImpl dataModelMgr = new DataModelMgrImpl();
try {
poa_.activate_object_with_id(manager_type.getBytes(Charset.forName(ENCODING)), dataModelMgr);
} catch (Exception e) {
// Ignore
}
obj = poa_.create_reference_with_id(manager_type.getBytes(Charset.forName(ENCODING)), DataModelMgrHelper.id());
break;
default:
String[] bad_params = { manager_type };
throw new InvalidInputParameter("UnknownMangerType", new exception_details("UnknownMangerType", true, manager_type), bad_params);
}
LibraryManager libraryManager = LibraryManagerHelper.narrow(obj);
return libraryManager;
}
Aggregations