Github user haoch commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/412#discussion_r77813044
  
    --- Diff: 
eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/resource/ApplicationResource.java
 ---
    @@ -18,24 +18,55 @@
     
     
     import com.google.inject.Inject;
    +import com.typesafe.config.Config;
    +import com.typesafe.config.ConfigFactory;
     import org.apache.eagle.app.service.ApplicationManagementService;
     import org.apache.eagle.app.service.ApplicationOperations;
     import org.apache.eagle.app.service.ApplicationProviderService;
     import org.apache.eagle.metadata.model.ApplicationDesc;
     import org.apache.eagle.metadata.model.ApplicationEntity;
     import org.apache.eagle.metadata.resource.RESTResponse;
     import org.apache.eagle.metadata.service.ApplicationEntityService;
    +import org.json.JSONArray;
    +import org.json.JSONException;
    +import org.json.JSONObject;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
     
     import javax.ws.rs.*;
     import javax.ws.rs.core.MediaType;
     import java.util.Collection;
     
    +import static 
org.apache.eagle.metadata.utils.HttpRequest.httpGetWithoutCredentials;
    +
     @Path("/apps")
     public class ApplicationResource {
    +    private final static Logger LOG = 
LoggerFactory.getLogger(ApplicationResource.class);
    +
         private final ApplicationProviderService providerService;
         private final ApplicationManagementService 
applicationManagementService;
         private final ApplicationEntityService entityService;
     
    +    private ApplicationEntity.Status extractStatus(JSONObject response, 
String appUuid) {
    --- End diff --
    
    No logic code should exist in web resource class (`Controller`), push down 
business logic into `Service` .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to