package com.amee.platform.resource.dataitemvalue;

import com.amee.base.resource.*;
import com.amee.base.validation.ValidationException;
import com.amee.domain.DataItemValuesFilter;
import com.amee.domain.item.data.DataItem;

import java.util.Date;
import java.util.Map;

public interface DataItemValuesResource {

    public static interface Builder extends ResourceBuilder {

        public void handle(RequestWrapper requestWrapper, DataItem dataItem, DataItemValuesFilter filter);

        public DataItemValuesResource.Renderer getRenderer(RequestWrapper requestWrapper);

        public DataItemValueResource.Builder getDataItemValueBuilder(RequestWrapper requestWrapper);

        public DataItemValuesResource.DataItemValuesFilterValidator getValidator(RequestWrapper requestWrapper);
    }

    /**
     * Note that this Renderer is also used by DataItemValueHistoryResource.
     */
    public static interface Renderer extends ResourceRenderer {

        public void newDataItemValue(DataItemValueResource.Renderer renderer);

        public void setTruncated(boolean truncated);
    }

    public static interface DataItemValuesFilterValidator {

        public void initialise();

        public boolean isValid(Map<String, String> queryParameters);

        public DataItemValuesFilter getObject();

        public void setObject(DataItemValuesFilter object);

        public Date getDefaultStartDate();

        public void setDefaultStartDate(Date defaultStartDate);

        public ValidationResult getValidationResult();
    }

    public static interface FormAcceptor extends ResourceAcceptor {

        public Object handle(RequestWrapper requestWrapper) throws ValidationException;
    }
}

@@ -308,31 +308,24 @@
 urce %7B%0A%0A    
-public 
 static inter
@@ -368,31 +368,24 @@
  %7B%0A%0A        
-public 
 void handle(
@@ -465,39 +465,32 @@
 lter);%0A%0A        
-public 
 DataItemValuesRe
@@ -550,39 +550,32 @@
 pper);%0A%0A        
-public 
 DataItemValueRes
@@ -645,39 +645,32 @@
 pper);%0A%0A        
-public 
 DataItemValuesRe
@@ -851,31 +851,24 @@
      */%0A    
-public 
 static inter
@@ -913,31 +913,24 @@
  %7B%0A%0A        
-public 
 void newData
@@ -982,39 +982,32 @@
 erer);%0A%0A        
-public 
 void setTruncate
@@ -1031,39 +1031,32 @@
 ed);%0A    %7D%0A%0A    
-public 
 static interface
@@ -1093,31 +1093,24 @@
  %7B%0A%0A        
-public 
 void initial
@@ -1125,23 +1125,16 @@
         
-public 
 boolean 
@@ -1188,23 +1188,16 @@
         
-public 
 DataItem
@@ -1223,39 +1223,32 @@
 ect();%0A%0A        
-public 
 void setObject(D
@@ -1285,23 +1285,16 @@
         
-public 
 Date get
@@ -1322,23 +1322,16 @@
         
-public 
 void set
@@ -1380,23 +1380,16 @@
         
-public 
 Validati
@@ -1431,23 +1431,16 @@
  %7D%0A%0A    
-public 
 static i
@@ -1497,23 +1497,16 @@
         
-public 
 Object h

Remove redundant access modifiers from interface. PL-11162.