Skip to content

Instantly share code, notes, and snippets.

View gastaldi's full-sized avatar
🏠
Working from home

George Gastaldi gastaldi

🏠
Working from home
View GitHub Profile
@gastaldi
gastaldi / SeamJCRRepository.java
Created March 9, 2011 02:37
Decorating JCR Repository
/*
* JBoss, Home of Professional Open Source
* Copyright [2010], Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
* Licensed 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
* Unless required by applicable law or agreed to in writing, software
package org.jboss.seam.jcr;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.observation.EventListener;
import javax.jcr.observation.ObservationManager;
/*
* ModeShape (http://www.modeshape.org)
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
* See the AUTHORS.txt file in the distribution for a full listing of
* individual contributors.
*
* ModeShape is free software. Unless otherwise indicated, all code in ModeShape
* is licensed to you under the terms of the GNU Lesser General Public License as
package org.jboss.seam.reports.jasperreports.qualifiers.test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
03/06/2011 01:12:07
Modeshape ANT script for unsigning jars
This script must be run before assembly:single. Check MODE-1081
George Gastaldi
====================================================================== -->
<project name="modeshape-unsignedjars" default="default">
@gastaldi
gastaldi / gist:1016948
Created June 9, 2011 15:18
Forge Maven hasDependency Test
import static org.junit.Assert.assertTrue;
import org.jboss.forge.project.Project;
import org.jboss.forge.project.dependencies.DependencyBuilder;
import org.jboss.forge.project.facets.DependencyFacet;
import org.jboss.forge.test.AbstractShellTest;
import org.junit.Before;
import org.junit.Test;
public class MavenDependencyTest extends AbstractShellTest
/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed 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
@gastaldi
gastaldi / gist:1028557
Created June 16, 2011 02:22
First draft from Bean Conversion API
package javax.convert;
public interface Converter<F, T> {
public T convert(F obj, ConverterContext context);
}
package javax.convert;
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@gastaldi
gastaldi / gist:2293781
Created April 3, 2012 17:14
FacesPluginTest.java
package org.jboss.forge.spec.javaee.jsf;
import junit.framework.Assert;
import org.jboss.forge.project.Project;
import org.jboss.forge.test.AbstractShellTest;
import org.junit.Test;
public class FacesPluginTest extends AbstractShellTest
{