Skip to content

Commit 3aaaaea

Browse files
committed
Code cleanup and bump version to v1.0.1.
1 parent bbf10ab commit 3aaaaea

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<artifactId>HTMLMessageNode</artifactId>
2424

2525
<groupId>org.forgerock.am</groupId>
26-
<version>1.0.0</version>
26+
<version>1.0.1</version>
2727
<name>Template for an Auth Tree Node maven project</name>
2828
<description>An Authentication Tree Node for ForgeRock's Identity Platform</description>
2929

src/main/java/org/forgerock/openam/auth/nodes/HTMLMessageNode.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
import javax.inject.Inject;
2929

30-
import org.forgerock.json.JsonValue;
3130
import org.forgerock.openam.annotations.sm.Attribute;
3231
import org.forgerock.openam.auth.node.api.Action;
3332
import org.forgerock.openam.auth.node.api.Node;
@@ -41,20 +40,16 @@
4140
import com.google.inject.assistedinject.Assisted;
4241
import com.sun.identity.authentication.callbacks.HiddenValueCallback;
4342
import com.sun.identity.authentication.callbacks.ScriptTextOutputCallback;
44-
import com.sun.identity.shared.debug.Debug;
4543
import com.sun.identity.sm.RequiredValueValidator;
4644

4745
@Node.Metadata(outcomeProvider = HTMLMessageNode.OutcomeProvider.class,
4846
configClass = HTMLMessageNode.Config.class)
4947
public class HTMLMessageNode extends SingleOutcomeNode {
5048

5149
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");
5451
private static final String VALIGN_NEUTRAL_ANCHOR = "HTMLMessageNode_vAlign_Neutral";
55-
protected Debug debug = Debug.getInstance(DEBUG_FILE);
5652
private final LocaleSelector localeSelector;
57-
5853
private final Config config;
5954

6055
/*
@@ -130,14 +125,11 @@ public enum Style {
130125

131126
@Override
132127
public Action process(TreeContext context) throws NodeProcessException {
133-
JsonValue sharedState = context.sharedState;
134-
JsonValue transientState = context.transientState;
135-
136128
if (context.hasCallbacks()) {
137-
debug.error("[" + DEBUG_FILE + "]: Done.");
129+
logger.debug("Done.");
138130
return goToNext().build();
139131
}
140-
debug.error("[" + DEBUG_FILE + "]: Display message.");
132+
logger.debug("Display message.");
141133
ScriptTextOutputCallback scriptAndSelfSubmitCallback = new ScriptTextOutputCallback(createClientSideScriptExecutorFunction(getScript(context)));
142134
return Action.send(Arrays.asList(
143135
scriptAndSelfSubmitCallback,
@@ -192,7 +184,7 @@ private String getScript(TreeContext context) {
192184
}
193185
if (config.overwriteButton()) {
194186
String overwriteButtonText = substitute(context, getLocalisedMessage(context, config.overwriteButtonText(), "default.overwriteButtonText"));
195-
debug.error("[" + DEBUG_FILE + "]: Overwriting button: " + overwriteButtonText);
187+
logger.debug("Overwriting button: " + overwriteButtonText);
196188
script
197189
.append(" var button = document.getElementById(\"loginButton_0\");\n")
198190
.append(" button.value = \"").append(overwriteButtonText).append("\";\n")
@@ -243,7 +235,6 @@ private String substitute(TreeContext context, String input) {
243235
}
244236
else {
245237
logger.debug("Shared state property not found: "+key);
246-
debug.error("[" + DEBUG_FILE + "]: Shared state property not found: "+key);
247238
}
248239
}
249240

src/main/java/org/forgerock/openam/auth/nodes/HTMLMessageNodePlugin.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@
1919
import java.util.Collections;
2020
import java.util.Map;
2121

22-
import javax.inject.Inject;
23-
2422
import org.forgerock.openam.auth.node.api.AbstractNodeAmPlugin;
2523
import org.forgerock.openam.auth.node.api.Node;
2624
import org.forgerock.openam.plugins.PluginException;
2725

28-
import org.slf4j.Logger;
29-
import org.slf4j.LoggerFactory;
30-
3126

3227
/**
3328
* Definition of an <a href="https://backstage.forgerock.com/docs/am/6/apidocs/org/forgerock/openam/auth/node/api/AbstractNodeAmPlugin.html">AbstractNodeAmPlugin</a>.
@@ -62,7 +57,7 @@
6257
*/
6358
public class HTMLMessageNodePlugin extends AbstractNodeAmPlugin {
6459

65-
static private String currentVersion = "1.0.0";
60+
static private String currentVersion = "1.0.1";
6661

6762
/**
6863
* Specify the Map of list of node classes that the plugin is providing. These will then be installed and

0 commit comments

Comments
 (0)