Class UnitAssignmentService

java.lang.Object
fr.paris.lutece.plugins.unittree.service.assignment.UnitAssignmentService

public final class UnitAssignmentService extends Object
This class is the entry point for unit assignment. It provides methods for unit assignment.
  • Method Details

    • findCurrentAssignment

      public static UnitAssignment findCurrentAssignment(int nIdResource, String strResourceType)
      Finds the current unit assignment for the specified couple {resource id, resource type}
      Parameters:
      nIdResource - The resource id
      strResourceType - the resource type
      Returns:
      the current unit assignment
    • findAssignments

      public static List<UnitAssignment> findAssignments(int nIdResource, String strResourceType)

      Finds the unit assignments associated to the specified couple {resource id, resource type}.

      The unit assignments are sorted by ascending date.

      Parameters:
      nIdResource - the resource id
      strResourceType - the resource type
      Returns:
      the list of unit assignments
    • findAssignmentsByUnit

      public static List<UnitAssignment> findAssignmentsByUnit(int nIdUnit)

      Finds the resources assigned to the unit .

      The unit assignments are sorted by ascending date.

      Parameters:
      nIdUnit - the Unit id
      Returns:
      the list of unit assignments