Skip to content

Instantly share code, notes, and snippets.

@authsec
authsec / RemapCID.java
Last active June 1, 2016 21:20
Remap cid parameter to state
@PostConstruct
private void init() {
final HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
// This basically makes the state parameter the conversation id
final String state = request.getParameter("state");
httpConversationContext.deactivate();
httpConversationContext.activate(state);
}
export PATH="/opt/local/bin:/opt/local/sbin:/opt/local/Library/Frameworks/Python.framework/Versions/3.3/bin:$PATH"
sudo -H pip install hovercraft
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
sudo port install python33 py33-pip
[PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.ProcessPlugin
[PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.MoreProcessPlugin
[POST_PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.PostProcessPlugin
[PRE_PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.PreProcessPlugin
[PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.ProcessPlugin
[PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.MoreProcessPlugin
[POST_PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.PostProcessPlugin
package org.coffeecrew.tutorials.simplepluginmechanism;
import java.util.Collection;
import org.openide.util.Lookup;
public class SimplePhaseExecutor {
public static void main(String[] args) {
String processingToken = "";
package org.coffeecrew.tutorials.simplepluginmechanism;
public enum Phase {
PRE_PROCESS(PreProcessable.class),
PROCESS(Processable.class),
POST_PROCESS(PostProcessable.class);
private final Class<? extends Plugin> plugin;
private Phase(Class<? extends Plugin> plugin) {
[PRE_PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.PreProcessPlugin
[PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.MoreProcessPlugin
[PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.ProcessPlugin
[POST_PROCESS] org.coffeecrew.tutorials.simplepluginmechanism.PostProcessPlugin