Klasse ProcessorClassManager

java.lang.Object
de.dlr.proseo.procmgr.rest.ProcessorClassManager

@Component @Transactional(isolation=REPEATABLE_READ) public class ProcessorClassManager extends Object
Service methods required to manage processor classes.
Autor:
Dr. Thomas Bassler
  • Felddetails

  • Konstruktordetails

    • ProcessorClassManager

      public ProcessorClassManager()
  • Methodendetails

    • getProcessorClasses

      public List<RestProcessorClass> getProcessorClasses(String mission, String processorName, Integer recordFrom, Integer recordTo) throws javax.persistence.NoResultException, SecurityException
      Get processor classes by mission and name
      Parameter:
      mission - the mission code (optional)
      processorName - the processor name (optional)
      recordFrom - first record of filtered and ordered result to return
      recordTo - last record of filtered and ordered result to return
      Gibt zurück:
      a list of Json objects representing processor classes satisfying the search criteria
      Löst aus:
      javax.persistence.NoResultException - if no processor classes matching the given search criteria could be found
      SecurityException - if a cross-mission data access was attempted
    • createProcessorClass

      public RestProcessorClass createProcessorClass(@Valid @Valid RestProcessorClass processorClass) throws IllegalArgumentException, SecurityException
      Create a new processor class
      Parameter:
      processorClass - a Json representation of the new processor class
      Gibt zurück:
      a Json representation of the processor class after creation (with ID and version number)
      Löst aus:
      IllegalArgumentException - if any of the input data was invalid
      SecurityException - if a cross-mission data access was attempted
    • getProcessorClassById

      public RestProcessorClass getProcessorClassById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException, SecurityException
      Get a processor class by ID
      Parameter:
      id - the processor class ID
      Gibt zurück:
      a Json object corresponding to the processor class found
      Löst aus:
      IllegalArgumentException - if no processor class ID was given
      javax.persistence.NoResultException - if no processor class with the given ID exists
      SecurityException - if a cross-mission data access was attempted
    • modifyProcessorClass

      public RestProcessorClass modifyProcessorClass(Long id, @Valid @Valid RestProcessorClass processorClass) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException
      Update a processor class by ID
      Parameter:
      id - the ID of the processor class to update
      processorClass - a Json object containing the modified (and unmodified) attributes
      Gibt zurück:
      a response containing a Json object corresponding to the processor class after modification (with ID and version for all contained objects)
      Löst aus:
      javax.persistence.EntityNotFoundException - if no processor class with the given ID exists
      IllegalArgumentException - if any of the input data was invalid
      SecurityException - if a cross-mission data access was attempted
      ConcurrentModificationException - if the processor class has been modified since retrieval by the client
    • deleteProcessorClassById

      public void deleteProcessorClassById(Long id) throws javax.persistence.EntityNotFoundException, RuntimeException, IllegalArgumentException, SecurityException
      Delete a processor class by ID
      Parameter:
      id - the ID of the processor class to delete
      Löst aus:
      javax.persistence.EntityNotFoundException - if the processor class to delete does not exist in the database
      RuntimeException - if the deletion was not performed as expected
      IllegalArgumentException - if the ID of the processor class to delete was not given, or if dependent objects exist
      SecurityException - if a cross-mission data access was attempted
    • countProcessorClasses

      public String countProcessorClasses(String missionCode, String processorName)
      Count the processor classes matching the specified mission or processorName.
      Parameter:
      missionCode - the mission code
      processorName - the processor name
      Gibt zurück:
      the number of processor classes found as string
      Löst aus:
      SecurityException - if a cross-mission data access was attempted