public String getProperty(String key, String defaultValue) { String result = getProperty(key); if (result == null) { result = defaultValue; } return result; }
PanelActionConfiguration config = new PanelActionConfiguration(actionType.getName()); logger.fine("Adding configuration property " + name + " with value " + value + " for action " + actionName); config.addProperty(name, value);
/** * Creates {@link PanelAction}s, adding them to the supplied list. * <br/> * Both the panel and view are supplied for injection into the action's constructor. * * @param configurations the action class names. May be {@code null} * @param actions the actions to add to * @param stage the action stage */ private void addActions(List<PanelActionConfiguration> configurations, List<PanelAction> actions, ActionStage stage) { if (configurations != null) { for (PanelActionConfiguration config : configurations) { PanelAction action = factory.create(config.getActionClassName(), PanelAction.class, panel, view, stage); action.initialize(config); actions.add(action); } } }
/** * Executes actions prior to creating the panel. * <br/> * Both the panel and view are supplied for injection into the action's constructor. */ private void executePreConstructionActions() { List<PanelActionConfiguration> configurations = panel.getPreConstructionActions(); if (configurations != null) { for (PanelActionConfiguration config : configurations) { PanelAction action = factory.create(config.getActionClassName(), PanelAction.class, panel, ActionStage.preconstruct); action.initialize(config); action.executeAction(installData, null); } } }