java.lang.Object
fr.paris.lutece.plugins.extend.service.extender.facade.ExtenderType<T>
Type Parameters:
T - the type of elements in this ExtenderType (example: Hit)
Record Components:
IExtendableResourceResult - the IExtendableResourceResult

public class ExtenderType<T extends IExtendableResourceResult> extends Object
Generic service for reading data extend
  • Constructor Details

    • ExtenderType

      public ExtenderType(Class<T> t, String strType)
      Constructor (example: new ExtenderType (HitResourceExtender.EXTENDER_TYPE))
      Parameters:
      Class - the Class type
      strType - the type of extender
    • ExtenderType

      public ExtenderType(Class<T> t, String strType, BiFunction<String,String,List<T>> getInfoExtender, BiFunction<List<String>,String,List<T>> getInfoExtenderByList, BinaryOperator<String> getInfoForExport, BinaryOperator<String> getInfoForRecap)
      Constructor ExtenderType
      Parameters:
      Class - the Class type of the output arguments of the getInfoExtende and getInfoExtenderByList
      strType - the type of extender
      getInfoExtender - the BiFunction to get the optional extender type information object
      getInfoExtenderByList - the BiFunction to get the list of extender type information object
      getInfoForExport - the BinaryOperator to get the information value associate to the ExtenderType to export in the file export
      getInfoForRecap - the BinaryOperator to get the information value associate to the ExtenderType to write in the recap
      See Also:
      • constructor example
  • Method Details

    • getType

      public String getType()
      Get type of the extender
      Returns:
      _strType
    • getClassType

      public Class<T> getClassType()
      Get the class type
      Returns:
      _t
    • getInfoForExport

      public String getInfoForExport(String strIdExtendableResource, String strExtendableResourceType) throws InfoExtenderException
      Get the information value associate to the extenderType to export in the file export
      Parameters:
      strIdExtendableResource - the idExtendableResource
      strExtendableResourceType - the extendableResourceType
      Returns:
      the information value associate to the extenderType to export in the file export
      Throws:
      InfoExtenderException - the InfoExtenderException
    • getInfoForRecap

      public String getInfoForRecap(String strIdExtendableResource, String strExtendableResourceType) throws InfoExtenderException
      Get the information value associate to the extenderType to write in the recap
      Parameters:
      strIdExtendableResource - the idExtendableResource
      strExtendableResourceType - the extendableResourceType
      Returns:
      the information value associate to the extenderType to write in the recap
      Throws:
      InfoExtenderException - the InfoExtenderException
    • getInfoExtender

      public List<T> getInfoExtender(String strIdExtendableResource, String strExtendableResourceType) throws InfoExtenderException
      Get optional extenderType(hit or rate) information object (example: Optional or Optional..)
      Parameters:
      strIdExtendableResource - the idExtendableResource
      strExtendableResourceType - the extendableResourceType
      T - the extenderType information object (example: Hit)
      Returns:
      the optional extenderType(example: hit or rate) information object (example: Optional or Optional..)
      Throws:
      InfoExtenderException - the InfoExtenderException
    • getInfoExtenderByList

      public List<T> getInfoExtenderByList(List<String> listIdExtendableResource, String strExtendableResourceType) throws InfoExtenderException
      Get list extenderType information object (example: List or List..)
      Parameters:
      listIdExtendableResource - the list of IdExtendableResource
      strExtendableResourceType - the extendableResourceType
      T - the extenderType information object (example: Hit)
      Returns:
      list of extender type information object (example: List or List..)
      Throws:
      InfoExtenderException - the InfoExtenderException
    • setInfoForExport

      public void setInfoForExport(BinaryOperator<String> binaryOperatorInfoForExport)
      Sets the BinaryOperator to get the information value associate to the ExtenderType to export in the file export
      Parameters:
      binaryOperatorInfoForExport - the binaryOperatorInfoForExport
    • setInfoForRecap

      public void setInfoForRecap(BinaryOperator<String> binaryOperatorInfoForRecap)
      Sets the BinaryOperator to get the information value associate to the ExtenderType to write in the recap
      Parameters:
      binaryOperatorInfoForRecap - the binaryOperatorInfoForRecap
    • setInfoExtender

      public void setInfoExtender(BiFunction<String,String,List<T>> biFunctionInfoExtender)
      Sets the BiFunction to get the optional extender type information object
      Parameters:
      T - the extenderType information object (example: Hit)
      biFunctionInfoExtender - the biFunctionInfoExtender
    • setInfoExtenderByList

      public void setInfoExtenderByList(BiFunction<List<String>,String,List<T>> biFunctionInfoExtender)
      Sets the BiFunction to get the list of extender type information object
      Parameters:
      T - the extenderType information object (example: Hit)
      biFunctionInfoExtender - the biFunctionInfoExtender