Search in sources :

Example 1 with TaskMetaDataProperty

use of com.synopsys.integration.alert.api.task.TaskMetaDataProperty in project hub-alert by blackducksoftware.

the class ProviderTask method createTaskMetaData.

@Override
public TaskMetaData createTaskMetaData() {
    String fullyQualifiedName = ScheduledTask.computeFullyQualifiedName(getClass());
    String nextRunTime = getFormatedNextRunTime().orElse("");
    String providerName = providerKey.getDisplayName();
    String configName = providerProperties.getConfigName();
    TaskMetaDataProperty providerProperty = new TaskMetaDataProperty("provider", "Provider", providerName);
    TaskMetaDataProperty configurationProperty = new TaskMetaDataProperty("configurationName", "Configuration Name", configName);
    List<TaskMetaDataProperty> properties = List.of(providerProperty, configurationProperty);
    return new TaskMetaData(getTaskName(), getClass().getSimpleName(), fullyQualifiedName, nextRunTime, properties);
}
Also used : TaskMetaDataProperty(com.synopsys.integration.alert.api.task.TaskMetaDataProperty) TaskMetaData(com.synopsys.integration.alert.api.task.TaskMetaData)

Aggregations

TaskMetaData (com.synopsys.integration.alert.api.task.TaskMetaData)1 TaskMetaDataProperty (com.synopsys.integration.alert.api.task.TaskMetaDataProperty)1