Skip to content

Commit 1eb6e6f

Browse files
committed
init
1 parent 3e22853 commit 1eb6e6f

33 files changed

+7804
-0
lines changed

Search Tutorial-portlet/.classpath

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="docroot/WEB-INF/src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_71">
5+
<attributes>
6+
<attribute name="owner.project.facets" value="java"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.liferay.ide.eclipse.server.tomcat.runtimeClasspathProvider/Liferay v6.2 CE (Tomcat 7)">
10+
<attributes>
11+
<attribute name="owner.project.facets" value="jst.web"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
15+
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
16+
<classpathentry kind="con" path="com.liferay.ide.eclipse.server.plugin.container/portlet">
17+
<attributes>
18+
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
19+
</attributes>
20+
</classpathentry>
21+
<classpathentry kind="output" path="docroot/WEB-INF/classes"/>
22+
</classpath>

Search Tutorial-portlet/.project

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Search Tutorial-portlet</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.wst.validation.validationbuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
31+
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
32+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
33+
<nature>org.eclipse.jdt.core.javanature</nature>
34+
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
35+
</natures>
36+
</projectDescription>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="docroot"/>
4+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
5+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
6+
<attributes>
7+
<attribute name="hide" value="true"/>
8+
</attributes>
9+
</classpathentry>
10+
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
11+
<classpathentry kind="output" path=""/>
12+
</classpath>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.compliance=1.7
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.source=1.7
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
validateFragments=false
3+
validation.use-project-settings=true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
2+
<wb-module deploy-name="Search Tutorial-portlet">
3+
<wb-resource deploy-path="/" source-path="/docroot" tag="defaultRootSource"/>
4+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/src"/>
5+
<property name="context-root" value="Search_Tutorial-portlet"/>
6+
<property name="java-output-path" value="/Search Tutorial-portlet/docroot/WEB-INF/classes"/>
7+
</wb-module>
8+
</project-modules>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<root>
2+
<facet id="liferay.portlet">
3+
<node name="libprov">
4+
<attribute name="provider-id" value="com.liferay.ide.eclipse.plugin.portlet.libraryProvider"/>
5+
</node>
6+
</facet>
7+
</root>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<faceted-project>
3+
<runtime name="Liferay v6.2 CE (Tomcat 7)"/>
4+
<fixed facet="java"/>
5+
<fixed facet="wst.jsdt.web"/>
6+
<fixed facet="jst.web"/>
7+
<installed facet="java" version="1.7"/>
8+
<installed facet="jst.web" version="3.0"/>
9+
<installed facet="liferay.portlet" version="6.0"/>
10+
<installed facet="wst.jsdt.web" version="1.0"/>
11+
</faceted-project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Window

