I just checked in a OSGi OBR like addition to the org.jboss.profileservice.spi.repository package. The interfaces in there mirror the OSGi OBR interfaces with two additions:
1. The RepositoryAdmin has an additional Repository getRepository(URI repository) throws Exception; method.
2. There is an extension of the Repository interface that allows for addition/removal and modification detection of Resources:
public interface MutableRepository extends Repository { /** */ public enum ModifyStatus {ADDED, MODIFIED, REMOVED}; /** * Add a resource to the repository. * @param resource the resource to add * @throws Exception thrown on any addition failure */ public void addResource(Resource resource) throws Exception; /** * Remove a resource from the repository * @param name the resource SYMBOLIC_NAME or ID * @return the Resource that was removed if found, null otherwise. * @throws Exception thrown on any remove failure */ public Resource removeResource(String name) throws Exception; /** * Return a collection of resources that have been modified since * the last call to this method. The returned resources contain * a modifyStatus property of type ModifyStatus to indicate the * type of change. * * @return The Resources that have been modified. * @throws Exception */ public Collection<Resource> getModifiedResources() throws Exception; }