|
27 | 27 |
|
28 | 28 | import javax.inject.Inject; |
29 | 29 |
|
30 | | -import org.forgerock.json.JsonValue; |
31 | 30 | import org.forgerock.openam.annotations.sm.Attribute; |
32 | 31 | import org.forgerock.openam.auth.node.api.Action; |
33 | 32 | import org.forgerock.openam.auth.node.api.Node; |
|
41 | 40 | import com.google.inject.assistedinject.Assisted; |
42 | 41 | import com.sun.identity.authentication.callbacks.HiddenValueCallback; |
43 | 42 | import com.sun.identity.authentication.callbacks.ScriptTextOutputCallback; |
44 | | -import com.sun.identity.shared.debug.Debug; |
45 | 43 | import com.sun.identity.sm.RequiredValueValidator; |
46 | 44 |
|
47 | 45 | @Node.Metadata(outcomeProvider = HTMLMessageNode.OutcomeProvider.class, |
48 | 46 | configClass = HTMLMessageNode.Config.class) |
49 | 47 | public class HTMLMessageNode extends SingleOutcomeNode { |
50 | 48 |
|
51 | 49 | private static final String BUNDLE = HTMLMessageNode.class.getName().replace(".", "/"); |
52 | | - private final Logger logger = LoggerFactory.getLogger(HTMLMessageNode.class); |
53 | | - private final static String DEBUG_FILE = "HTMLMessageNode"; |
| 50 | + private final Logger logger = LoggerFactory.getLogger("amAuth"); |
54 | 51 | private static final String VALIGN_NEUTRAL_ANCHOR = "HTMLMessageNode_vAlign_Neutral"; |
55 | | - protected Debug debug = Debug.getInstance(DEBUG_FILE); |
56 | 52 | private final LocaleSelector localeSelector; |
57 | | - |
58 | 53 | private final Config config; |
59 | 54 |
|
60 | 55 | /* |
@@ -130,14 +125,11 @@ public enum Style { |
130 | 125 |
|
131 | 126 | @Override |
132 | 127 | public Action process(TreeContext context) throws NodeProcessException { |
133 | | - JsonValue sharedState = context.sharedState; |
134 | | - JsonValue transientState = context.transientState; |
135 | | - |
136 | 128 | if (context.hasCallbacks()) { |
137 | | - debug.error("[" + DEBUG_FILE + "]: Done."); |
| 129 | + logger.debug("Done."); |
138 | 130 | return goToNext().build(); |
139 | 131 | } |
140 | | - debug.error("[" + DEBUG_FILE + "]: Display message."); |
| 132 | + logger.debug("Display message."); |
141 | 133 | ScriptTextOutputCallback scriptAndSelfSubmitCallback = new ScriptTextOutputCallback(createClientSideScriptExecutorFunction(getScript(context))); |
142 | 134 | return Action.send(Arrays.asList( |
143 | 135 | scriptAndSelfSubmitCallback, |
@@ -192,7 +184,7 @@ private String getScript(TreeContext context) { |
192 | 184 | } |
193 | 185 | if (config.overwriteButton()) { |
194 | 186 | String overwriteButtonText = substitute(context, getLocalisedMessage(context, config.overwriteButtonText(), "default.overwriteButtonText")); |
195 | | - debug.error("[" + DEBUG_FILE + "]: Overwriting button: " + overwriteButtonText); |
| 187 | + logger.debug("Overwriting button: " + overwriteButtonText); |
196 | 188 | script |
197 | 189 | .append(" var button = document.getElementById(\"loginButton_0\");\n") |
198 | 190 | .append(" button.value = \"").append(overwriteButtonText).append("\";\n") |
@@ -243,7 +235,6 @@ private String substitute(TreeContext context, String input) { |
243 | 235 | } |
244 | 236 | else { |
245 | 237 | logger.debug("Shared state property not found: "+key); |
246 | | - debug.error("[" + DEBUG_FILE + "]: Shared state property not found: "+key); |
247 | 238 | } |
248 | 239 | } |
249 | 240 |
|
|
0 commit comments