Search in sources :

Example 1 with GetParametersRequestImpl

use of org.codice.alliance.nsili.endpoint.requests.GetParametersRequestImpl in project alliance by codice.

the class ProductMgrImpl method get_parameters.

@Override
public GetParametersRequest get_parameters(Product prod, String[] desired_parameters, NameValue[] properties) throws ProcessingFault, InvalidInputParameter, SystemFault {
    GetParametersRequest getParamRequest = null;
    String id = UUID.randomUUID().toString();
    try {
        String productIdStr = getAccessManager().getProductId(prod);
        GetParametersRequestImpl getParametersRequest = new GetParametersRequestImpl(productIdStr, desired_parameters, catalogFramework, filterBuilder, querySources, outgoingValidationEnabled);
        _poa().activate_object_with_id(id.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), getParametersRequest);
        org.omg.CORBA.Object obj = _poa().create_reference_with_id(id.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), GetParametersRequestHelper.id());
        getParamRequest = GetParametersRequestHelper.narrow(obj);
    } catch (WrongAdapter | WrongPolicy | UnsupportedEncodingException e) {
        LOGGER.debug("Unable to get ID from product reference: {}", NsilCorbaExceptionUtil.getExceptionDetails(e), e);
    } catch (ServantAlreadyActive | ObjectAlreadyActive e) {
        LOGGER.debug("get_parameters : Unable to activate getParametersRequest object. {}", NsilCorbaExceptionUtil.getExceptionDetails(e), e);
    }
    return getParamRequest;
}
Also used : ObjectAlreadyActive(org.omg.PortableServer.POAPackage.ObjectAlreadyActive) UnsupportedEncodingException(java.io.UnsupportedEncodingException) GetParametersRequestImpl(org.codice.alliance.nsili.endpoint.requests.GetParametersRequestImpl) WrongPolicy(org.omg.PortableServer.POAPackage.WrongPolicy) WrongAdapter(org.omg.PortableServer.POAPackage.WrongAdapter) ServantAlreadyActive(org.omg.PortableServer.POAPackage.ServantAlreadyActive) GetParametersRequest(org.codice.alliance.nsili.common.GIAS.GetParametersRequest)

Aggregations

UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 GetParametersRequest (org.codice.alliance.nsili.common.GIAS.GetParametersRequest)1 GetParametersRequestImpl (org.codice.alliance.nsili.endpoint.requests.GetParametersRequestImpl)1 ObjectAlreadyActive (org.omg.PortableServer.POAPackage.ObjectAlreadyActive)1 ServantAlreadyActive (org.omg.PortableServer.POAPackage.ServantAlreadyActive)1 WrongAdapter (org.omg.PortableServer.POAPackage.WrongAdapter)1 WrongPolicy (org.omg.PortableServer.POAPackage.WrongPolicy)1