Skip to content

Instantly share code, notes, and snippets.

Avatar

Roan Bester roanbester

  • Momentum
View GitHub Profile
@roanbester
roanbester / article_list.css
Created Jun 21, 2016
Creating an article list with IBM WCM 8.0 listings
View article_list.css
/*Styling for the article list and detail views (bootstrap-based)*/
.articleList article:not(:first-child), .articleList .pager {
border-top: 4px solid #f5f5f5;
}
.articleList .pagination li {
border: none;
padding: 0;
}
@roanbester
roanbester / CategoriesViewerPortlet.java
Created Jan 5, 2016
virtual-portal-scoped actions
View CategoriesViewerPortlet.java
package example.wcm.vpscopedaction;
import com.ibm.workplace.wcm.api.Category;
import com.ibm.workplace.wcm.api.Repository;
import com.ibm.workplace.wcm.api.VirtualPortalContext;
import com.ibm.workplace.wcm.api.exceptions.WCMException;
/**
* Hypothetical Portlet that runs the query against a VP to fetch Categories.
* This can be a servlet or REST service as well.
@roanbester
roanbester / WcmQueryExamplePortlet.java
Last active Mar 27, 2018
Demo using WCM 8.0 Query API to search for and filter ContentItems with text, image and file.
View WcmQueryExamplePortlet.java
package sample.wcm.query.portlet;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
@roanbester
roanbester / LoggedinSubjectTest.java
Last active Mar 27, 2018
Testing post-login functionality for Websphere Application Server
View LoggedinSubjectTest.java
package thecodingglass.testing.postloginsamples;
import static org.unitils.reflectionassert.ReflectionAssert.assertLenientEquals;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
/**
* Shows how you can grab/verify that your stuff is populated on the Subject. In the real world the unit tests will test some unit of code