Search Tutorial-portlet/build.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE project>
3+
4+
<project name="Search Tutorial-portlet" basedir="." default="deploy">
5+
<import file="../build-common-portlet.xml" />
6+
</project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Class-Path:
3+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/classes/
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN" "http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
3+
4+
<display>
5+
6+
<category name="Tutorial">
7+
<portlet id="search-tutorial"></portlet>
8+
</category>
9+
</display>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name=Search Tutorial
2+
module-group-id=liferay
3+
module-incremental-version=1
4+
tags=
5+
short-description=
6+
change-log=
7+
page-url=http://www.chingovan.blogspot.com
8+
author=Chi Ngo
9+
licenses=LGPL
10+
long-description=
11+
liferay-versions=6.2.0+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
3+
4+
<liferay-portlet-app>
5+
6+
<portlet>
7+
<portlet-name>search-tutorial</portlet-name>
8+
<icon>/icon.png</icon>
9+
<header-portlet-css>/css/main.css</header-portlet-css>
10+
<footer-portlet-javascript>
11+
/js/main.js
12+
</footer-portlet-javascript>
13+
<css-class-wrapper>search-tutorial-portlet</css-class-wrapper>
14+
</portlet>
15+
<role-mapper>
16+
<role-name>administrator</role-name>
17+
<role-link>Administrator</role-link>
18+
</role-mapper>
19+
<role-mapper>
20+
<role-name>guest</role-name>
21+
<role-link>Guest</role-link>
22+
</role-mapper>
23+
<role-mapper>
24+
<role-name>power-user</role-name>
25+
<role-link>Power User</role-link>
26+
</role-mapper>
27+
<role-mapper>
28+
<role-name>user</role-name>
29+
<role-link>User</role-link>
30+
</role-mapper>
31+
</liferay-portlet-app>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0"?>
2+
3+
<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">
4+
5+
<portlet>
6+
<portlet-name>search-tutorial</portlet-name>
7+
<display-name>Search Tutorial</display-name>
8+
<portlet-class>
9+
com.blogspot.chingovan.tutorial.SearchTutorial
10+
</portlet-class>
11+
<init-param>
12+
<name>view-template</name>
13+
<value>/html/searchtutorial/view.jsp</value>
14+
</init-param>
15+
<expiration-cache>0</expiration-cache>
16+
<supports>
17+
<mime-type>text/html</mime-type>
18+
<portlet-mode>view</portlet-mode>
19+
</supports>
20+
<portlet-info>
21+
<title>Search Tutorial</title>
22+
<short-title>Search Tutorial</short-title>
23+
<keywords></keywords>
24+
</portlet-info>
25+
<security-role-ref>
26+
<role-name>administrator</role-name>
27+
</security-role-ref>
28+
<security-role-ref>
29+
<role-name>guest</role-name>
30+
</security-role-ref>
31+
<security-role-ref>
32+
<role-name>power-user</role-name>
33+
</security-role-ref>
34+
<security-role-ref>
35+
<role-name>user</role-name>
36+
</security-role-ref>
37+
</portlet>
38+
</portlet-app>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.blogspot.chingovan.tutorial;
2+
3+
import com.liferay.util.bridges.mvc.MVCPortlet;
4+
5+
/**
6+
* Portlet implementation class SearchTutorial
7+
*/
8+
public class SearchTutorial extends MVCPortlet {
9+
10+
}
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/**
2+
* Copyright 2015 Chi Ngo ([email protected], chingovan.blogspot.com)
3+
*/
4+
package com.blogspot.chingovan.tutorial.model;
5+
6+
import java.util.Date;
7+
8+
/**
9+
* @author chinv
10+
*
11+
*/
12+
public class Student {
13+
14+
private String code;
15+
private String fullname;
16+
private Date birthday;
17+
private boolean gender;
18+
private String address;
19+
20+
/**
21+
* Default Constructor
22+
*/
23+
public Student() {
24+
super();
25+
}
26+
27+
/**
28+
* Constructor with parameters
29+
*
30+
* @param code
31+
* The code of {@link Student}
32+
* @param fullname
33+
* The fullname of {@link Student}
34+
* @param birthday
35+
* The birth of day of {@link Student}
36+
* @param gender
37+
* The gender of {@link Student}, gender = 1 {@link Student} is
38+
* male, otherwise {@link Student} is female
39+
* @param address
40+
* The address of {@link Student}
41+
*/
42+
public Student(String code, String fullname, Date birthday, boolean gender, String address) {
43+
super();
44+
this.code = code;
45+
this.fullname = fullname;
46+
this.birthday = birthday;
47+
this.gender = gender;
48+
this.address = address;
49+
}
50+
51+
public String getCode() {
52+
return code;
53+
}
54+
55+
/**
56+
* @param code
57+
* the code to set
58+
*/
59+
public void setCode(String code) {
60+
this.code = code;
61+
}
62+
63+
/**
64+
* @return the fullname
65+
*/
66+
public String getFullname() {
67+
return fullname;
68+
}
69+
70+
/**
71+
* @param fullname
72+
* the fullname to set
73+
*/
74+
public void setFullname(String fullname) {
75+
this.fullname = fullname;
76+
}
77+
78+
/**
79+
* @return the birthday
80+
*/
81+
public Date getBirthday() {
82+
return birthday;
83+
}
84+
85+
/**
86+
* @param birthday
87+
* the birthday to set
88+
*/
89+
public void setBirthday(Date birthday) {
90+
this.birthday = birthday;
91+
}
92+
93+
/**
94+
* @return the gender
95+
*/
96+
public boolean isGender() {
97+
return gender;
98+
}
99+
100+
/**
101+
* @param gender
102+
* the gender to set
103+
*/
104+
public void setGender(boolean gender) {
105+
this.gender = gender;
106+
}
107+
108+
/**
109+
* @return the address
110+
*/
111+
public String getAddress() {
112+
return address;
113+
}
114+
115+
/**
116+
* @param address
117+
* the address to set
118+
*/
119+
public void setAddress(String address) {
120+
this.address = address;
121+
}
122+
123+
}

0 commit comments

Comments
 (0)