Fixed: Add support to read and register resources defined in XML DSL(OFBIZ-11995)

Fixes a JavaDoc issue and while at it replaces
  // TODO Auto-generated catch block
  e.printStackTrace();
by
  Debug.logError(e, MODULE);
This commit is contained in:
Jacques Le Roux
2020-09-24 06:59:30 +02:00
parent 0d8a5f0275
commit a4fb6d22ee
5 changed files with 7 additions and 14 deletions
@@ -1390,7 +1390,6 @@ public class EbayStore {
}
result.put("activeItems", activeItems);
} catch (Exception e) {
// TODO Auto-generated catch block
return ServiceUtil.returnError(e.getMessage());
}
return result;
@@ -131,11 +131,8 @@ public class ExamplePrintServices {
Fop fop = ApacheFopWorker.createFopInstance(out, MimeConstants.MIME_PDF);
ApacheFopWorker.transform(src, null, fop);
} catch (FOPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Debug.logError(e, MODULE);
}
/*
// set the content type and length
response.setContentType("application/pdf");
@@ -87,8 +87,7 @@ public class OFBizApiConfig extends ResourceConfig {
MICRO_APIS.put(cName, api);
}
} catch (ComponentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Debug.logError(e, MODULE);
}
});
}
@@ -31,6 +31,7 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.entity.GenericEntityException;
@@ -51,6 +52,7 @@ import org.codehaus.groovy.runtime.InvokerInvocationException;
public final class ServiceRequestHandler extends RestRequestHandler {
private static final String MODULE = ServiceRequestHandler.class.getName();
private static final String DEFAULT_MSG_UI_LABEL_RESOURCE = "ApiUiLabels";
private String service;
@@ -61,18 +63,15 @@ public final class ServiceRequestHandler extends RestRequestHandler {
/**
* @param data
* @return
* @throws GenericServiceException
*/
@Override
protected Response execute(ContainerRequestContext data, Map<String, Object> arguments) {
LocalDispatcher dispatcher = (LocalDispatcher) getServletContext().getAttribute("dispatcher");
Map<String, Object> serviceContext = null;
try {
serviceContext = dispatcher.getDispatchContext().makeValidContext(service, ModelService.IN_PARAM,
arguments);
serviceContext = dispatcher.getDispatchContext().makeValidContext(service, ModelService.IN_PARAM, arguments);
} catch (GenericServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Debug.logError(e, MODULE);
}
ModelService svc = getModelService(dispatcher.getDispatchContext());
GenericValue userLogin = (GenericValue) getHttpRequest().getAttribute("userLogin");
@@ -102,8 +102,7 @@ public class Various {
}
}
} catch (GenericEntityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Debug.logError(e, MODULE);
}
}
return actualHours;