Package de.dlr.proseo.ordergen.rest
Class TriggerManager
java.lang.Object
de.dlr.proseo.ordergen.rest.TriggerManager
TriggerManager to create, modify, list or delete triggers.
- Author:
- Ernst Melchinger
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.springframework.boot.web.client.RestTemplateBuilderREST template builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass) createTrigger(RestTrigger trigger) Create a new trigger (version)voiddeleteTrigger(String mission, String name, String type) Delete a triggergetByProductType(String mission, String productType) Get all data driven triggers for order templates having the given product class as input product classgetTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass, Integer recordFrom, Integer recordTo, String[] orderBy) Get a list of triggers filtered by mission, name and type.modifyTrigger(RestTrigger trigger) Modify a triggervoidreloadTriggers(String mission) Reload all triggers
-
Field Details
-
rtb
@Autowired org.springframework.boot.web.client.RestTemplateBuilder rtbREST template builder
-
-
Constructor Details
-
TriggerManager
public TriggerManager()
-
-
Method Details
-
createTrigger
public RestTrigger createTrigger(RestTrigger trigger) throws IllegalArgumentException, SecurityException Create a new trigger (version)- Parameters:
trigger- a Json representation of the new trigger- Returns:
- a Json representation of the trigger after creation (with ID and version number)
- Throws:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-
deleteTrigger
public void deleteTrigger(String mission, String name, String type) throws IllegalArgumentException, SecurityException Delete a trigger- Parameters:
mission- the mission codename- the trigger nametype- the trigger type- Throws:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-
reloadTriggers
public void reloadTriggers(String mission) throws IllegalArgumentException, SecurityException, org.quartz.SchedulerException Reload all triggers- Parameters:
mission- not used- Throws:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attemptedorg.quartz.SchedulerException
-
getTriggers
public List<RestTrigger> getTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass, Integer recordFrom, Integer recordTo, String[] orderBy) throws IllegalArgumentException, SecurityException Get a list of triggers filtered by mission, name and type.- Parameters:
mission- the mission codename- the trigger nametype- the trigger type- Throws:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-
countTriggers
public String countTriggers(String mission, String name, String type, String orderTemplate, String inputProductClass, String outputProductClass) throws IllegalArgumentException, SecurityException -
getByProductType
public List<RestTrigger> getByProductType(String mission, String productType) throws IllegalArgumentException, SecurityException Get all data driven triggers for order templates having the given product class as input product class- Parameters:
mission- the mission codeproductType- the product type of the requested product class- Returns:
- a list of data driven triggers
- Throws:
IllegalArgumentException- if the given product type does not belong to any product class of the missionSecurityException- if a cross-mission data access was attempted
-
modifyTrigger
public RestTrigger modifyTrigger(RestTrigger trigger) throws IllegalArgumentException, SecurityException Modify a trigger- Parameters:
trigger- a Json representation of the modified trigger- Returns:
- a Json representation of the trigger after creation (with ID and version number)
- Throws:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-