Skip to content

Instantly share code, notes, and snippets.

View cfalzone's full-sized avatar

Christopher Falzone cfalzone

  • Aquent
  • Erie County, PA
View GitHub Profile
@cfalzone
cfalzone / AllPosters.json
Created October 24, 2013 16:27
Taleo Poster (Career Website) for a Job For each Job I Can - JobPosters.json I can then look up the Poster Details - PosterDetails.json I can also pull all Career Websites - AllPosters.json
{
"pagination": {
"self": "https://ch.tbe.taleo.net/CH04/ats/api/v1/object/careerswebsite/search?searchId=384&start=1&limit=200&digicode=uwObatdDIo3tAQHZEjamOcc6dD5FwJ3qhblmH00sNTo%3D",
"total": 4
},
"searchResults": [
{"careerswebsite": {
"id": 1,
"name": "Aquent Careers Website",
"rssUrl": "https://ch.tbe.taleo.net/CH04/ats/servlet/Rss?org=AQUENT&cws=1&_rss_version=2",
// Deal with relationships
Map<Relationship, List<Contentlet>> cRels = new HashMap<Relationship, List<Contentlet>>();
if(rels.size() > 0) {
for(Relationship rel : rels) {
String relName = rel.getParentRelationName()+"-"+rel.getChildRelationName();
String relQuery = "+structureName:"+rel.getParentStructure().getVelocityVarName()+
" +"+relName+":"+oldIdentifier+" +live:true +deleted:false";
String relurl = OLDHOST+"/JSONContent/?type=json&limit=1000&offset=0&q=";
Logger.debug(this, "the query is: "+relQuery);
package com.aquent.upgrade;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStream;
import java.io.StringWriter;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
@cfalzone
cfalzone / customUrlTItle.vtl
Created November 7, 2013 18:08
Combine 2 fields for custom urlTitle field
#set($cusFieldVarName="urlTitle")
#set($f1VarName = "coursePrefix")
#set($f2VarName = "courseNumber")
<script>
function updateDisplayURLTitle() {
// get the fields entered by the user
var f1 = dojo.byId("${f1VarName}");
@cfalzone
cfalzone / MANIFEST.MF
Created November 7, 2013 20:36
plugin manifest
Manifest-Version: 1.0
Bundle-Name: Aquent OSGI Plugin
Bundle-SymbolicName: com.aquent
Bundle-Description: Aquent OSGI Plugin
Bundle-Version: 1.0
Bundle-Activator: com.aquent.osgi.AquentActivator
Bundle-ClassPath: .,lib/openid4java-0.9.5.jar
DynamicImport-Package: *
Import-Package: com.dotmarketing.beans,
com.dotmarketing.business,
com.dotcms.spring.web,
com.dotmarketing.beans,
com.dotmarketing.business,
com.dotmarketing.business.web,
com.dotmarketing.cache,
com.dotmarketing.cms.factories,
com.dotmarketing.cms.login.factories,
com.dotmarketing.exception,
com.dotmarketing.filters,
com.dotmarketing.osgi,
@cfalzone
cfalzone / ExampleActivator,java
Last active December 27, 2015 17:49
DotCMS Extended Bundle Activator that can help deploy jsps and assets (as well as other files) into the dotCMS repo.
package com.aquent.osgi;
import org.osgi.framework.BundleContext;
public class AquentActivator extends ExtendedBundleActivator {
@Override
public void start ( BundleContext ctx ) throws Exception {
// Initializing services
@cfalzone
cfalzone / initial_deploy.sh
Last active December 27, 2015 18:49
Initial dotCMS Deploy Script
#!/bin/bash
# Figure out who our db server is
export DB_HOST=`hostname | perl -pe 's/app/db/g'`
echo "DB Host is - ${DB_HOST}"
export DB_PORT=5444
# DotCMS Paths
export DOTCMS_BASE=/data/wwwroot/dotcms
export DOTCMS_HOME=$DOTCMS_BASE/current
@cfalzone
cfalzone / rels.java
Created November 11, 2013 13:54
Relationship handling in dotCMS 2.5
private void createContent(
Map<String, String> properties, // The properties to set on the contentlet
String stInode, // The inode of the structure
String stHostId, // The identifier of the host
long languageId, // the language id
List<Category> cats, // list of the categories
Map<Relationship, List<Contentlet>> cRels // Maps relationship to the related content
) {
// Create a new contentlet
@cfalzone
cfalzone / log4j.xml
Last active December 28, 2015 10:59
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c - %m%n" />
</layout>
</appender>
<appender name="ASYNC" class="org.apache.log4j.appender.ActiveAsynchronousAppender">