This file contains hidden or 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
<portlet> | |
<portlet-name>EXT_AQUENT_TOOLS</portlet-name> | |
<display-name>Aquent Tools</display-name> | |
<portlet-class>com.liferay.portlet.StrutsPortlet</portlet-class> | |
<init-param> | |
<name>view-action</name> | |
<value>/ext/aquent/tools</value> | |
</init-param> | |
<expiration-cache>0</expiration-cache> | |
<supports> |
This file contains hidden or 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
<action path="/ext/aquenttools/view" type="com.aquent.portlets.tools.ViewAquentTools"> | |
<forward name="com.aquent.tools" path="com.aquent.tools" /> | |
</action> |
This file contains hidden or 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
<definition name="com.aquent.tools" extends="portal"> | |
<put name="content" value="/plugins/com.aquent/toolsportlet/view.jsp" /> | |
</definition> |
This file contains hidden or 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
<%@ page import="com.dotmarketing.util.Config" %> | |
<%@ include file="/html/common/init.jsp" %> | |
<%@ taglib uri="/WEB-INF/tld/dotmarketing.tld" prefix="dot" %> | |
<portlet:defineObjects /> | |
<%@ include file="/html/common/messages_inc.jsp" %> | |
<div id="main"> | |
Test | |
</div> |
This file contains hidden or 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 com.aquent.portlets.tools; | |
import javax.portlet.PortletConfig; | |
import javax.portlet.RenderRequest; | |
import javax.portlet.RenderResponse; | |
import org.apache.struts.action.ActionForm; | |
import org.apache.struts.action.ActionForward; | |
import org.apache.struts.action.ActionMapping; |
This file contains hidden or 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
#set($session = $request.getSession()) | |
#set($createAccountForm = $request.getAttibute("createAccountForm")) | |
<div class="errorMessage"> | |
#parse('static/messages.html') | |
#parse('/static/messages.html') | |
</div> |
This file contains hidden or 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
String stVarName = "UXThursdayEvents"; | |
String url = "http://aquent.com/JSONContent?type=json&limit=1000&offset=0&q="; | |
try { | |
url = url + URLEncoder.encode("+structureName:"+stVarName+" +live:true +deleted:false", "UTF-8"); | |
} catch (Exception e) { | |
failed.put(stVarName, "Unable to encode the url to fetch the data: "+e.getMessage()); | |
throw new Exception(); | |
} | |
Logger.info(this, "The url we are fetching: "+url); |
This file contains hidden or 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
JSONObject data = new JSONObject(dataString); | |
JSONArray contentlets = data.getJSONArray("contentlets"); | |
for(int i = 0; i<contentlets.length(); i++) { | |
JSONObject con = contentlets.getJSONObject(i); | |
Contentlet contentlet=new Contentlet(); | |
contentlet.setStructureInode(stInode); | |
contentlet.setHost(stHost.getIdentifier()); | |
long languageId = con.getLong("languageId"); |
This file contains hidden or 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
<%@page import="java.util.HashMap"%> | |
<%@page import="com.dotmarketing.portlets.htmlpages.business.HTMLPageAPI"%> | |
<%@page import="com.dotmarketing.portlets.htmlpages.model.HTMLPage"%> | |
<%@page import="com.dotmarketing.portlets.templates.business.TemplateAPI"%> | |
<%@page import="com.dotmarketing.portlets.templates.model.Template"%> | |
<%@page import="com.liferay.portal.model.User"%> | |
<%@page import="com.dotmarketing.business.APILocator"%> | |
<%@page import="com.dotmarketing.beans.Host"%> | |
<%@page import="java.util.List"%> | |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" |
This file contains hidden or 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
#set($myList = $contents.getEmptyList()) | |
#foreach($i in [1..10]) | |
#set($tMap = $contents.getEmptyMap()) | |
#set($_dummy = $tMap.put("somekey", $i)) | |
#set($_dummy = $tMap.put("otherkey", "othervalue")) | |
#set($_dummy = $myList.add($tMap)) | |
#end | |
<p>List = $myList</p> | |
#set($myMap = $contents.getEmptyMap()) | |
#set($_dummy = $myMap.put("items",$myList)) |