Skip to content

Instantly share code, notes, and snippets.

View roanbester's full-sized avatar

Roan Bester roanbester

  • Momentum
View GitHub Profile

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@roanbester
roanbester / article_list.css
Created June 21, 2016 08:04
Creating an article list with IBM WCM 8.0 listings
/*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 January 5, 2016 11:44
virtual-portal-scoped actions
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 March 8, 2024 20:47
Demo using WCM 8.0 Query API to search for and filter ContentItems with text, image and file.
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 March 27, 2018 06:57
Testing post-login functionality for Websphere Application Server
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