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
<aggregated-group-config> | |
<aggregator-type>org.jasig.portal.events.aggr.IPortalEventAggregator</aggregator-type> | |
<include> | |
<groupService>pags</groupService> | |
<groupName>Everyone</groupName> | |
</include> | |
</aggregated-group-config> |
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
private boolean layoutExistsForUser(IPerson person) { | |
// Assertions. | |
if (person == null) { | |
return false; | |
} | |
final List<Integer> ignoredNodeIds = new LinkedList<Integer>(); | |
final List<Integer> newNodeIds = new LinkedList<Integer>(); | |
//Get header/footer child/next nodes |
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
When dealing with XML variables (Document, Node, Element) in the debug view of Eclipse | |
it can be handy to see the actual XML instead of the object model. Eclipse's Detail | |
Formatter feature makes this possible. | |
* Right click on the xml object in question | |
* Select "New Detail Formatter" | |
* Paste the code below into the Detail Formatter Code Snippet | |
* Enjoy! |
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
public Iterable<? extends IPortalData> getPortalData() { | |
final List<String> userList = this.jdbcOperations.queryForList("SELECT USER_NAME FROM UP_USER", String.class); | |
return Lists.transform(userList, new Function<String, IPortalData>() { | |
@Override | |
public IPortalData apply(final String userName) { | |
return new SimpleStringPortalData(userName, null, null); | |
} | |
}); | |
} |
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
private static final LoadingCache<String, Name> NAME_PARSE_CACHE = CacheBuilder.newBuilder().maximumSize(1000).build(new CacheLoader<String, Name>() { | |
@Override | |
public Name load(String s) throws Exception { | |
int start = 0; | |
int separatorLength = separator.length(); | |
int end = s.indexOf(separator, start); | |
List<String> list = new ArrayList<String>(4); | |
while (end != -1) | |
{ | |
list.add(s.substring(start,end)); |
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
public <T extends BaseAggregation> List<T> fillInBlanks(AggregationInterval interval, DateTime start, DateTime end, List<T> data, Function<AggregationIntervalInfo, T> missingDataCreator) { | |
final List<T> fullData = new LinkedList<T>(); | |
AggregationIntervalInfo nextInterval = this.getIntervalInfo(interval, start); | |
for (final T entry : data) { | |
final DateDimension dateDimension = entry.getDateDimension(); | |
final TimeDimension timeDimension = entry.getTimeDimension(); | |
//Convert the date/time dimensions into a concrete DateTime |
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
private static TimeZone defaultTimeZone; | |
private static DateTimeZone defaultDateTimeZone; | |
private static String defaultUserTimezone; | |
@BeforeClass | |
public static void setupTZ() { | |
defaultTimeZone = TimeZone.getDefault(); | |
defaultDateTimeZone = DateTimeZone.getDefault(); | |
defaultUserTimezone = System.getProperty("user.timezone"); |
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
<bean id="requestAttributeSourceFilter" | |
class="org.jasig.services.persondir.support.web.RequestAttributeSourceFilter"> | |
<property name="additionalDescriptors" ref="requestAdditionalDescriptors" /> | |
<property name="usernameAttribute" value="remoteUser" /> | |
<property name="remoteUserAttribute" value="remoteUser" /> | |
<property name="serverNameAttribute" value="serverName" /> | |
<property name="processingPosition" value="BOTH" /> | |
<property name="headerAttributeMapping"> | |
<map> |
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
# | |
# Licensed to Jasig under one or more contributor license | |
# agreements. See the NOTICE file distributed with this work | |
# for additional information regarding copyright ownership. | |
# Jasig licenses this file to you under the Apache License, | |
# Version 2.0 (the "License"); you may not use this file | |
# except in compliance with the License. You may obtain a | |
# copy of the License at: | |
# | |
# http://www.apache.org/licenses/LICENSE-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
<filter-mapping> | |
<filter-name>requestAttributeSourceFilter</filter-name> | |
<url-pattern>/Login</url-pattern> | |
</filter-mapping> | |
<filter-mapping> | |
<filter-name>requireValidSessionFilter</filter-name> | |
<servlet-name>RenderingDispatcherServlet</servlet-name> | |
<servlet-name>JsonRenderingDispatcherServlet</servlet-name> | |
</filter-mapping> |