/** * All {@link Space}-related goals need to have a tenant configured. * @throws GoalConfigurationException if no tenant is specified */ protected void checkPreconditions() throws GoalConfigurationException { if(!this.getGoalContext().hasTenant()) throw new GoalConfigurationException("No tenant configured"); }
/** * Cleans the cache of the {@link BackendConnector}. * CAN be overridden in subclasses to perform additional, goal-specific checks and preparations. */ protected void prepareExecution() throws GoalConfigurationException { BackendConnector.getInstance().cleanCache(); try { this.getConfiguration().checkSettings(); } catch (ConfigurationException e) { throw new GoalConfigurationException(e); } }
throw new GoalConfigurationException("Application context is required to execute goal [" + this.getGoalType().toString() + "]"); throw new GoalConfigurationException("Upload of goal execution failed, aborting the goal execution..."); throw new GoalConfigurationException(e.getMessage());
throw new GoalConfigurationException("No goals have been added to the sequence"); throw new GoalConfigurationException("Cannot add goal [" + g + "] to sequence: " + e.getMessage()); throw new GoalConfigurationException("Cannot add goal [" + g + "] to sequence: " + e.getMessage());
throw new GoalConfigurationException("Exactly one of the configuration settings [" + CoreConfiguration.APP_PREFIXES + "] and [" + CoreConfiguration.APP_JAR_NAMES + "] must be set"); throw new GoalConfigurationException("Exactly one of the configuration settings [" + CoreConfiguration.APP_PREFIXES + "] and [" + CoreConfiguration.APP_JAR_NAMES + "] must be set");
throw new GoalConfigurationException(e.getMessage()); throw new GoalConfigurationException(ioe.getMessage());