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/search?query=blah" method="get"> | |
<input type="hidden" name="search" value="blech" /> | |
<input type="submit" /> | |
</form> |
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 class SiteCreator { | |
public static void createGroup() throws Exception { | |
// Don't do this! | |
long groupId = CounterLocalServiceUtil.increment(Group.class.getName()); | |
Group group = GroupLocalServiceUtil.createGroup(groupId); | |
group.setName("Test Site"); |
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> |
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
/** | |
* Adds a group. | |
* | |
* @param userId the primary key of the group's creator/owner | |
* @param parentGroupId the primary key of the parent group | |
* @param className the entity's class name | |
* @param classPK the primary key of the entity's instance | |
* @param liveGroupId the primary key of the live group | |
* @param name the entity's name | |
* @param description the group's description (optionally |
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
INSERT INTO GROUP_ VALUES(10614,10154,10196,10001,10614,0,0,'Test Site','This is a test site',2,'','/test-site','1','1') | |
INSERT INTO LAYOUTSET VALUES(10615,10614,10154,'2013-01-09 16:56:01.504000','2013-01-09 16:56:01.504000','1','0',0,'classic','01','mobile','01','',0,'','','0') | |
INSERT INTO LAYOUTSET VALUES(10616,10614,10154,'2013-01-09 16:56:01.506000','2013-01-09 16:56:01.506000','0','0',0,'classic','01','mobile','01','',0,'','','0') | |
INSERT INTO RESOURCEPERMISSION VALUES(611,10154,'com.liferay.portal.model.Group',4,'10614',10163,0,2097151) | |
INSERT INTO USERGROUPROLE VALUES(10196,10614,10171) | |
INSERT INTO USERS_GROUPS VALUES(10196,10614) | |
INSERT INTO ASSETENTRY VALUES(10617,10192,10154,10196,'Test Test','2013-01-09 16:56:02.502000','2013-01-09 16:56:02.502000',10001,10614,'',0,'0',NULL,NULL,NULL,NULL,'','Test Site','This is a test site','','','',0,0,0.0E0,0) | |
COMMIT |
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"?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="SQL_FILE" class="org.apache.log4j.rolling.RollingFileAppender"> | |
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> | |
<param name="FileNamePattern" value="@liferay.home@/logs/sql.%d{yyyy-MM-dd}.log" /> | |
</rollingPolicy> | |
<layout class="org.apache.log4j.PatternLayout"> |
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.hook; | |
import au.com.permeance.service.FakeService; | |
import com.liferay.portal.kernel.events.ActionException; | |
import com.liferay.portal.kernel.events.SimpleAction; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Configurable; | |
import static org.springframework.beans.factory.annotation.Autowire.BY_TYPE; |
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
[INFO] --- aspectj-maven-plugin:1.4:compile (default) @ spring-hook --- | |
[INFO] Join point 'method-execution(void au.com.permeance.service.impl.FakeServiceImpl.doStuff())' in Type 'au.com.permeance.service.impl.FakeServiceImpl' (FakeServiceImpl.java:26) advised by before advice from 'org.springframework.transaction.aspectj.AnnotationTransactionAspect' (spring-aspects-3.1.3.RELEASE.jar!AbstractTransactionAspect.class:60(from AbstractTransactionAspect.aj)) | |
[INFO] Join point 'method-execution(void au.com.permeance.service.impl.FakeServiceImpl.doStuff())' in Type 'au.com.permeance.service.impl.FakeServiceImpl' (FakeServiceImpl.java:26) advised by afterThrowing advice from 'org.springframework.transaction.aspectj.AnnotationTransactionAspect' (spring-aspects-3.1.3.RELEASE.jar!AbstractTransactionAspect.class:67(from AbstractTransactionAspect.aj)) | |
[INFO] Join point 'method-execution(void au.com.permeance.service.impl.FakeServiceImpl.doStuff())' in Type 'au.com.permeance.service.impl.FakeServiceImpl' (FakeServiceImpl.j |
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"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>aspectj-maven-plugin</artifactId> |
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.hook; | |
import au.com.permeance.service.FakeService; | |
import com.liferay.portal.kernel.events.ActionException; | |
import com.liferay.portal.kernel.events.SimpleAction; | |
import com.liferay.portal.kernel.servlet.ServletContextPool; | |
import org.springframework.beans.factory.BeanFactory; | |
import org.springframework.web.context.support.WebApplicationContextUtils; | |
import javax.servlet.ServletContext; |
NewerOlder