public void process(EventAspectContext context, PortalService service) {
final String requestParameterName = FrameSourceEvent.URI_PARAMETER;
final Request request = ObjectModelHelper.getRequest(context.getObjectModel());
String[] values = request.getParameterValues(requestParameterName);
if (values != null) {
final Publisher publisher = context.getEventPublisher();
for (int i = 0; i < values.length; i++) {
final String value = values[i];
Event e = null;
try {
e = context.getEventConverter().decode(value);
if (null != e) {
publisher.publish(e);
service.getLinkService().addEventToLink(e);
}
} catch (Exception ignore) {
}
if (e == null) {
// Use '|' character as delimiter between ID and URI
int index = value.indexOf('|');
if (index != -1) {
String id = value.substring(0, index);
String uri = null;
if (index != (value.length() - 1)) {
uri = value.substring(index + 1);
}
e = new FrameSourceEvent(id, uri);
publisher.publish(e);
if (uri != null) {
service.getLinkService().addEventToLink(e);
}
}
}