Search in sources :

Example 1 with StellarFunctionDescription

use of org.apache.metron.rest.model.StellarFunctionDescription in project metron by apache.

the class StellarServiceImpl method getStellarFunctions.

@Override
public List<StellarFunctionDescription> getStellarFunctions() {
    List<StellarFunctionDescription> stellarFunctionDescriptions = new ArrayList<>();
    Iterable<StellarFunctionInfo> stellarFunctionsInfo = StellarFunctions.FUNCTION_RESOLVER().getFunctionInfo();
    stellarFunctionsInfo.forEach(stellarFunctionInfo -> {
        stellarFunctionDescriptions.add(new StellarFunctionDescription(stellarFunctionInfo.getName(), stellarFunctionInfo.getDescription(), stellarFunctionInfo.getParams(), stellarFunctionInfo.getReturns()));
    });
    return stellarFunctionDescriptions;
}
Also used : StellarFunctionInfo(org.apache.metron.stellar.dsl.StellarFunctionInfo) ArrayList(java.util.ArrayList) StellarFunctionDescription(org.apache.metron.rest.model.StellarFunctionDescription)

Aggregations

ArrayList (java.util.ArrayList)1 StellarFunctionDescription (org.apache.metron.rest.model.StellarFunctionDescription)1 StellarFunctionInfo (org.apache.metron.stellar.dsl.StellarFunctionInfo)1