I hereby claim:
- I am martinlau on github.
- I am msl (https://keybase.io/msl) on keybase.
- I have a public key whose fingerprint is 7682 47A7 93C4 0F6C 3BCC 7816 E4D1 D636 209A D697
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* 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 |
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"); |
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 |
<?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"> |
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; |
[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 |
<?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> |
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; |
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> | |
<tx:annotation-driven transaction-manager="transactionManager"/> |