-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb9bfba
commit 6fee6ba
Showing
888 changed files
with
250,779 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="docroot/WEB-INF/src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="java"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.liferay.ide.eclipse.server.tomcat.runtimeClasspathProvider/Liferay v6.2 CE (Tomcat 7)"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="jst.web"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> | ||
<classpathentry kind="con" path="com.liferay.ide.eclipse.server.plugin.container/portlet"> | ||
<attributes> | ||
<attribute name="org.eclipse.jst.component.nondependency" value=""/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="docroot/WEB-INF/classes"/> | ||
</classpath> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>sb-lr-portlet</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE project> | ||
|
||
<project name="sb-lr-portlet" basedir="." default="deploy"> | ||
<import file="../build-common-portlet.xml" /> | ||
</project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN" "http://www.liferay.com/dtd/liferay-display_6_2_0.dtd"> | ||
|
||
<display> | ||
<category name="category.sample"> | ||
<portlet id="sb-lr" /> | ||
</category> | ||
</display> |
11 changes: 11 additions & 0 deletions
11
sb-lr-portlet/docroot/WEB-INF/liferay-plugin-package.properties
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name=Sb Lr | ||
module-group-id=liferay | ||
module-incremental-version=1 | ||
tags= | ||
short-description= | ||
long-description= | ||
change-log= | ||
page-url=http://www.liferay.com | ||
author=Liferay, Inc. | ||
licenses=LGPL | ||
liferay-versions=6.2.0+ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0"?> | ||
<!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"> | ||
|
||
<liferay-portlet-app> | ||
<portlet> | ||
<portlet-name>sb-lr</portlet-name> | ||
<icon>/icon.png</icon> | ||
<configuration-action-class>com.liferay.config.ConfigurationActionImpl</configuration-action-class> | ||
<header-portlet-css>/css/main.css</header-portlet-css> | ||
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript> | ||
<css-class-wrapper>sb-lr-portlet</css-class-wrapper> | ||
</portlet> | ||
<role-mapper> | ||
<role-name>administrator</role-name> | ||
<role-link>Administrator</role-link> | ||
</role-mapper> | ||
<role-mapper> | ||
<role-name>guest</role-name> | ||
<role-link>Guest</role-link> | ||
</role-mapper> | ||
<role-mapper> | ||
<role-name>power-user</role-name> | ||
<role-link>Power User</role-link> | ||
</role-mapper> | ||
<role-mapper> | ||
<role-name>user</role-name> | ||
<role-link>User</role-link> | ||
</role-mapper> | ||
</liferay-portlet-app> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
|
||
<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>sb-lr</portlet-name> | ||
<display-name>Sb Lr</display-name> | ||
<portlet-class>com.liferay.util.bridges.mvc.MVCPortlet</portlet-class> | ||
<init-param> | ||
<name>view-template</name> | ||
<value>/view.jsp</value> | ||
</init-param> | ||
<expiration-cache>0</expiration-cache> | ||
<supports> | ||
<mime-type>text/html</mime-type> | ||
</supports> | ||
<portlet-info> | ||
<title>Sb Lr</title> | ||
<short-title>Sb Lr</short-title> | ||
<keywords>Sb Lr</keywords> | ||
</portlet-info> | ||
<security-role-ref> | ||
<role-name>administrator</role-name> | ||
</security-role-ref> | ||
<security-role-ref> | ||
<role-name>guest</role-name> | ||
</security-role-ref> | ||
<security-role-ref> | ||
<role-name>power-user</role-name> | ||
</security-role-ref> | ||
<security-role-ref> | ||
<role-name>user</role-name> | ||
</security-role-ref> | ||
</portlet> | ||
</portlet-app> |
58 changes: 58 additions & 0 deletions
58
sb-lr-portlet/docroot/WEB-INF/src/com/liferay/config/ConfigurationActionImpl.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.liferay.config; | ||
|
||
import com.liferay.portal.kernel.portlet.ConfigurationAction; | ||
import com.liferay.portal.kernel.servlet.SessionMessages; | ||
import com.liferay.portal.kernel.util.Constants; | ||
import com.liferay.portal.kernel.util.ParamUtil; | ||
import com.liferay.portlet.PortletPreferencesFactoryUtil; | ||
|
||
import javax.portlet.ActionRequest; | ||
import javax.portlet.ActionResponse; | ||
import javax.portlet.PortletConfig; | ||
import javax.portlet.PortletPreferences; | ||
import javax.portlet.PortletSession; | ||
import javax.portlet.RenderRequest; | ||
import javax.portlet.RenderResponse; | ||
|
||
/** | ||
* <a href="ConfigurationActionImpl.java.html"><b><i>View Source</i></b></a> | ||
* | ||
* @author Mark Wong | ||
* | ||
*/ | ||
public class ConfigurationActionImpl implements ConfigurationAction { | ||
|
||
public void processAction(PortletConfig portletConfig, | ||
ActionRequest actionRequest, ActionResponse actionResponse) | ||
throws Exception { | ||
|
||
String cmd = ParamUtil.getString(actionRequest, Constants.CMD); | ||
|
||
if (!cmd.equals(Constants.UPDATE)) { | ||
return; | ||
} | ||
|
||
String email = ParamUtil.getString(actionRequest, "email"); | ||
String subject = ParamUtil.getString(actionRequest, "subject"); | ||
|
||
String portletResource = ParamUtil.getString(actionRequest,"portletResource"); | ||
PortletPreferences preferences = PortletPreferencesFactoryUtil.getPortletSetup(actionRequest, portletResource); | ||
|
||
preferences.setValue("email", email); | ||
preferences.setValue("subject", subject); | ||
|
||
preferences.store(); | ||
|
||
PortletSession portletSession = actionRequest.getPortletSession(); | ||
SessionMessages.add(actionRequest, portletConfig.getPortletName()+ ".doConfigure"); | ||
|
||
} | ||
|
||
public String render(PortletConfig portletConfig, | ||
RenderRequest renderRequest, RenderResponse renderResponse) | ||
throws Exception { | ||
|
||
return "/html/Config.jsp"; | ||
} | ||
|
||
} |
Oops, something went wrong.