package com.cidat.proclets;


public class ExistsSessionProclet implements Proclet {
	Proclet ifExistsProclet;
	Proclet ifNotExistsProclet;

	public ExistsSessionProclet(Proclet procletIfTrue, Proclet procletIfFalse) {
		this.ifExistsProclet = procletIfTrue;
		this.ifNotExistsProclet = procletIfFalse;
	}

	public void process(ProcletServiceData sd) throws ProcletException {
		boolean exists = sd.req.getSession(false) != null;

		if ((exists) && (this.ifExistsProclet != null))
			this.ifExistsProclet.process(sd);
		else if ((!exists) && (this.ifNotExistsProclet != null))
			this.ifNotExistsProclet.process(sd);
	}
}

/*
 * Location:
 * D:\svn\ejie\q53.trunk\codigo\q53\q53ItourbaskWar\WebContent\WEB-INF\
 * lib\proclets_wl81.jar Qualified Name: com.cidat.proclets.ExistsSessionProclet
 * JD-Core Version: 0.6.0
 */