com.atlassian.clientpluginsdemorefapp.MagicHiddenPageCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of atlassian-clientside-extensions-demo Show documentation
Show all versions of atlassian-clientside-extensions-demo Show documentation
Demonstrates how product developers and plugin developers can make use of the Client-side Extensions APIs.
package com.atlassian.clientpluginsdemorefapp;
import com.atlassian.plugin.PluginParseException;
import com.atlassian.plugin.servlet.PluginHttpRequestWrapper;
import com.atlassian.plugin.web.Condition;
import java.util.Map;
public class MagicHiddenPageCondition implements Condition {
@Override
public void init(Map params) throws PluginParseException {
}
@Override
public boolean shouldDisplay(Map context) {
boolean shouldDisplay = false;
if (context.containsKey("request")) {
PluginHttpRequestWrapper request = (PluginHttpRequestWrapper) context.get("request");
String query = request.getQueryString();
shouldDisplay = query != null && query.equals("__MAGIC_STRING_FOR_DISPLAYING_HIDDEN_PAGE__");
}
return shouldDisplay;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy