package com.onaro.sanscreen.client.view.tabular; import com.onaro.sanscreen.client.view.migration.MigrationTaskSubTitleGenerator; /** * Creates a GroupingSubTitleGenerator based on the value of the 'subTitle' attribute in the config.xml * The default (when the attribute is not specified) is ToolbarContextSubTitleGenerator */ public class GroupingSubTitleGeneratorFactory { /** * Creates a GroupingSubTitleGenerator based on the value of the 'subTitle' attribute in the config.xml * The default (when the attribute is not specified) is ToolbarContextSubTitleGenerator * @param name name of the generator type. Only the default (any value) or 'migration' is supported * @return {@link MigrationTaskSubTitleGenerator} if 'migration' is passed as the name value. {@link ToolbarContextSubTitleGenerator} otherise */ public static GroupingSubTitleGenerator create(String name){ return "migration".equals(name) ? new MigrationTaskSubTitleGenerator() : new ToolbarContextSubTitleGenerator(); //$NON-NLS-1$ } }