private MacroDescriptor create( final MacroKey macroKey, final String displayName, final String description, final Form form) { return MacroDescriptor.create() .key(macroKey) .displayName(displayName) .description(description) .form(form) .icon(IconLoader.loadIcon(this.getClass(), MACRO_DESCRIPTORS_FOLDER, macroKey.getName())) .build(); }
public MacroDescriptor getByKey(final MacroKey key) { if (!ApplicationKey.SYSTEM.equals(key.getApplicationKey())) { return null; } return macrosByName.get(key.getName().toLowerCase()); }