This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.1.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd"> | |
<hook> | |
<portal-properties>portal.properties</portal-properties> | |
</hook> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package au.com.permeance.service; | |
public interface FakeService { | |
void doStuff() throws Exception; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro do-with-classloader | |
[classloader & body] | |
`(let [old-classloader# (.getContextClassLoader (Thread/currentThread))] | |
(.setContextClassLoader (Thread/currentThread) ~classloader) | |
(try ~@body | |
(finally (.setContextClassLoader (Thread/currentThread) old-classloader#))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ClassLoaderSwapper { | |
public void doWithClassLoader(ClassLoader classLoader) { | |
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); | |
Thread.currentThread().setContextClassLoader(classLoader); | |
try { | |
doInternal(); | |
} | |
finally { | |
Thread.currentThread().setContextClassLoader(oldClassLoader); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns au.com.permeance.clojure.ClojurePortlet | |
(:gen-class :implements [javax.portlet.Portlet] | |
:init construct | |
:main false | |
:state state) | |
(:import (javax.portlet ActionRequest PortletMode))) | |
(defn- include-path [this path request response] | |
(let [state @(.state this) | |
config (:config state) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
/help.jsp | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd | |
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" | |
version="2.0"> | |
<portlet> | |
<portlet-name>clojure-portlet</portlet-name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package au.com.permeance.clojure; | |
import javax.portlet.ActionRequest; | |
import javax.portlet.ActionResponse; | |
import javax.portlet.Portlet; | |
import javax.portlet.PortletConfig; | |
import javax.portlet.PortletContext; | |
import javax.portlet.PortletException; | |
import javax.portlet.PortletMode; | |
import javax.portlet.PortletRequestDispatcher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="http://www.example.com/web/guest/home?p_auth=Ex7KuhQN&p_p_id=samplegetformportlet_WAR_samplegetformportlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=2" method="get" id="aui_3_4_0_1_563"> | |
<input name="p_auth" type="hidden" value="Ex7KuhQN"> | |
<input name="p_p_id" type="hidden" value="samplegetformportlet_WAR_samplegetformportlet"> | |
<input name="p_p_lifecycle" type="hidden" value="1"> | |
<input name="p_p_state" type="hidden" value="normal"> | |
<input name="p_p_mode" type="hidden" value="view"> | |
<input name="p_p_col_id" type="hidden" value="column-1"> | |
<input name="p_p_col_count" type="hidden" value="2"> | |
<input type="text" name="query" class="" id="aui_3_4_0_1_562"> | |
<input type="submit"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib prefix="liferay-portlet" uri="http://liferay.com/tld/portlet" %> | |
<liferay-portlet:actionURL varImpl="submitURL" /> | |
<form action="${submitURL}" method="get"> | |
<liferay-portlet:renderURLParams varImpl="submitURL" /> | |
<input type="text" name="query" /> | |
<input type="submit" /> | |
</form> |