public static List < WorkItemHandlerBuilder > builders ( ClassLoader classLoader , ServiceDomain serviceDomain , KnowledgeComponentImplementationModel implementationModel ) { List < WorkItemHandlerBuilder > builders = new ArrayList < WorkItemHandlerBuilder > ( ) ; Set < String > registeredNames = new HashSet < String > ( ) ; if ( implementationModel != null ) { WorkItemHandlersModel workItemHandlersModel = implementationModel . getWorkItemHandlers ( ) ; if ( workItemHandlersModel != null ) { for ( WorkItemHandlerModel workItemHandlerModel : workItemHandlersModel . getWorkItemHandlers ( ) ) { if ( workItemHandlerModel != null ) { WorkItemHandlerBuilder builder = new WorkItemHandlerBuilder ( classLoader , serviceDomain , workItemHandlerModel ) ; builders . add ( builder ) ; String name = builder . getWorkItemHandlerName ( ) ; if ( name != null ) { registeredNames . add ( name ) ; } } } } // add our default WorkItemHandlers if they haven't already been added for ( Entry < String , Class < ? extends WorkItemHandler > > entry : DEFAULT_HANDLERS . entrySet ( ) ) { String name = entry . getKey ( ) ; if ( ! registeredNames . contains ( name ) ) { WorkItemHandlerBuilder builder = new WorkItemHandlerBuilder ( classLoader , serviceDomain , implementationModel , entry . getValue ( ) , name ) ; builders . add ( builder ) ; registeredNames . add ( name ) ; } } } return builders ; }
Creates WorkItemHandlerBuilders .