Changeset 1279
- Timestamp:
- 05/11/11 08:40:17 (13 years ago)
- Location:
- ComponentRegistry/trunk/ComponentRegistry
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/pom.xml
r1257 r1279 225 225 <include>index.jsp</include> 226 226 <include>WEB-INF/applicationContext.xml</include> 227 <include>WEB-INF/spring-config/**</include> 227 228 </includes> 228 229 </resource> -
ComponentRegistry/trunk/ComponentRegistry/src/main/webresources/WEB-INF/applicationContext.xml
r1251 r1279 3 3 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 4 4 5 6 <bean id="configuration" class="clarin.cmdi.componentregistry.Configuration" init-method="init" factory-method="getInstance"> 7 <property name="registryRoot" value="${registryRoot}" /> 8 <property name="adminUsers"> 9 <set> 10 <value>patdui@mpi.nl</value> <!-- short names are for shibbolet on lux16 --> 11 <value>patrick.duin@mpi.nl</value> 12 <value>guisil@mpi.nl</value> 13 <value>guilherme.silva@mpi.nl</value> 14 <value>twagoo@mpi.nl</value> 15 <value>twan.goosen@mpi.nl</value> 16 <value>daan.broeder@mpi.nl</value> 17 </set> 18 </property> 19 <property name="generalComponentSchema" value="http://www.clarin.eu/cmd/general-component-schema.xsd" /> 20 <!-- <property name="component2SchemaXsl" value="http://www.clarin.eu/cmd/comp2schema.xsl" />--> 21 <property name="component2SchemaXsl" value="http://www.clarin.eu/cmd/xslt/comp2schema-v2/comp2schema.xsl"/> 22 <property name="componentSpecSchemaLocation" value="http://www.clarin.eu/cmd http://www.clarin.eu/cmd/general-component-schema.xsd" /> 23 <property name="isocatRestUrl" value="http://www.isocat.org/rest/" /> 24 <!-- Extra attribute keys that are passed in a shibboleth authenticated request principal. 25 You need to configure the shhaa.xml file to enable the extra attributes. 26 --> 27 <property name="displayNameShibbolethKeys"> 28 <list> 29 <value>displayName</value> 30 <value>commonName</value> 31 </list> 32 </property> 33 </bean> 34 35 <bean id="componentRegistryFactory" class="clarin.cmdi.componentregistry.ComponentRegistryFactory" factory-method="getInstance"> 36 </bean> 5 <import resource="spring-config/component-registry.xml"/> 6 <import resource="spring-config/filesystem-impl.xml"/> 37 7 38 8 </beans> -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/filesystem/CMDComponentSpecExpanderTest.java
r1277 r1279 1 1 package clarin.cmdi.componentregistry.impl.filesystem; 2 2 3 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactory ;3 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactoryImpl; 4 4 import clarin.cmdi.componentregistry.impl.filesystem.CMDComponentSpecExpander; 5 5 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryImpl; … … 90 90 public void testExpandProfileWithNestedComponentsFromUserRegistry() throws Exception { 91 91 ComponentRegistryImpl registry = ComponentRegistryTestCase.getTestRegistry(getRegistryDir()); 92 ComponentRegistryImpl userRegistry = (ComponentRegistryImpl) ComponentRegistryFactory .getInstance().getComponentRegistry(true,92 ComponentRegistryImpl userRegistry = (ComponentRegistryImpl) ComponentRegistryFactoryImpl.getInstance().getComponentRegistry(true, 93 93 DummyPrincipal.DUMMY_CREDENTIALS); 94 94 -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/filesystem/ComponentRegistryFactoryTest.java
r1277 r1279 5 5 import clarin.cmdi.componentregistry.MDMarshaller; 6 6 import clarin.cmdi.componentregistry.UserCredentials; 7 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactory ;7 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactoryImpl; 8 8 import static org.junit.Assert.assertEquals; 9 9 import static org.junit.Assert.assertFalse; … … 37 37 @Test 38 38 public void testGetOrCreateUserDir() throws Exception { 39 ComponentRegistryFactory instance = ComponentRegistryFactory.getInstance();39 ComponentRegistryFactoryImpl instance = ComponentRegistryFactoryImpl.getInstance(); 40 40 assertFalse(Configuration.getInstance().getUserDirMappingFile().exists()); 41 41 ComponentRegistry componentRegistry = instance.getComponentRegistry(true, createUserCredentials("noot", "Mr.Noot")); … … 66 66 @Test 67 67 public void testGetOtherUserComponentRegistry() throws Exception { 68 ComponentRegistryFactory instance = ComponentRegistryFactory.getInstance();68 ComponentRegistryFactoryImpl instance = ComponentRegistryFactoryImpl.getInstance(); 69 69 ComponentRegistry reg1 = instance.getComponentRegistry(true, createUserCredentials("noot", "Mr.Noot")); 70 70 assertNotNull(reg1); … … 109 109 Configuration.getInstance().setRegistryRoot(registryDir); 110 110 Configuration.getInstance().init(); 111 ComponentRegistryFactory .getInstance().reset();111 ComponentRegistryFactoryImpl.getInstance().reset(); 112 112 } 113 113 -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/filesystem/ComponentRegistryImplTest.java
r1277 r1279 5 5 import clarin.cmdi.componentregistry.ResourceConfig; 6 6 import clarin.cmdi.componentregistry.UserUnauthorizedException; 7 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactory ;7 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactoryImpl; 8 8 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryImpl; 9 9 import static junit.framework.Assert.assertEquals; … … 123 123 public void testCacheLoadCorrect() throws Exception { 124 124 ComponentRegistryImpl publicReg = getTestRegistry(getRegistryDir()); 125 ComponentRegistryImpl userReg = (ComponentRegistryImpl) ComponentRegistryFactory .getInstance().getComponentRegistry(true,125 ComponentRegistryImpl userReg = (ComponentRegistryImpl) ComponentRegistryFactoryImpl.getInstance().getComponentRegistry(true, 126 126 DummyPrincipal.DUMMY_CREDENTIALS); 127 127 … … 411 411 assertEquals(0, registry.getComponentDescriptions().size()); 412 412 413 registry = ComponentRegistryFactory .getInstance().getComponentRegistry(true, USER_CREDS); //user registry413 registry = ComponentRegistryFactoryImpl.getInstance().getComponentRegistry(true, USER_CREDS); //user registry 414 414 registry.register(description, testComp); 415 415 assertEquals(1, registry.getComponentDescriptions().size()); … … 442 442 assertEquals(0, registry.getProfileDescriptions().size()); 443 443 444 registry = ComponentRegistryFactory .getInstance().getComponentRegistry(true, USER_CREDS); //user registry444 registry = ComponentRegistryFactoryImpl.getInstance().getComponentRegistry(true, USER_CREDS); //user registry 445 445 registry.register(description, testComp); 446 446 assertEquals(1, registry.getProfileDescriptions().size()); -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/filesystem/ComponentRegistryTestCase.java
r1277 r1279 3 3 import clarin.cmdi.componentregistry.Configuration; 4 4 import clarin.cmdi.componentregistry.UserCredentials; 5 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactory ;5 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactoryImpl; 6 6 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryImpl; 7 7 import static org.junit.Assert.assertTrue; … … 31 31 @After 32 32 public void cleanupRegistryDir() { 33 ComponentRegistryFactory .getInstance().reset();33 ComponentRegistryFactoryImpl.getInstance().reset(); 34 34 cleanUpRegistryDir(tmpRegistryDir); 35 35 tmpRegistryDir = null; … … 47 47 config.setAdminUsers(adminUsers); 48 48 config.init(); 49 ComponentRegistryFactory .getInstance().reset();50 ComponentRegistryImpl register = (ComponentRegistryImpl) ComponentRegistryFactory .getInstance().getPublicRegistry();49 ComponentRegistryFactoryImpl.getInstance().reset(); 50 ComponentRegistryImpl register = (ComponentRegistryImpl) ComponentRegistryFactoryImpl.getInstance().getPublicRegistry(); 51 51 register.setResourceConfig(config.getPublicResourceConfig()); //LOADS cache again but is necessary for tests normally we wouldn't have this 52 52 return register; -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestServiceTest.java
r1277 r1279 19 19 20 20 import clarin.cmdi.componentregistry.ComponentRegistry; 21 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactory ;21 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactoryImpl; 22 22 import clarin.cmdi.componentregistry.components.CMDComponentSpec; 23 23 import clarin.cmdi.componentregistry.model.AbstractDescription; … … 440 440 @Test 441 441 public void testRegisterWithUserComponents() throws Exception { 442 ComponentRegistry userRegistry = ComponentRegistryFactory .getInstance()442 ComponentRegistry userRegistry = ComponentRegistryFactoryImpl.getInstance() 443 443 .getComponentRegistry(true, DummyPrincipal.DUMMY_CREDENTIALS); 444 444 String content = ""; -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/rest/MDValidatorTest.java
r1277 r1279 17 17 18 18 import clarin.cmdi.componentregistry.ComponentRegistry; 19 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactory ;19 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryFactoryImpl; 20 20 import clarin.cmdi.componentregistry.impl.filesystem.ComponentRegistryTestCase; 21 21 import clarin.cmdi.componentregistry.model.ComponentDescription; … … 114 114 String id1 = "component1"; 115 115 String id2 = "component2"; 116 ComponentRegistry userRegistry = ComponentRegistryFactory .getInstance()116 ComponentRegistry userRegistry = ComponentRegistryFactoryImpl.getInstance() 117 117 .getComponentRegistry(true, DummyPrincipal.DUMMY_CREDENTIALS); 118 118
Note: See TracChangeset
for help on using the changeset viewer.