| | |
| | | */ |
| | | package org.opends.server.workflowelement; |
| | | |
| | | |
| | | |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | import java.lang.reflect.Method; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.util.Utils; |
| | | import org.opends.server.admin.ClassPropertyDefinition; |
| | | import org.opends.server.admin.server.ConfigurationAddListener; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | /** |
| | | * This class defines a utility that will be used to manage the configuration |
| | |
| | | // Again, use SuppressWarning because we know the cast is safe |
| | | @SuppressWarnings("unchecked") |
| | | WorkflowElement<? extends WorkflowElementCfg> workflowElement = |
| | | (WorkflowElement<? extends WorkflowElementCfg>) |
| | | workflowElementClass.newInstance(); |
| | | workflowElementClass.newInstance(); |
| | | |
| | | if (initialize) |
| | | { |
| | |
| | | |
| | | if (! acceptable) |
| | | { |
| | | StringBuilder buffer = new StringBuilder(); |
| | | if (! unacceptableReasons.isEmpty()) |
| | | { |
| | | Iterator<String> iterator = unacceptableReasons.iterator(); |
| | | buffer.append(iterator.next()); |
| | | while (iterator.hasNext()) |
| | | { |
| | | buffer.append(". "); |
| | | buffer.append(iterator.next()); |
| | | } |
| | | } |
| | | |
| | | String buffer = Utils.joinAsString(". ", unacceptableReasons); |
| | | throw new InitializationException( |
| | | ERR_CONFIG_WORKFLOW_ELEMENT_CONFIG_NOT_ACCEPTABLE.get(configuration.dn(), buffer)); |
| | | } |